langwadt / grbl_stm32

grbl for stm32 with nucleo stepper drivers
32 stars 33 forks source link

Serial Connection Garbage Data #8

Closed nsiatras closed 8 years ago

nsiatras commented 8 years ago

Hello,

I imported the code to a new project, using the System Workbench,targeted to Nucleo -F401RE. The code builds perfectly fine but as I try to connect to the serial com port I get garbage data. I am thinking that this is something that has to do with the clock (HSE_VALUE, HSI_VALUE etc..)

Do you have any idea on what this error might be ?

Thank you

langwadt commented 8 years ago

It is probably related to the clock and baud rate setup, but I don't have a board with a 401 so I can't easily debug it

nsiatras commented 8 years ago

Do you use an external oscilator on your board? I dont...

langwadt commented 8 years ago

I don't have an external oscillator, I use the 8MHz from the debugger. try changing the line

define HSE_VALUE ((uint32_t)25000000)

to

define HSE_VALUE ((uint32_t)8000000)

in the file CMSIS/device/stm32f4xx.h

nsiatras commented 8 years ago

I tried it but still garbage data comes out from the serial...

langwadt commented 8 years ago

did you define the compiler settings to 401 instead of 411?