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: Serial Bootloading error "Invalid Adddress"

Part Number: CC2340R5
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

Hi Forum,

I’ve developed a GUI application for serial code loading. It works fine with one binary file, but with another binary I’m getting an “invalid address” response from the target.

I generated binary dumps of Serial data of both files and, at first glance, everything looks fine. I’m attaching an image below for reference.

Could you please help me understand what might be causing this issue or what I could be missing here.

Regards

Vaibhav

  • Hi Vaibhav,

    Thanks for sharing the details and screenshot of the serial data -- this is very helpful to diagnose the issue.

    Are you using the default device ROM SBL (serial bootloader)? --> If yes, you would need to first send a BLDR_CMD_CHIP_ERASE (command id 0x24) prior to performing the download.

    Excerpt from TRM (https://www.ti.com/lit/pdf/swcu195) section :

    I suspect that the working instance (on the left hand side of screenshot) is on a device which was already chip-erased (either a new device, or chip-erased by some other means -- maybe uniflash?), and that the non-working instance (on the right hand side of screenshot) is on a device which was previously programmed but not chip-erased yet.

    Thanks,
    Toby

  • Hi Toby,

    I'd like to mention that we identified a bug in our serial loading tool. The issue was that the tool was specifying the data length as one byte too large, which caused the total byte count to exceed the Flash size.

    Our application binary spans from address 0x00000000 to 0x0007FFFF, which correctly corresponds to 0x00080000 bytes — the full capacity of the Flash. However, the tool was setting the data length to 0x00080001, one byte beyond the valid range. As a result, we received the 0x43 error (INVALID ADDRESS), and the target device erased the corresponding chunk. Consequently, the device failed to boot afterward.

    It worked on first binary file because, the size it was less than 0x0007FFFF.

    Regards,
    Vaibhav