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.

CC2640R2L: Debug without UART

Part Number: CC2640R2L

Hello,

I am currently developing an application that uses the onboard UART interface of the CC2640R2L for communication with another IC. CC2640R2L has only one UART interface. Therefore I cannot use UART for debugging. Is there another way to make the log output visible without the use of UART interface?

regards

Alex

  • Hi Alex,

    First of all, I would recommend to leverage other tools such as the ROV or other techniques described here.

    In addition, you could consider other options like "printing" into memory.  That way you could store the required log in RAM and access it with the debugger (which is done using cJTAG). You could also use SSI (SPI) or some GPIO "print" to investigate the issue.

    You could also disable the UART interface and see if the issue still reproduces. If yes, then you can re-purpose the UART for debug printing.

    Last but not least, you could send the debug information on the same UART bus. You may have to implement some UART packet filtering on the other IC.

    Best regards,

  • Hi Clement,

    I tried your suggestion with using ROV, but when I halt the processor I always get "Received Exception from ROS Server". I am also not quite sure for what to look for.
    I would expect some kind of error or exception that leads me to the root cause of my problem. But it seems the debugger has no access to any useful information.

    I also tried your recommendation for "printing" to memory. To accomplish this, I used RTT_viewer from Jlink and attached the Jlink debugger.
    It seems to have impact on application execution as the device is no longer connecting properly. The logging works but the device cannot initiate pairing over Bluetooth.

    The last option for re purposing the UART I want to avoid, because I need full capacity of the UART interface for data transfer.

    I have the suspect that there might be some kind of stack overflow issue. Can you please check my project and see if you can spot the problem?

    regards
    Alex

    [EDITED by Clement] Removing the file

  • Hi Alex,

    I have removed the file from your previous message. E2E is a public forum and I want you to be sure you understand this before sharing your project.

    Stack overflow issues are fairly common on these small-memory devices. If you have this intuition, then go for it and check if it could help. To check this, you could slightly increase the stack size of the tasks you think need it. If possible, you could disable the UART sensor, that way you could leverage the ROV to see how much stack each task uses.

    To finish, I haven't yet pointed you to our debugging guide. It might make sense to look into it  and see if something could help.

    Best regards,

  • Hi,

    I am out of the office until end of July and will not answer on E2E during this time.

    If your thread need additional support, please open a new one using the button Ask a related question. That way, the proper experts will help you.

    Wishing you a good summer.

    Kind regards,

  • Hi,

    thank you for the information. I got it working now, by changing a file in my code named uart.c to something else. I think this messed up the linking, because there is already a uart.c in the SDK.

    Thank you for your help and have nice holiday :-)

    regards

    Alex

  • Hi Alex,

    Well done! Thank you for telling us.

    Kind regards,