ChibiOS 16 STM32F429 Disc and SPI5/FMC

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

Moderators: RoccoMarco, barthess

MobileWill
Posts: 27
Joined: Sat Jan 30, 2016 8:44 am

ChibiOS 16 STM32F429 Disc and SPI5/FMC

Postby MobileWill » Tue Feb 02, 2016 7:40 am

Hi,

This is driving me nuts. It looks like SPI5/6 isn't setup for STM32F429. In the MCUCONF from uGFX only SPI5 is set to true and I get


Code: Select all

chibios_16\os\hal\ports\STM32\LLD\SPIv1\spi_lld.c||In function 'spi_lld_init':|
||'SPI5' undeclared (first use in this function)|
chibios_16\os\hal\ports\STM32\LLD\SPIv1\spi_lld.c|263|note: each undeclared identifier is reported only once for each function it appears in|
chibios_16\os\hal\ports\STM32\LLD\SPIv1\spi_lld.c||In function 'spi_lld_start':|
.\chibios_16\os\hal\ports\STM32\STM32F4xx\stm32_rcc.h|861|error: 'RCC_APB2ENR_SPI5EN' undeclared (first use in this function)|
.\chibios_16\os\hal\ports\STM32\STM32F4xx\stm32_rcc.h|102|note: in definition of macro 'rccEnableAPB2'|
chibios_16\os\hal\ports\STM32\LLD\SPIv1\spi_lld.c|386|note: in expansion of macro 'rccEnableSPI5'|
chibios_16\os\hal\ports\STM32\LLD\SPIv1\spi_lld.c||In function 'spi_lld_stop':|
.\chibios_16\os\hal\ports\STM32\STM32F4xx\stm32_rcc.h|870|error: 'RCC_APB2ENR_SPI5EN' undeclared (first use in this function)|
.\chibios_16\os\hal\ports\STM32\STM32F4xx\stm32_rcc.h|116|note: in definition of macro 'rccDisableAPB2'|
chibios_16\os\hal\ports\STM32\LLD\SPIv1\spi_lld.c|470|note: in expansion of macro 'rccDisableSPI5'|
||=== Build finished: 3 errors, 0 warnings (0 minutes, 2 seconds) ===|



If I change it to just SPI1 or 2 its fine. So how do I get SPI5 to work? I need it the discovery board hardware.


Part 2

Once I get past the SPI issue(temp changing to SPI1) I get FMC errors among others referring to LTDC and such. The only place the stm32f4_fmc.h/c files come from are uGFx does ChioBios support access to FMC through its hal or is something else going on and this is a uGFX question?

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: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Postby Giovanni » Tue Feb 02, 2016 10:06 am

hi,

Apparently some SPI5-related definitions are missing for the F4, I will add those. I cannot comment for FMC and LTDC.

Giovanni

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Postby Tectu » Wed Feb 03, 2016 12:56 am

We built a project using ChibiOS/RT 3.0.1 and uGFX for the STM32F429i-Discovery board based on the example project that comes with the uGFX library. Everything worked nicely out of the box.
We uploaded the complete project to our homepage. The archive contains everything you need. Just execute 'make' and you should end up with a working project.

As I understand ChibiOS 16 is just a bundle of ChibiOS/RT, ChibiOS/NIL and ChibiOS/HAL. Therefore you should be able to use ChibiOS 16 by just updating the path in the project Makefile.

Download link: http://ugfx.org/download.html
Corresponding uGFX forum thread: http://forum.ugfx.org/viewtopic.php?f=23&t=347


~ Tectu

MobileWill
Posts: 27
Joined: Sat Jan 30, 2016 8:44 am

Re: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Postby MobileWill » Wed Feb 03, 2016 2:30 am

Giovanni wrote:hi,

Apparently some SPI5-related definitions are missing for the F4, I will add those. I cannot comment for FMC and LTDC.

Giovanni



I had some success with the community drivers. I am going to try the make packages that was posted today.

By the way how do I know which version of the LLD folders to us? I have been just trying different ones till it works.

Thanks for adding the missing definitions.

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: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Postby Giovanni » Wed Feb 03, 2016 9:01 am

Hi,

Look at the platform.mk file for your device, the correct drivers are listed in there.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 14 guests