2023-01-07 08:18 AM
I need receive data on UART and this uart should use an external clock (6.78MHz) and not system clock.
It's should be possible todo it, but I can't find a solution, is there an example?
I need set also a divisor on input clock for uart, is it possible?
I trying with STM32CubeMX but without success.
Thank you
2023-01-07 11:49 AM
What kind of processor or platform are you using?
What have you tried until now?
I had a quick look at RM0468 of the STM32H735 as an example and table 56 shows that depending on the u(s)art you are using base clock can be between 43 and the 137 Mhz, then with 8 x oversampling I think 6.78 Mhz should be possible.
However the data will be coming in fast, so I possibly DMA will be necessary to process your input data fast enough.
There is a clock configuration tab in MX where you can define the clocks that drive the various components in the processor. The U(S)ART then has its own devisors that complete the story.
If I was in your shoes, I would start by sending characters with a UART, and try to receive them with the processor and then gradually introduce complexity, increase baud rates switch from UART to USART etc.
2023-01-07 12:12 PM
Sorry I forgot to write mcu in the text, but it's only in the title, anyway the mcu is STM32WB55.
I'm developing on board nucleo2b55.
Until now I tried to generate code with STM32CubeMX and study the datasheet to understand
what settings should i make.
I tried to configure that clock with CubeMX but the result is "I can't find a solution".