2023-08-24 07:34 PM
Lately, I have been trying to program the UART module of the STM32F746ZG. The program didn't work at all. I tried programming the USART module as a UART. The program worked. I then noticed that the reference manual does not talk much or barely anything about UART4 to UART7. They only focus on the USART modules. This got me thinking, "Is the UART Module on the STM32F746ZG based on a different manufacturer architecture". If so, which one? Because the ARM cortex M7 generic user guide doesn't have anything on UART.
2023-08-24 10:16 PM - edited 2023-08-26 03:51 AM
UART in STM32 is identical to USART, just simply has the synchronous logic omitted.
If your program did not work, there was an error in it (that includes any library you were using).
JW
2023-08-25 07:10 AM
The U(S)ART isn't an M7 feature, it's an STM32 peripheral and would be covered in the reference manual. It is ST's creation.
2023-08-28 05:36 PM
I tried programming USART1 and USART2 with the same program. But with some peripheral changes. USART2 works, but USART1 doesn't. Which is something I find strange.
2023-08-28 05:51 PM - edited 2023-08-28 05:51 PM
They should program nearly identically. They are on different APB, and will need clocks enabling.
It's a lot easier to understand "not working" if you show the code you're attempting to use..
2023-08-28 05:52 PM
2023-08-28 05:55 PM - edited 2023-08-28 10:22 PM
This is a simple program I wrote for USART1 on the STM32F042K6. I couldn't get it to work for USART1. But it does work for USART2. The same applies to the STM32F746ZG.
2023-08-28 10:23 PM - edited 2023-08-28 10:25 PM
S
2023-08-29 04:12 AM
When in doubts, start with reading out registers of related peripherals (here, USART and GPIO) and checking whether they are set as intended.
Also, make sure the pins have the connectivity you assume they have. A simple test is to set them as GPIO output, toggle and measure.
JW
2023-08-29 12:51 PM
Code for the F042 surely isn't going to work on the F746. Show the UART4 and UART7 code, or the USART1 vs USART2 code that work / don't work. Lets stick with one architecture and one problem.
The AFR setting will almost certainly be different, and best not done with blind/blanket writes.
The presented does or does not work? Show the USART2 code that works as the counter-point
This does what? USART1SW = 0 ? Baud = 57600 ?