Author Topic: SPI Crash  (Read 3795 times)

Offline Kuroro

  • Newbie
  • *
  • Posts: 38
    • View Profile
SPI Crash
« on: June 30, 2008, 02:32:21 PM »
Hi mark

I tried to use the SPI and the file system too, to put the file system in the spi flash.
I got a ST 25P16 spi memory on my personal board so i use the setting included for this memory on my project and when i tried to upload a web page into the spi flash the softward crash.

I don't find where the software crash, have you any track i can explore to find why they crash ?

Thank's a lot 

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3191
    • View Profile
    • uTasker
Re: SPI Crash
« Reply #1 on: June 30, 2008, 10:55:16 PM »

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.