We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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 in between. 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.
In release mode we are running without JTAG adapter and in debug mode we are running with JTAG adapter. In debug mode programm is running on PC, we can have breakpoints to stop the program at required step but in release mode we cant do this.
How can debug mode be both "running on PC" and "running with JTAG"?
You connect a JTAG adapter to virtual hardware in the simulator???
Next thing - the simulator doesn't emulate all hardware fully. How are you making sure your UART is ready to accept more serial data? If you don't have code pacing the transfer, then you are likely to lose characters. The simulator will probably not care about the baudrate when figuring out how fast a UART can swallow new data.