Page 1 of 1

WSPI on STM32F769I

Posted: Fri Apr 26, 2019 7:06 pm
by josesimoes
Hi,

I was coding a driver to use SPIFFs on the SMT32F769I-DISCO board (has a MX25L51245G).
The WSPI driver, clock and DMA seem to be properly configured as I can successfully issue the RST enable (RSTEN) and RST commands.

When reading the device ID (RDID) I get unexpected values:
0x30
0x88
0x06

I've looked into the code of the macronix_mx25 driver and pretty much followed it.
Any hints on how I can degub this?

Thanks!

Re: WSPI on STM32F769I

Posted: Fri Apr 26, 2019 7:11 pm
by Giovanni
It could be a lot of things, first thing, is the device in the expected state? (both interface and device using the same number of wires and clock mode).

Giovanni

Re: WSPI on STM32F769I

Posted: Fri Apr 26, 2019 7:16 pm
by josesimoes
I believe yes... the hardware is the STM board, so I trust it's working OK.
I've setup board.h to properly set the pin configs, including the AF values.

Also double check the commands against the ChibiOS driver.

Re: WSPI on STM32F769I

Posted: Fri Apr 26, 2019 7:19 pm
by josesimoes
Got it!

I went through all the possible configs and bumped into the clock setting.
I've added the following to mcuconf.h and it's now readin the expected IDs:

Code: Select all

#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 2



Suggestion maybe this config should be made more "visible"...

Thanks anyway for looking into this!

Re: WSPI on STM32F769I

Posted: Fri Apr 26, 2019 7:22 pm
by Giovanni
The device after a power up is in SPI mode unless it has been programmed using the non volatile control register. After a warm boot the device is in the state you left it because it does not take the same reset as the MCU.

Giovanni