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