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: How to read out the flash data of CC2340R5

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

Tool/software:

Hi,

We made a tool to program the CC2340R5 using SPI and ROM Serial Bootloader.

The CC2345R5 could be programmed ok. And we want to read out the flash, but we

did not found any command in the reference manual. 

we also check that there's no command for SACI if to use SWD for programming.

So we want to know how to read out the flash out, we may need some detailed document.

  • Hi Ni,

    There are no ROM Serial Bootloader functions to read flash memory.  There are certain clues you can gather by checking the CRC against known contents, or you would need to create your own flash Bootloader to achieve this functionality.

    The SWD protocol does include functionality to read memory from the device, this is described in ARM Debug Interface Documentation and is demonstrated by Uniflash and CCS debug functionality.

    Regards,
    Ryan

  • Hi Ryan,

    CRC is used in programming, but read out the flash data is still needed.

    1. For  flash Bootloader, I download the SDK "simplelink_lowpower_f3_sdk_8_40_02_01", but I did not find a demo about write and read the flash, could you show me a demo project about flash operation.

    2. Actually I have tried to program the device using SWD, but this device seems not same with other device contain Cortex-M core. I could not connect this device, though I could connect other TI device e.g MSPM0G1107. ( the above test are Not using UNIFLASH or CCS, just our own tool with SWD, we send the SWD command according to the ARM Debug Interface Documentation).

    In the RM - Section 5.3.1 Physical Interface - it states:

    Upon physical connection of a debug probe, a configuration sequence must be sent from the debug probe to the
    target device to initiate a valid SWD connection with the SW-DP. An invalid sequence doesn't wake the device
    from shutdown mode

    Could you tell what is the "configuration sequence"?

  • 1. The https://github.com/TexasInstruments-Sandbox/ble_examples/tree/simplelink_low_power_f3_sdk-8.40/tools/TI_CC2340_Linux_SBL is the solution available today, although there are efforts internally to publish additional bootloader host solutions in the future.

    2. Please see whether this relevant E2E thread and its accompanying documentation links answer this question

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for providing the relevant e2e thread, the device must need the configuration to leave the dormant state using SWD.

    Now I can read the front part of this device. But I could not read the whole flash, it seems the device would go into low power mode or some special mode after some seconds.

    There are 3 APs connect to the debug port, and I found the UniFlash would have some operation for the CFG_AP. I did not found the description of the CFG_AP, so is there any operation must  to be done to configure CFG_AP. or the device would go into some power save mode?

  • CFG_AP would just access device information stored on the device, as explained in this similar E2E thread.  You will need to determine the device state at any point as explained in the Arm Debug Interface Architecture Specification, then act accordingly.  

    Regards,
    Ryan