Page 1 of 1

extra UARTS in STM32L1xx_HD

Posted: Thu Oct 23, 2014 9:12 am
by space_lord
Hello

I am working on a custom board with the STM32L152VD, using Chibistudio preview 7. I've set up the necessary board files, linker script etc, and managed to get a blinker and GPIO functionality working properly. based on the examples, but ran into a problem when trying to use UART4, namely I keep getting this error when I use the serial driver:

error: 'SD4' undeclared (first use in this function)

The code I'm using has been working properly on another (custom) STM32F103 board, so i probably haven't missed any declarations/initialisations etc... Also it compiles and works with no errors when I use SD1,2, or 3 instead of SD4

The L152xD is a high density device (HD) and has two more UARTS than MD devices. This is what I am trying to activate. I edited the mcuconf.h file and added the necessary #defines to use UART4.
I also noticed that in the STM32.h file there is provision for STM32L1XX_HD devices. However when I set #define STM32L1XX_HD in board.h, apart from that error I also get:

warning: missing initializer [-Wmissing-field-initializers]

Anyway, I also checked the STM32L152RE-NUCLEO example, which also uses a HD device, but defines it as a MD device in board.h. Unfortunately it doesn't use any of the extra UARTS...

Any pointers to what I should modify or what I am missing to get SD4 working would be greatly appreciated.

Cheers :)

Re: extra UARTS in STM32L1xx_HD

Posted: Thu Oct 23, 2014 9:19 am
by Giovanni
Hi,

I assume you are using version 2.6.6. The 2.6 branch uses the old ST header so newest devices are not fully supported.

You may try the new 3.0 version by taking it directly from the subversion repository, in this version the STM32 support has been greatly improved.

http://svn.code.sf.net/p/chibios/svn/trunk

Giovanni

Re: extra UARTS in STM32L1xx_HD

Posted: Thu Oct 23, 2014 9:51 am
by space_lord
Thanks for the super-fast reply Giovanni.

Yes, I am using 2.6.6. I'll give it a try with 3.0 and let you know

Also thanks for the awesome ChibiOS project :)
cheers