This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F280049C: Serial communications only works in Debug mode

Part Number: LAUNCHXL-F280049C


Using SCIB to receive a 5 byte sequence from a touchscreen display. In Debug mode everything works ok. Once I flash the code, I have to send each sequence twice in order for the command to be recognized. What could be the difference between running from RAM verses  from FLASH?

  • Hi Jeffrey,

    Thanks for your question!

    If there are absolutely no differences between the flash and RAM firmware being loaded, then one of the only items that can theoretically change is the number of wait states for code access.

    Essentially, flash code load (if occurring randomly across the code space) may cause wait states as outlined in the device data sheet. The issue is that if the baud rate of SCI is fast enough, the extra wait states may actually be long enough to delay your reading of the buffer. This is all assuming though that you have a high baud rate and are not using FIFO and interrupts on SCI.

    If my assumptions are right, could you try out using the FIFO and see if this resolves your issue?

    Regards,

    Vince 

  • This turns out to be part of the problem. There was a race condition in the code. Evidentially the code runs slower out of RAM so it did not appear running from RAM. I am running at 38400 and using the FIFO. The symptoms pointed at the serial port but the problem turned out to be much farther downstream in the code. Thanks for your help.