This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Beginner USART

Hi my name is Etienne, I am new to microcontrollers and I'm still banging my head against the wall.  

I would like to run a simple USART printf function to get things going.

To keep it short,  Ive got Keil uVision5, a STM32F103 Nucleo,using the 'pack installer' to load up a blinky program works fine,  but as soon as I try to use some of the library functions like
USART_StructInit();,  i get:
warning: implicit declaration invalid in C99,
then I go into RTE manager, add and resolve USART StdPeriph Drivers,
now USART_StructInit(); has too few arguments, and USARTInit() is undefined.

Is there any resource which explains how to use Peripheral Library functions, step by step?
I am having such a hard time finding code examples that work!

...spent a few hours trying to get the MCBSTM discovery examples to run, to no avail.
...spent another few hours trying to step-by-step with the data sheet, still no luck.

any advice greatly appreciated
/etienne

  • Functions such as USART_StructInit() is a part of STM32F10x Standard Peripherals Library from ST, which is not included in the DFP from Pack Installer. For more details about how to use this STM32F10x Standard Peripherals Library you'd better asking ST directly.

    On the other hand, if you just need printf() for debugging, instead of output over USART, you can enable/connect SB15 on the board to enable the SWO trace and redirect your stdout to ITM trace so that you can see your printf in the Debug(printf) Viewer in µVision.