2021-08-25 12:11 AM
Hi,
I'm trying to use uart1 in stm32f411ce and I have a weird problem. in my test I am sending data from the stm32 to an arduino and printing the received data on the serial monitor. In the stm32 I'm sending bytes with the most significant part counting from 0x02 to 0xF2. the list significant part always transmits well but the LSP has a weird behavior. I made a table that shows the transmitted bytes and the received bytes.
thanks
2021-08-25 07:38 AM
I am trying to not use the HAL lib. But I should try same thing with the HAL to see if it's hardware and also check the tx register empty bit before transmit
2021-08-26 12:23 AM
Problem solved. After a couple of days I have decided to check the uart with lower main clock frq and apparently it works under 86mhz
2021-08-26 01:09 AM
Congrats!, clock issues are not the easyest to spot.
Maybe your XTAL pcb traces have huge capacitance or you placed the sligtly bigger than needed capacitors?(or youre using one of those RC resonators instead of a xtal)
You can figure out the real clock your chip is using by probing with an oscilloscope very fast PWMs or outputing master clock directly to a pin.
2021-08-26 01:49 AM
It may be the problem. My capacitors on the xtal lines are 30pF. I have chose this based on the load capacitance of my crystal.