I'm learning micro controller using STM32F429I-DISCOVERY board and have a question about non-blocking mode UART reception.

I compiled this example project(UART_TwoBoards_ComIT) and flashed the STM32 board with the binary file. Then I connected the UART1 pins on the STM32 board to Beaglebone Black's UART1 pins. The Beaglebone Black board uses Debian linux and a serial monitor 'minicom' so that it can communicate with the STM32 board via UART.

Then I could see " ****UART_TwoBoards_ComIT**** ****UART_TwoBoards_ComIT**** ****UART_TwoBoards_ComIT****" from the serial monitor. Up to here everything looked fine. But when I type a random letter in my serial monitor, I can't see that LED3 is toggled. I checked that the TX pin of the Beaglebone Black outputs digital signals at that time. I guess that the STM32 board doesn't receive any data from the Beaglebone Black board and enters to infinite loop, but I'm not confident..

Could you please explain why the LED3 is not toggled, even if my Beaglebone Black sends data to the STM32 board?

  • 1
    \$\begingroup\$ By your reading of the source code, what should happen? \$\endgroup\$ – pgvoorhees Jan 11 '17 at 13:16
  • \$\begingroup\$ @pgvoorhees oops... Thank you very much for the question. For the main.c I modified the instructions in the last while loop. I replaced the BSP_LED_Toggle(LED3); by HAL_UART_Transmit_IT(&UartHandle, (uint8_t*)aTxBuffer, TXBUFFERSIZE);. I edited my question for the case that I uses the source code without modification. \$\endgroup\$ – SD11 Jan 11 '17 at 13:26
  • \$\begingroup\$ Using your debugger, send a character then pause the execution. where in the code are you? \$\endgroup\$ – pgvoorhees Jan 11 '17 at 13:29
  • \$\begingroup\$ @pgvoorhees The programs stops at the line 139. I found that the HAL_UART_Transmit_IT function returns HAL_OK successfully. But the variable UartReady is not changed from RESET to SET. It looks like that the function HAL_UART_TxCpltCallback is not executed, even if the UART transmission is completed. \$\endgroup\$ – SD11 Jan 15 '17 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.