Hi Tony,
1) On bootup, the power to the flash is enabled by default. But as soon as "plf_init" is called the power is disabled. So is it safe to assume QBlue stack, will enable the power to the flash whenever it needs to access the flash?
The plf_init is called to initialize BLE hardware platform, and read out the NVDS values for the configuration that was saved.
2) Should the application enable the power to flash before it makes any NVDS api calls (nvds.h)? Or is it taken care of internally?
The stack reads out the NVDS information thought the NVDS APIs, you are enabling the power flash because you are using a different source.
3) Section 5 of UM10995, mentions using SRAM location (passed using plf_init) to read the flash location and then writing the data. Is the whole 4k byte read and written back with the updated data?
No, it is reading only the TAGs available and needed for the BLE Stack.
4) If it reads the 4k flash, how much time would be a typical write cycle take? I am thinking of how much time I need to set for the watchdog timer.
The NVDS time is taking care of this time, so it will depend if you have invalid tags or not. However, time will not require a big time.
5) The document talks about using 4k area at the end of flash as backup information. When is this updated and read back? It is updated when the NVDS is full and the application needs to write new information, the backup saved all the NVDS and erase the invalid tags.
6) Are the values on the NVDS updated immediately when a new value becomes available [ on the same handler/task ]? Or is it updated on the SRAM and updated later on a different handler?
It will be available if you use the nvds_put APIs and if the return value is a success.
7) According to 6.3.3.2, of UM10995, the SRAM location nvds_tmp_buf, can be NULL. How is the write operation handled in this case? Is this when it uses the 4k area at the end of flash?
If you are passing a length, the driver will save the bytes with the value 0xFF, creating a parsing.
Regards,
Mario