Author Topic: ST SPI FLASH (M25P80) problem  (Read 15498 times)

Offline robo

  • Newbie
  • *
  • Posts: 40
    • View Profile
ST SPI FLASH (M25P80) problem
« on: November 25, 2008, 05:04:58 PM »
Hi,

I have problem with M25P80, because it work in simulator but doesn't work on hardware...
I was checked connection and is ok. What can be wrong??

robo

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: ST SPI FLASH (M25P80) problem
« Reply #1 on: November 25, 2008, 05:22:26 PM »
Hi Robo

How long are the signal lines to the chip? We have found that they can be quite sensitive and so they should be kept as short as possible - 5cm (2") is OK but longer can have problems with overshoot and this can stop the chip working correctly.

Regards

Mark

Offline robo

  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: ST SPI FLASH (M25P80) problem
« Reply #2 on: November 25, 2008, 05:59:17 PM »
Hi Mark,

They are shorter than 5cm. I also look on scope and there is no siglal on any SPI lines... I don't know why.

regards
robo

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3238
    • View Profile
    • uTasker
Re: ST SPI FLASH (M25P80) problem
« Reply #3 on: November 25, 2008, 08:00:08 PM »
Robo

Check that the project is configured with SPI_FILE_SYSTEM and SPI_FLASH_ST (in config.h) and SPI_FLASH_STM25P80 in app_hw_lm3sxxxx.h.

When the SW starts it checks to see whether it can identify the chip. See fnCheckSTM25Pxxx() in spi_flash_lm3s_stmicro.h.
Should this check not be good it will disable the SPI port.

Are you checking for the SPI signals after a reset of later on? Ensure that you check at reset to be sur eto be able to see them - each time the SW starts it should read the manufacturer ID. It should recognise the STM25P80 when it returns the value 0x14.

If you still see no signals check also the CS line (PA3) since this is controlled as a GPIO and must pulse low.

Also check the SPI initialisation: fnConfigSPIFileSystem() in LM3SXXXX.c. This is where port is defined to work as SPI. Ensure that it is being called (which must be the case if the SPI FLASH use is configured).

Regards

Mark