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.
Tool/software:
Hi,
I have been observing some weird behavior with TI-15.4 stack collector/sensor based radios. When images are downloaded via UniFlash. I suspect even with settings to erase all unprotected sectors is checked, some information from previous network is left there if a radio has been previous loaded a different type of image(collector vs. sensor), or the same type of image(collector) but with different network parameters(panID, encryption).
In several instances, when collector radios that have been used in previous testing is loaded with a newer version of firmware then a different set of panID and encryption key, a sensor radio can join network but cannot send/receive data to/from those collectors. If we mass erase those collector radios via Flash Programmer 2, then re-load the same firmware images and panID and encryption key, sensor nodes all of sudden can just communicate with those collector radios just fine. After going through the open source portion of collector/sensor projects, my understand is that network joining is not encrypted. Therefore my suspecion is somehow the encryption and decryption is somehow messed up, presumably because some information from previous network on collector. I never observed such behavior if collector has been mass erased via Flash Programmer 2 or has never been used.
We can perform a separated mass erase via Flash Programmer 2 before loading image via UniFlash, but this almost doubles the amount of time to load image. I have never tested third party tools yet. It would be nice if we do both mass erase and image loading in UniFlash in one go.
Thanks,
ZL
Hi Zhiyong,
You're correct that when a TI 15.4-Stack network connection is formed, the device stores connection and network information in the NV area. This area is not overwritten when you flash a new image, so you need to specifically erase it.
In uniflash you can open the Settings and Utilities tab and select Manual Erase. Alternatively, under Program Load you can instruct Uniflash to erase the entire flash before programming the device.
Cheers,
Marie H
Hi Marie,
Thanks for your reply.
I have two follow-up questions:
1) Is there a way to perform image loading and mass erase in one click? Judging from the log, it seems erase the entire flash is a different name for mass erase. Your previous answer seems to indicate this can be one before programming automatically, but I don't see any way other than manually triggering it.
2) Do you have a list of items that are stored into NVS? We have expanded the clearAllNvItems() function, and invoked it before applying new panID and encryption key. Presumably that is sufficient, but unfortunately that is not enough, judging by the result that a sensor node can join network but cannot communicate with collector.
Best,
ZL
Hi Zhiyong,
1) You can use the Uniflash CLI to automate it.
2) If you clear the whole NVS regoin you should be safe. According to SysConfig, the region is defined at 0x0004E000 with the size 0x8000.
Cheers,
Marie H
Hi Marie,
UniFlash CLI seems like the way to go, but I ran into some issues with the approach.
After generating package, then unzipping the generated file onto the same computer, I get the following error when I try to run the BAT files in generated package:
d:\Downloads\uniflash_windows>dslite.bat Executing default command: > dslite --mode flash -c user_files/configs/cc1352p1f3.ccxml -l user_files/settings/generated.ufsettings -s VerifyAfterProgramLoad="No verification" -e -f -v "user_files/images/CC1352P-Collector v1.1.0 2024-08-01.hex" 'CMD' is not recognized as an internal or external command, operable program or batch file. d:\Downloads\uniflash_windows>one_time_setup.bat 'CMD' is not recognized as an internal or external command, operable program or batch file.
Did I miss something?
Thanks,
ZL