extra UARTS in STM32L1xx_HD

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

Moderator: RoccoMarco

Post Reply
space_lord
Posts: 2
Joined: Thu Sep 12, 2013 11:31 am

extra UARTS in STM32L1xx_HD

Post 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 :)
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: extra UARTS in STM32L1xx_HD

Post 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
space_lord
Posts: 2
Joined: Thu Sep 12, 2013 11:31 am

Re: extra UARTS in STM32L1xx_HD

Post 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
Post Reply