WSPI on STM32F769I Topic is solved

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

Moderators: RoccoMarco, barthess

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

WSPI on STM32F769I

Postby josesimoes » Fri Apr 26, 2019 7:06 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: WSPI on STM32F769I

Postby Giovanni » Fri Apr 26, 2019 7:11 pm

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

Postby josesimoes » Fri Apr 26, 2019 7:16 pm

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  Topic is solved

Postby josesimoes » Fri Apr 26, 2019 7:19 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: WSPI on STM32F769I

Postby Giovanni » Fri Apr 26, 2019 7:22 pm

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


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 21 guests