WSPI on STM32F769I Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
josesimoes
Posts: 91
Joined: Sat Feb 18, 2017 11:50 am
Has thanked: 43 times
Been thanked: 23 times

WSPI on STM32F769I

Post 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!
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: WSPI on STM32F769I

Post 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
josesimoes
Posts: 91
Joined: Sat Feb 18, 2017 11:50 am
Has thanked: 43 times
Been thanked: 23 times

Re: WSPI on STM32F769I

Post 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.
josesimoes
Posts: 91
Joined: Sat Feb 18, 2017 11:50 am
Has thanked: 43 times
Been thanked: 23 times

Re: WSPI on STM32F769I

Post 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!
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: WSPI on STM32F769I

Post 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
Post Reply