Thanks for the information, my question is about the call timing.
Should I call spiffyd_init(SPIFFTD_1) first? I guess the ROM code has already done that since it will access the SPI flash during boot time. So I just call spiffy_txData(SPIFFYD_1, 1, 0xAA), is it safely or it will annoy the ROM code to manage the SPI1 bus?
By what kind of API call will trigger the SPI bus busy? Should I check something before I use spiffy_xxx low level APIs? (For example, after calling bleprofile_WriteNVRAM(), bleprofile_ReadNVRAM(), I should wait for the operation before I want to access the register of main SPI flash, right?)
bleprofile_*NVRAM will return only after the NV access is compete. After boot (which is when the app runs any way), you are free to call these (and spiffy_txData(SPIFFYD_1, 1, 0xAA) ) any time you want because there are only accessed by the application. If you are accessing SF, you do not need to call spiffyd_init() - you may access spiffy_* directly because that is implicitly the SF. If you have other SPI slaves on the same SPI bus and you want to reconfigure the SPI HW block (for a different speed/endianness etc), then you have to use spiffyd_* functions.