cancel
Showing results for 
Search instead for 
Did you mean: 

Using usart code made with stm32f4 with stm32f302 register level

YBAYR.1
Associate III

hi, i want to use the code from controllertech site with stm32f302r8. how should i set the registers.

https://controllerstech.com/ring-buffer-using-head-and-tail-in-stm32/

the part where i get the error is how do i do the register parts.


_legacyfs_online_stmicro_images_0693W00000bjmAwQAI.png 

3 REPLIES 3
LCE
Principal

Compare the registers from both reference manuals, bit by bit.

Compare the register and bit definition files.

Newer parts use ISR not SR, and DR has distinctive RDR and TDR for receive and transmit.

Watch also for how errors are cleared, ie parity, framing, noise. Not cleared by reading DR, but by explicitly writing a bit to clear.

Look at Library source for understanding, you don't have to use it, its available as a secondary reference / perspective.

And RTFM..

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

MY PROBLEM IS SOLVED THANK YOU