2025-02-05 07:00 AM
Hi,
We are trying to write some key values directly into a particular address of NVM from STM32Cubeprogrammer, but rest of the sector are also getting erased. Is there any way to prevent it? Tested with Cubeprogrammer CLI also, but facing the same issue.
Solved! Go to Solution.
2025-02-05 08:14 AM
No.
As noted, that is the nature of Flash.
You'd have to do it in 3 steps:
If you explain what you're actually trying to achieve, people may be able to suggest other ways to achieve that goal...
(you haven't said what chip you're using)
2025-02-05 07:08 AM
By "NVM", do you mean Flash?
If so, that is the expected behaviour - you can only write to erased Flash.
2025-02-05 08:07 AM
Yes, I mean flash.
Is there any other way to do it? So that other flash contents remain as it is. Only a particular selected area gets erased and written.
2025-02-05 08:14 AM
No.
As noted, that is the nature of Flash.
You'd have to do it in 3 steps:
If you explain what you're actually trying to achieve, people may be able to suggest other ways to achieve that goal...
(you haven't said what chip you're using)
2025-02-05 08:31 AM
Recently ST released M95 EEPROMs, very suitable for this purpose. Please consider.
2025-02-05 08:50 PM - edited 2025-02-05 08:56 PM
Sorry, I should have mentioned it.
I am using RAK3172 module (STM32WLE5CCU6) for LoRaWAN application.
For every LoRaWAN application, there needs three parameters which are DEVEUI,JOINEUI and APPKEY. Right now these are programmed from the firmware itself. But from production point of view we are looking for an efficient way. That's when this idea came into my mind.
2025-02-05 08:51 PM
Thank you for the suggestion! I’ll definitely look into it.
2025-02-06 01:48 AM
Maybe look into merging that information into the Hex file ?