In my project based on smartfusion, I am using UART of cortex M3 to communicate with PC. The problem i am facing is that when Cortex M3 program is running in debug mode i receive correct data in PC, but when i put the same in release mode timings go haywire and it does not work.
Please suggest what may be missing. Please Ask any additional input if required.
I will really appreciate early reply.
Thanks
Failure to enable clocks, the debugger may enable system features it uses.
Dump internal register states (peripherals, clocks, etc), in the debug vs release modes.
Failure to wait on status register bits.
Perhaps you can add diagnostic output you can use to understand the flow and function of your code absent a debug pod being attached.
we are using uart communication from smart fusion evaluation board card to PC using virtual COM port on evaluation board itself using CP2102 IC. UART0 is initiliazed with baud rate of 1500000. I am trying to send 4 bytes one by one by calling uart_polled_tx function four times with a delay of some minimum duration. This code works fine when i am running in debug mode, but in release mode i.e. when the code is loaded in the envm of smartfusion , then the data through UART is missed out or its incorrect. The error is only in sending data from smartfusion to PC, but PC to smartfusion data transfer works fine with same baud rate.
If I can translate this correctly. It works in the SIMULATOR, and doesn't work in REALITY.
Get a scope or logic analyzer and test your assumptions about actual speeds and bit/symbol timing of the output.
Use a standard baud rate like 115200, instead of some made up one.
Make sure your code programs all the registers and clocks properly. Assume that reality is a more harsh interpretation of the Reference Manual, double check all the register/bit settings, and THINK about how you can TEST each of the steps in the initialization sequence so you can figure out where it's breaking. Perhaps you can use the JTAG debugger to step through the code, checking the output/clock states at each step?