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.

CC2340R5: CC2340R5 debug appears session to start, but program doesn't execute

Part Number: CC2340R5
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Hi

I have an issue with a new board we have designed using the CC2340R5, the debus session appears to program the device and start, but it never hits the "main" breakpoint, and if manually paused, the program counter appears to be somewhere invalid. 

The same program run on a different board also of our design works correctly:

I have checked the core voltage is present, and no error is given when starting the debug session. 

Any suggestions as to what could cause this behaviour?

  • Hello Ian,

    I hope you are doing well. 

    Just to confirm that my understand is correct, on one board the device does not debug with breakpoints and is not working as intended, and on a second device (with the same code) your debug (with breakpoints) is working as intended. 

    If that is the case this could point towards some issue with a board, or maybe the XDS.

    -Could you do a quick swap between the board that works XDS and the board that does not works XDS, to see if switching the XDS does anything?

    -if not this points towards that specific board being the issue.

    Next let's try loading UniFlash, and do a Read Device Info -> Perform Blank Check -> Chip Erase -> Perform Blank Check (to confirm device is empty), and then try debugging the device again. 

    And as usual, what is your SDK version, CCS version? And were there any changes made to the syscfg bootloader options? 

    Thanks,
    Alex F

  • Hi Alex, thanks for the reply. 

    Your understanding is correct, the code (which is basically the empty example) works on one of our designs and not the other. This is using the same XDS110. 

    I have tried using uniflash, and the flash operations appear sucessful, but still have the same issue with the debugger. 

    I agree this must be a hardware issue, but we are struggling to identify which hardware aspects could cause this issue... The reset line is held high, the power supply checks out fine etc. The main difference in the uController support circuitry is we do not have the 32kHz XTAL on the problem design, but removing it from the working design did not cause this issue on that board. 

    We're using CCS 12.6.0  with 7.40.0.64 SDK, only change made is SysConfig is to change the low frequency clock source to LF RCOSC

  • Hello Ian,

    Just wanted to double check, but are you using a custom board? If so, have you already had a design review where you submitted your design to (SIMPLELINK-2-4GHZ-DESIGN-REVIEWS Design tool | TI.com) and revied feedback? 

    It is a bit odd that on one device, it does not work, and on the other it does despite both devices using the same XDS and being the same design. 

    -I may need to loop in someone from our HW team to help look into this issue further from the HW perspective.  

    Thanks,
    Alex F

  • Hi Alex

    I have made some progress, looking at the flash address the program was running in I figured this was the RoM bootloader. Changing the Sysconfig:Bootloader Configuration to Any bootloader forbidden enables my application to run. 

    I need to understand what was causing the bootloader to be invoked on this hardware and not the other design - what causes the RoM bootloader to retain control and not jump to application flash?

    Our board was designed as a prototype so has 0R resistors on all pins which interact with the rest of the board, even with all these removed the bootloader retained control...

    Does the RoM bootloader use the XTAL?

  • Hello Ian,

    Since we are getting closer to the HW aspects I will now loop in an HW expert.

    -I did run into a similar issue, where a CC2340R5 device did not run with bootloader enabled, but changing to bootloader forbidden allows program to load. I think a workaround with bootloader enabled was to mass erase, into using UniFlash flashing the .out file to the device, but this required some extra steps. 

    Thanks,
    Alex F

  • In response to your XTAL question: 

    There are no devices where the ROM Bootloader utilizes or references any XTAL registers or configurations.

    Thanks,
    Alex F