This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

UART Baud rate CMSIS Drivers

Hi all,

I am working with the STM32F7 Disco, trying to use USART6 with CMSIS Drivers and RTOS (v1). With the ARM_USART_Control function, I can control the argument of Baud Rate, such as 9600, 115200... I had already tried on MCB1768 and it was working as expected. With the Disco board, I can send and receive bytes, but the baud rate is not correct. By instance, if I want a baud rate of 115200, the argument has to be about 10700 (this value obtained after some "scaling" tests) instead of 115200. 

Do you have an idea where this is coming from?

Thank you, best regards

Xavier

Parents
  • the idea of a library is to use the associated functions, not really to search into it

    Of course, that's true.

    But, as , the quickest way for you to actually fix this and get your system working is most likely for you to step through the code and see what's happening.

    Plus, of course, this is an essential skill - and well worth practising!

    If you have a Keil licence, perhaps you could contact Keil for direct support (not sure if the Keil support extends to CMSIS?)

    The UART library has 3839 lines, that are not easy to understand

    That's why we suggest stepping through it - rather than trying to figure it out statically from reading the source!

    reason of such a difference between the actual UART clock value and the one expected

    The most common reason - in any microcontroller code - is that the clock is not running at the speed you thought it was (and, in chips like the STM32, there is the added complication of having many different clocks to choose from!)

Reply
  • the idea of a library is to use the associated functions, not really to search into it

    Of course, that's true.

    But, as , the quickest way for you to actually fix this and get your system working is most likely for you to step through the code and see what's happening.

    Plus, of course, this is an essential skill - and well worth practising!

    If you have a Keil licence, perhaps you could contact Keil for direct support (not sure if the Keil support extends to CMSIS?)

    The UART library has 3839 lines, that are not easy to understand

    That's why we suggest stepping through it - rather than trying to figure it out statically from reading the source!

    reason of such a difference between the actual UART clock value and the one expected

    The most common reason - in any microcontroller code - is that the clock is not running at the speed you thought it was (and, in chips like the STM32, there is the added complication of having many different clocks to choose from!)

Children