Hi PM_Dialog,
How are you doing?. Hope you are doing well.
I have a requirement of storing some user data in non-volatile space in the dialog chip. I cant find any examples for it.
I am aware that the chip doesnt have a flash but it has OTP.
Can I do the following.
1) Use OTP free space to store the data?.
2) Use Non-volatile memory space for storing the data?.
Regards,
Mark
Device:
Hi Mark,
I am fine thanks. Hope you are doing well too. Thanks also for your question.
What kind of data you would like to store?
DA14585 does not include an on-chip SPI flash – the DA14586 includes a flash memory.
不过,您可以使用一个外部的SPIflash and store your data. Do you have this option in your design?
Generally, yes you can store data in the OTP but keep in mind that OTP stands for One Time Programmable, thus you can’t erase and re-write the OTP multiple times, but you can only flip the bits that are still set to 0 and turn them to 1. This means that if you store your data, you cannot change them in the specific addresses.
Thanks, PM_Dialog
Hi PM_Dialog,
The data that I want to store is around 1Kbytes. If I go for DA14586 in my design can I use the internal flash to store the data. Are there any code to read/write internal flash data in DA14586?.
Regards,
Mark
Hi Mark,
The spi_flash example of the SDK can be taken as reference. The example is under 6.0.14.1114\projects\target_apps\peripheral_examples\spi\spi_flash\Keil_5 SDK path and should be build for DA14586 configuration. In the user_periph_setup.h / .c, you will find the GPIO configuration should be used for the DA14586 internal flash, as it is on standard pin. For interacting with the flash, the SPI Flash (spi_flash.c) driver should be used.
Thanks, PM_Dialog