I'm trying to use the macronix driver on an stm32 iot discovery board. I've configured something wrong because when I try to build I get a ton of errors for things that should be defined in hal_wspi.h
For example:
Compiling hal_serial_nor.c
In file included from /home/geobrown/Software/ChibiOS/os/hal/lib/complex/serial_nor/hal_serial_nor.h:205:0,
from /home/geobrown/Software/ChibiOS/os/hal/lib/complex/serial_nor/hal_serial_nor.c:27:
/home/geobrown/Software/ChibiOS/os/hal/lib/complex/serial_nor/hal_serial_nor.c: In function 'bus_cmd':
/home/geobrown/Software/ChibiOS/os/hal/lib/complex/serial_nor/devices/macronix_mx25/hal_flash_device.h:189:42: error: 'WSPI_CFG_CMD_SIZE_16' undeclared (first use in this function); did you mean 'WSPI_CFG_CMD_SIZE_8'?
#define MX25_CFG_C16_8DTR (WSPI_CFG_CMD_SIZE_16 | \
I've defined
HAL_USE_WSPI TRUE in halconf.h
and
STM32_WSPI_USE_QUADSPI1 TRUE in mcuconf.h
Any thoughts ?
Geoffrey
trouble trying to use the Macronix flash driver
-
- Posts: 87
- Joined: Thu May 07, 2015 9:47 pm
- Has thanked: 3 times
- Been thanked: 15 times
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: trouble trying to use the Macronix flash driver
Which version? which platform?
I tried the STM32-WSPI-MFS demo and it compiles without errors.
Giovanni
I tried the STM32-WSPI-MFS demo and it compiles without errors.
Giovanni
-
- Posts: 87
- Joined: Thu May 07, 2015 9:47 pm
- Has thanked: 3 times
- Been thanked: 15 times
Re: trouble trying to use the Macronix flash driver
Thanks, yes I should have mentioned that I did that too. Of course it's a different processor, but I don't know how that would affect the configuration.
Geoffrey
Geoffrey
-
- Posts: 87
- Joined: Thu May 07, 2015 9:47 pm
- Has thanked: 3 times
- Been thanked: 15 times
Re: trouble trying to use the Macronix flash driver
It doesn't look like the macronix driver has been used with a quad spi device -- just the octo spi device. Changing the include in the
ChibiOS/testhal/STM32/multi/WSPI-MFS/make/stm32l476_discovery.make
file to the macronix driver instead of the micron one breaks the build and causes the same cascade of errors. I don't understand the complex driver model sufficiently to diagnose this.
Geoffrey
ChibiOS/testhal/STM32/multi/WSPI-MFS/make/stm32l476_discovery.make
file to the macronix driver instead of the micron one breaks the build and causes the same cascade of errors. I don't understand the complex driver model sufficiently to diagnose this.
Geoffrey
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: trouble trying to use the Macronix flash driver
Hi,
There are two problems:
1) STM32 QSPI does not support 16 bits commands, this is why the definition is missing.
2) The Macronix driver that you are trying to use is for an OctoSPI device, it would not work with your device anyway which is a QuadSPI one.
You need a driver for your QSPI device.
Giovanni
There are two problems:
1) STM32 QSPI does not support 16 bits commands, this is why the definition is missing.
2) The Macronix driver that you are trying to use is for an OctoSPI device, it would not work with your device anyway which is a QuadSPI one.
You need a driver for your QSPI device.
Giovanni
-
- Posts: 87
- Joined: Thu May 07, 2015 9:47 pm
- Has thanked: 3 times
- Been thanked: 15 times
Re: trouble trying to use the Macronix flash driver
Thank you for clearing that up ! At least I know not to pursue that driver route .
Geoffrey
Geoffrey
Who is online
Users browsing this forum: No registered users and 25 guests