STMicroelectronics / stm32-external-loader

Provides drivers, examples, loader files and testing routines for external loaders for STM32 series of microcontrollers.
Other
127 stars 71 forks source link

Issues with MT25QL512 #5

Open albertomercurio opened 3 years ago

albertomercurio commented 3 years ago

Hello, i followed this guide several times, i correctly set my MT25L128, now i want to set MT25QL512, however i does not work properly. When i program the flash memory through the Programmer, the number are shifted by one byte, like in this picture. I copied and pasted the entire driver but it doen't work. The only different parameters are the CubeMX settings. I used:

  1. prescaler = 2
  2. FIFO = 1
  3. No sample shifting
  4. Flash size = 25
  5. CS High Time = 2
  6. Clock Mode = LOW
  7. Flash ID = 1
  8. Dual Flash = Disabled
rsankar1996 commented 3 years ago

Hi @albertomercurio, are you still facing the issue?. I had faced same issue with MT25QL512 drivers, but solved after changing dummy cycle parameter inside function uint8_t CSP_QSPI_EnableMemoryMappedMode(void). Currently it will be set to 10, try changing to 8 and see the result.

What I followed for solving this issue:

You can get device datasheet from: mt25ql512 datasheet

In the driver code, command-address-data is set 1-1-4 which is for extended SPI, and dummy cycle set for 10 which is for Quad spi mode (Page 37 in datasheet). As per datasheet, dummy cycle config for extended SPI should be 8.

EmbeddedAyoub commented 3 years ago

Hello Guys,

I am having an issue with the MT25QL512 embedded in the STM32H750_DK. I tried the same code from ST MOOC but didn't work, I tried also all possible configurations but no news. Do you have an idea what could be the issue? BTW, my problem is that I can't communicate with the Memory.

Thanks, Ayoub

milom commented 2 years ago

Hi @albertomercurio, are you still facing the issue?. I had faced same issue with MT25QL512 drivers, but solved after changing dummy cycle parameter inside function uint8_t CSP_QSPI_EnableMemoryMappedMode(void). Currently it will be set to 10, try changing to 8 and see the result.

What I followed for solving this issue:

You can get device datasheet from: mt25ql512 datasheet

In the driver code, command-address-data is set 1-1-4 which is for extended SPI, and dummy cycle set for 10 which is for Quad spi mode (Page 37 in datasheet). As per datasheet, dummy cycle config for extended SPI should be 8.

Thanks! this was perfect for me!