2024-02-28 02:25 AM
Hi there,
I have a gps receive code on f411 black-pill, and it is work fine. Recently, the system updated software packages to F4 1.28.0, found that the HAL library HAL_UART_Transmit does not work on each UART tx port, but HAL_UART_Receive_IT normal, I wonder if anyone is experiencing the same problem, and how to solve it. The function of HAL_UART_Transmit just use for printf as following
int __io_putchar (int ch)
{
HAL_UART_Transmit (&huart1, (uint8_t *)&ch, 1, 0xFFFF);
return ch;
} /* __io_putchar() */
2024-02-28 02:31 AM
Please use this button to properly post source code:
You're not checking the return value of HAL_UART_Transmit - you should do that, and see if it's giving you an error code to identify what's going wrong.
Have you tried stepping into HAL_UART_Transmit to see what's happening?
2024-02-28 04:02 AM
2024-02-28 04:09 AM
How do you determine that it's not transmitting?
Have you checked for activity at the STM32 pins ?
2024-02-28 05:04 AM
Hello,
Before going to use printf(), try HAL_UART_Transmit() in a simple example and as said by @Andrew Neil you need to check an activity on UART TX pin. If there is nothing outputted you have to share you code as we can help you efficiently.
As ST we don't support neither black-pill boards nor other X-pill flavors, but we can have a try ..
2024-02-28 07:18 AM - edited 2024-02-28 07:19 AM
@JamesLin wrote:Recently, the system updated software packages to F4 1.28.0, found that the HAL library HAL_UART_Transmit does not work ... but HAL_UART_Receive_IT normal
Similar: