2021-03-27 11:56 AM
Hi,
I want to send data from my STM32 Nucleo board to the PC. I am new to STM32 field.
Like in other MCU we use Serial.write(), is there something similar in STM32?
2021-03-27 02:12 PM
if (HAL_UART_Transmit(&Uart2Handle, (uint8_t*)string, strlen(string), 5000)!= HAL_OK)
{
Error_Handler();
}
2021-03-30 03:13 AM
Thanks. I am using SubGHz_Phy application on STM32WL55JC board. https://github.com/STMicroelectronics/STM32CubeWL/tree/main/Projects/NUCLEO-WL55JC/Applications/SubGHz_Phy/SubGHz_Phy_PingPong
When I used -
char bufftr[] = "AP";
HAL_UART_Transmit(&huart2, (uint8_t*)bufftr, strlen(bufftr), 0xffff); Nothing gets displayed on the Serial port. Just below this, I am also using APP_LOG(TS_ON, VLEVEL_L, "4\n\r"); and 4 is getting displayed on the serial port.
I am not sure why HAL_UART_Transmit(&huart2, (uint8_t*)bufftr, strlen(bufftr), 0xffff) is not able to send data to serial port?