cancel
Showing results for 
Search instead for 
Did you mean: 

Why is my CubeMx created USART not running?

NGros
Associate III

Hi Guys,

I created a Keil5 project with CubeMX. In this project, i only created a USART (USART1) periphery application. So simple as that. BUT: My usart seams not to run. I enabled it by "HAL_USART_ENABLE_IT" in the setup and call the "HAL_USART_RECEIVE_IT" in the USART1_IRQHandler function. Secondly i tried to enable RCC-Clock by "__HAL_RCC_USART1_CLK_ENABLE();", but my buffer was still empty.

In the Debug Session, i made a Screenshot of the huart1 variable. There you can see the values of every Register during debugging. They stay all the same, so no chasnges during debugging.

Do you see anything I missed for calling? The USART clock should be connected with the usart periphery automatically by using CubeMX, souldn't it?

Thank you and have a nice day.

3 REPLIES 3

Only seeing 3 files. ZIP up compilable projects don't attach multiple files.

Not sure what board or what pins are involved.

Check GPIO pins and clocks

Check HSE_VALUE define and PLL setting relative to chosen clock source/parts.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
NGros
Associate III

Hi, I already found the mistake, was a pure pin fault...

I'd like to explain my question as done, where do I do that?

Select your own answer as being correct, assume it uses the little V icon in the top right of the reply.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..