In pin_mux.c file of ble projects "BOARD_InitSPI()" is defined.
1. Is this function is used for access to SPI Flash?
2. When searching reference, the spi function is never getting called in the project(temp_sens). "App_NvmWrite()" is used for writing data into NVM . Also bond data is stored into NVM .
If "BOARD_InitSPI()" is not getting invoked, then where is all NVM data stored?
3. Is BLE Stack using spi flash ?
Best Regards,
Nidhin
Hello @nidhintomy
Hope you are doing well.
void BOARD_InitSPI(void) configures pin routing and optionally pin electrical features. SPI flash should be connected to PTC16 (SPI0_SCK), PTC17 (SPI0_SOUT), PTC18 (SPI0_SIN) and PTC19 (SPI0_PCS0); please verify this configuration in your source code. You can find more information about SPI API in MCUXpresso SDK API Reference Manual_MKW36Z4 (inside KW36 SDK documentation folder > docs), Chapter 11: DSPI Serial Peripheral Interface Driver
SPI flash is intended for Over-the-Air Programming (OTAP) or for storing non-volatile system data, or parameters. When NVM is enabled, it is used as non-volatile storage management by the host stack, and as you mentioned, it could be used to store bonding data. For more information about memory configuration, please consult the MKW36/35/34 Reference Manual, Chapter 4.6 Memories and memory interfaces; and Bluetooth Low Energy Application Developer Guide, Chapter 2.3 Non-volatile Memory (NVM) access.
Regards,
Eduardo.
Glad to hear from you. I am fine.
I want some clarification.
1. Is 'frdmkw36_wireless_examples_bluetooth_temp_sens_bm' actually uses SPI flash ? Because the 'BOARD_InitSPI()' function never get invoked.
2. Is KW36 has an internal memory to store bonded data or data stored by 'App_NvmWrite()' ? If yes, is there any document related to that memory ?
Best Regards,
Nidhin
Hi,
Temperature sensor may not be using SPI flash. You can find some information about FlexNVM in the MKW36/35/34 Reference Manual, Chapter 4.6 Memories and memory interfaces; and in Bluetooth Low Energy Application Developer Guide, Chapter 2.3 Non-volatile Memory (NVM) access.
Regards,
Eduardo.
I looked on that documents. And i didn't get any clarity. I successfully used NVM to write data. But no idea where it is stored.
Can you please clarify is there any internal NVM is used?
Is there any document related to how many bytes of data can be stored into the internal NVM, if it exists?
Best Regards,
Nidhin
Hi,
Could you please confirm if information shown in section 4.6.1.1 Flash Memory Sizes is helpful for you? Figures 4-22, 4-23 and 4-24 describe the memory distribution, sizes and addresses for different memory configurations, including FlexNVM partitions.
Regards,
Eduardo.