Skip to main content
RLiu.11
Associate
October 3, 2021
Question

MCU : stm32h743ii. two usart problem

  • October 3, 2021
  • 3 replies
  • 725 views

i use two uart.(usart1 & usart2).

when i receive data(usart1), first, the program will into

"void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)".

but when i i receive data(usart2), second, the program will not into

"void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)".

is it bug ???

    This topic has been closed for replies.

    3 replies

    waclawek.jan
    Super User
    October 3, 2021

    Check the whole interrupt chain, from USART registers' content through NVIC registers, address of the real ISR being inserted properly into the vector table, the real ISR containing proper redirection to Cube's USART ISR handler, etc.

    JW

    TDK
    October 3, 2021

    Hard to know for certain. Perhaps it isn't configured correctly. Perhaps you are not actually receiving data. Perhaps you are receiving data but the clock rate is wrong so it's going to the error handler instead.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Tesla DeLorean
    Guru
    October 3, 2021

    >>is it bug ???

    No, it provides you with the instance/context of the UART involved. You could perhaps overload the structure, adding you own on the back-end to carry buffers, or state variables.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..