AnsweredAssumed Answered

STM32 nucleo-053 - USART issue

Question asked by Bogdan Golab on Jun 11, 2014
Latest reply on Jun 30, 2014 by Montassar BEN ROMDHANE
I am familiar with Standard Pheripheral Library on STM32F100 MCU.
The problem is that on nucleo-053 (SPL is not available for this MCU) I cannot make USART working properly.
I generated the code using CubeMX 4.2 (USART2 enabled, NO parity, 1 stopbit, 8 data bits). When I use the following piece of code:

    uint8_t pData[40];
    int k;   
    HAL_UART_Transmit(&huart2, pData, 40, 10);

only numbers and @ are sent correctly. Letters ('abcd', etc ) are displayed as if they have extended ASCI codes (extra bit was added in front of the original code making it extended code). I know that for 9B & parity the HAL driver plays this way. But it's not the cae, I guess (no 9B & parity).

I do not use physical uart port - Virtual COM is used (ST-link 2.1 feature).
Anyway, could you please share USART code example for nucleo-L053?