Program NVRAM at Production

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChCh_3584941
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

This question relates to recommended procedures to write unique values to NVRAM during factory production. 

We wish to store board-specific information such as Serial Number, BT Address, etc. in the NVRAM area of on-chip flash.  Our preferred production flow is:

1. Load a simple 'Factory Test' Program (using ChipLoad) which performs the necessary PCBA-level test and Calibration Procedures

2. Write Device Serial Number, BT Address, certain calibration coefficients, etc. into NVRAM from within the 'Factory Test' program, using API's in: wiced_hal_nvram.h.

3.  Load the final 'Production' Image to the chip (also using ChipLoad).

The issue is that the default ChipLoad utility will erase the entire NV memory space, so when the Final image is written to the device, the Serial Number, BT Address and Cal coefficient are lost.  We are looking for a way to write the Final Image and retain the NVRAM settings.

Does Chipload support command-line options that will avoid erasing the user NVRAM section?  Or are customized versions of the utility available?

Are there other tools / procedures that I may not be aware of, that would allow us to accomplish the same end-result?

I am aware of the 'HCI OTA' option ( https://community.infineon.com/t5/Bluetooth-SDK/CYW20819-NVRAM/m-p/94881  ) but the only utility I can find that performs that procedure is 'Client Control'.  Does 'Client Control' have a CLI option? ... the GUI interface does not seem suited to a production environment.

0 Likes
1 Solution
ChCh_3584941
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hello;

In this previous ticket:  

https://community.infineon.com/t5/Studio-Bluetooth/Direct-load-to-RAM-on-20706-not-working/m-p/75717

We found a reference to setting the DLSectorEraseMode as follows:  DLSectorEraseMode = "Written sectors only".  We have tried this setting and it seems to work for us, the NVRAM section is preserved, and the new image seems to be written correctly.

View solution in original post

0 Likes
3 Replies
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @ChCh_3584941 

You should be able to use Chipload to skip the chip erase. Can you please try the parameter NOERASE

AnjanaM_61_0-1653328556372.png

Regards,

Anjana

0 Likes
ChCh_3584941
Level 4
Level 4
50 sign-ins 25 replies posted 25 sign-ins

Hello;

In this previous ticket:  

https://community.infineon.com/t5/Studio-Bluetooth/Direct-load-to-RAM-on-20706-not-working/m-p/75717

We found a reference to setting the DLSectorEraseMode as follows:  DLSectorEraseMode = "Written sectors only".  We have tried this setting and it seems to work for us, the NVRAM section is preserved, and the new image seems to be written correctly.

0 Likes
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @ChCh_3584941 

Thanks for sharing the resolution you tried.

Yes, Both option should work.

Regards,
Anjana

0 Likes