AnsweredAssumed Answered

CubeMX timing

Question asked by e d on Jun 7, 2017
Latest reply on Aug 1, 2017 by Guru Vel

Hi guys,

I am running into some timing issue using CubeMX, probably after upgrading to the latest version. A couple of weeks ago I noticed my SysTick running roughly twice as fast as expected (half of 1ms) so I changed my 1ms systick to Timer2 which worked fine. Today I turned on my USART3 for the first time at 9600 BAUD and could not get the HyperTerm to receive correctly (all garbage). Then I took a closer look at the signal through the scope and noticed the BAUD was actually at about 23KBAUD, which was weird because I set it in the code as:

huart3.Init.BaudRate = 9600; 

After mucking around I got the HyperTerm to work normally by changing the BAUD setting to:

huart3.Init.BaudRate = 4000; // This is actually 9600 BAUD (verified with scope)

I have a hunch the BAUD rate issue is related to the SysTick issue. Anyone has this issue or is familiar with CubeMX to give me a clue here?