Page 1 of 1

ChibiOS 16 STM32F429 Disc and SPI5/FMC

Posted: Tue Feb 02, 2016 7:40 am
by MobileWill
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?

Re: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Posted: Tue Feb 02, 2016 10:06 am
by Giovanni
hi,

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

Giovanni

Re: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Posted: Wed Feb 03, 2016 12:56 am
by Tectu
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

Re: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Posted: Wed Feb 03, 2016 2:30 am
by MobileWill
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.

Re: ChibiOS 16 STM32F429 Disc and SPI5/FMC

Posted: Wed Feb 03, 2016 9:01 am
by Giovanni
Hi,

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

Giovanni