UART gives garbage in FreeRTOS+IO in MPU mode in lpc 1769

bhaveshshah2310 wrote on Friday, February 20, 2015:

I am trying to make a code in MPU mode which print some status of tasks on UART terminal using UART3 in MPU mode

I am using FreeRTOS+IO framework for UART communication. I took UART code from FreeRTOS.org site which have many IO parts in it like I2C UART etc.
I have tested this code separately where MPU is not present and it is running properly it is giving properly. I can see proper output string on minicom console in linux.
now in my project i create an environment for MPU and include necessary files for FreeRTOS+IO framework. which include CMSISv2p00_LPC17xx with lpc17xx.cmsis.driver.library and necessary changes FreeRTOSConfig.h and also added FreeRTOS_IO_BSP.h and FreeRTOSIOConfig.h

all the necessary thing is been changed but when i try to open UART3 port and try to write something in it then it shows in a garbage form on the minicom terminal. the same bunch of code which is working in freeRTOS+IO framework is not giving garbage over here . .
i have checked the baud-rate and the SystemCoreClock is same as it should be in FreeRTOS_IO demos…

i am bit confuse here which other factors can cause the output string in garbage. then those factors . . can anyone suggest me something on this ? how to solve this problem.

rtel wrote on Friday, February 20, 2015:

So the code is the same, but the FreeRTOS port has been switched to the MPU version…if that is the case I can’t think of anything offhand that could cause the baud rate to to change - if that is the genuine cause of the problem.

Presumably other things will have changed too in order to set up the MPU regions? Or are you creating the tasks in privileged mode?

Can you use the debugger to compare the values in the UART’s registers to ensure they are all identical between the working and non-working versions? Are you sure the clock feeding the UART is also at the same frequency between the two versions?

Regards.

bhaveshshah2310 wrote on Thursday, February 26, 2015:

I found the problem that the peripheral clock frequency was not properly set up due to that it was giving me some problems there… Now as i have done it properly it is working as per the expectation. Thank you for your suggestion it helped me out over here.