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-CC3235SF: how to read the flash memory of a cc3235sf ?

Part Number: LAUNCHXL-CC3235SF
Other Parts Discussed in Thread: CC3235SF, UNIFLASH

Tool/software:

Hi!

I have a CC3235SF device that I am trying to debug. Unfortunately I don't see an print statements or any indication that the application is even running on the device. 

I would like to read the contents of the flash to see if there is some corruption or if I can find some discrepancy.

Please help me find a way to read the flash content. Ideal case would be if I can see the contents just like how "User files" section is shown in Uniflash. 

Thank you!

Mrudula Y

  • Hello Mrudula,

    First, could you please just verify that you are indeed properly Flashing the CC3235SF device by following this related forum?

    (+) CC3235SF: Flash Programming : USB to Uart - Wi-Fi forum - Wi-Fi - TI E2E support forums

    Once confirmed, thereafter, you should be able to leverage some of the toolchain options to verify the Flash write and then proceed with a Flash Read as well.

    TY,

    Chris

  • Hi Mrudula,

    I don't think that your issue have any relation of flash corruption. Can you detail describe what exactly you have done? Do you talk about XIP flash at device of SPI flash (sFlash)?

    Jan

  • Hi and

    Initially, the CC3235SF is flashed using Uniflash. The CC3235SF acts as a gateway and connects to the Azure IoT Hub. There is a separate controller connected to CC3235SF via RS-485 (UART) lines. One of the feature of the application running on CC3235SF is that it can be used to OTA (Over the air) update the attached controller's firmware. Everything works perfectly after flashing the CC3235SF.

    I am experiencing a bug in this OTA process. One observation was that after the attempt to OTA update the controller fails, the gateway does a soft reset, connects to the Azure iot hub successfully, and then just stops doing anything. It no longer sends any messages to the cloud, there is an LED that never turns ON, does not send any debug prints etc. It is becoming as if no code is running on the CC3235SF. 

    This is the reason i want to read the contents to see what could have gone wrong. Basically i want to the memory that gets written to when we use Uniflash. I think it is the external serial flash. 

  • Hi,

    You can check file /sys/mcuflashimg.bin using Uniflash. But if I should guess, it looks that you not properly created this file (missing fail safe flag) or commit process at your code does not work properly or you have issue with signature of your code. Because if file /sys/mcuflashimg.bin will be created properly with fail-safe flags, "brick" as at your case cannot happen.

    Do you use standard OTA code from SDK or you are using 3rd party OTA code form MS, etc.?

    Jan

  • Thank you for your response 

    how can i check the /sys/mcuflashimg.bin using Uniflash ? I dont see any "Read" option in Uniflash. 

    I am using standard OTA code from SDK. TI SimpleLink SDK V4.20.  Could you please share how to properly create /sys/mcuflashimg.bin using fail safe flag? any document or screenshots of the steps that need to be followed are appreciated. also, if I OTA update the Gateway itself, how do I make sure that flag is set when I create the OTA package for the gateway in Uniflash . I use the "Create OTA" feature on Uniflash to create the OTA package. 

  • Hi,

    A side note comment. SDK 4.20 is a pretty old with many security vulnerability. Using such old version is a best way how to create unsecure product, I think.

    File /sys/mcuflashimg.bin can be read (using user files browser) depending on what flag was used to create file. Description of filesytem flash you can find at swru469 chapter 6.12.3. But I think most important way for you is to monitor OTA procedure to determine if there is any error code.

    Jan

  • Hi

    Thank you for your response. the document is helpful. I was able to read the user files using the "Online User Files" option on a healthy device. But, On the problem device, when try reading "Online User Files" it gives me the following error - 

    What does this error mean? I can confirm the device is in Development Mode. 

  • Hi,

    It seems that file is damaged, likely not properly closed during write. What flags do you have set for this file?

    Jan

  • When i flash the application binary using Uniflash - these are the flags that are set. 

  • Hi,

    I think with such flags you should not be allowed read file. Use public read or vendor token during file creation.

    Jan

  • Hi

    oh! even in the device that i am able to view the online user files, the same flags are set. but i guess as you are saying there was some error that occurred while closing a file in the flash. thanks a lot for your prompt responses and help. 

  •  hi

    Final query - could you please any documentation that explains high level what the TI processor does from power up till it reaches the application binary (sys/mcuflashimg.bin) and starts executing the instructions? This will help me understand what is going on internally and where could my code be getting stuck at. thank you