2014-08-05 03:16 AM
Hi, I have used STM32CubeMx to generate the initialization code for USART1 and USART2.
USART1 is 56700bps while USART2 is 9600bps. In the main, I could send data out to USART1 but was unable to send data out to USART2... What could be the issue??? I have tried setting up USART2 alone but also could not send data out. I am using the following code:int result = HAL_UART_Transmit(&huart2, uart2_data, sizeof(uart2_data), 1000);
if (result != HAL_OK) {
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET);
}
The result was HAL_OK...
#hal #stm32l0-stm32l0-discovery
2014-08-29 04:57 AM
Hello Eugene,
Note that on STM32L0 Discovery board, the USART2 can not be used reliably as the pins it uses (PA2/PA3 and alternate PA15) have been connected to the Linear Touch Sensor (PA2/PA3) and to the e-Paper display (SPI on PA15). [See board documentation for details] Best Regards2014-09-02 06:12 PM
Hi, thanks for the information :) Didn't read the manual carefully heh