Hi
When using SPI FLASH it is important that it is positioned correctly (that is, that the configuration of the position in memory, and the configuration of the file system to suit). Then the CS line used must be set correctly.
It is recommended to test this with the simulator to verify that everything is basically correct.
The next step is to ensure that the HW is working correctly. On initialisation the manufacturer ID and type is read - if the read is not successful the SPI will be disabled. Any attempts to access the (non-present) SPI FLASH will result in the SW hanging and then a watchdog reset restarting again. Check that fnCheckSTM25Pxxx() returns a valid chip type (stored in ucSPI_FLASH_Type[]) - if not, HW SPI FLASH is possibly not correctly connected and no accesses will be possible.
Last note - the SPI FLASH chips tend to be quite sensitive to the quality of the signals (especially the clock line). Make sure that these are as short as possible. Long lines will cause ringing and this can quite easily stop the chips from responding correctly.
Regards
Mark