cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F205RGT6 UART code not working properly

bhavin
Associate II
Posted on January 06, 2017 at 08:19

Hello,

i am using STM32F205RGT6 microcontroller i just want to run UART code.i just download the 'STM32Cube_FW_F2_V1.4.0' library and i don't modify any thing in this code.in this library i try with 'UART_Hyperterminal_IT' and 'UART_Printf' both but not works.but i am facing some problems.please try to solve my below query:

1) when i run the UART code and observe on terminal i see the garbage values are printed.

i attached my code for your reference.

Any help in this will be appreciated more.

Thank You

 Bhavin
6 REPLIES 6
Khouloud GARSI
Lead II
Posted on January 06, 2017 at 17:36

Hi

Maru.Bhavin

,

I think your using your own PCB. So, please make sure that the your clock settings are aligned with the ones used in the examples.

'i try with '

UART_Hyperterminal_IT

' and '

UART_Printf

' both but not works.but i am facing some problems.

1) when i run the UART code and observe on terminal i see the garbage values are printed.'

-> For further investigation, please indicate

your Hyperterminal configuration:

data size

,

parity,

BaudRate...

And could you send me a screen shot of data displayed onthe Hyperterminal when you're using

'

UART_Hyperterminal_IT

' or '

UART_Printf

' examples.

Best regards,

Khouloud.

Posted on January 06, 2017 at 20:57

Does your board have a 25 MHz HSE crystal? Or an 8 MHz one? This alone would explain garbage data appearing on them terminal. as the data is coming out at the wrong speed.

Provide some more context about what exactly you are running it on, the CPU itself does not infer enough information.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on January 09, 2017 at 05:39

Hi Clive One,

Thank you for your reply my board has ESA8.00000F20D25F(8 Mhz) crystal.

141397CGIL2
Posted on January 09, 2017 at 07:15

You need to make sure the PLL and HSE_VALUE reflect that it is using an 8 MHz clock and not 25 MHz, which is the default for the EVAL series boards.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Khouloud GARSI
Lead II
Posted on January 09, 2017 at 10:07

Hi

Maru.Bhavin

,

You should:

  • Change the 'Data' section value to 7 bit (Tera Term: Serial port setup).
  • and the external oscillator value (HSE)should be equal to 25MHz.

Regards,

Khouloud.