cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 nucleo-053 - USART issue

Posted on June 11, 2014 at 23:06

Hi,

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;   

    for(k=0;k<40;k++){pData[k]=48+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?

Thanks,

Bogdan

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on June 30, 2014 at 15:11

Hi bogdan,

You can download the STM32CubeL0 FW package from here: 

http://goo.gl/6yriy6

UART examples are available under: Projects\STM32L053R8-Nucleo\Examples\UART

With regards.

View solution in original post

1 REPLY 1
Posted on June 30, 2014 at 15:11

Hi bogdan,

You can download the STM32CubeL0 FW package from here: 

http://goo.gl/6yriy6

UART examples are available under: Projects\STM32L053R8-Nucleo\Examples\UART

With regards.