STM32L451 - runs on faster clock than IAR project

Discussions concerning TrueSTUDIO for STM32 9.0.0 and later versions.

Moderators: Markus Girdland, Mattias Norlander

Posts: 5
Joined: Tue Jan 01, 2019 7:49 am

STM32L451 - runs on faster clock than IAR project

Postby Mechi » Wed Jan 02, 2019 9:57 am

I converted a working project for our proprietary device from IAR to TS. The conversion went quite smoothly (I followed the directions and the project is straightforward)/
When I started running / debugging the project, I see that the LEDs are blinking much faster and the seconds counter is being updated exactly twice as fast after being programmed by TS than the original code on IAR.

I assume that the difference lies in the STM libraries of the TS vs. those of IAR (though they should be the same)...or something in the assembler file - because the sources are exactly the same.
But where?

What's interesting is that the RS485 communication at 921,600bps using USART3 is working at the correct BAUD rate.
Also, at the beginning of the code (after ClockInit() ) I printed out the following from both TS and IAR and received the exact same values:
GetSysClockFreq - 76,608,000 (0x490 F200)
GetHCLK 76,608,000 (0x490 F200)
GetPCLK1 76,608,000 (0x490 F200)
GetPCLK2 957,6000 (0x92 1E40)

Does anyone have any input for this?


Return to “TrueSTUDIO for STM32 discussions”

Who is online

Users browsing this forum: No registered users and 1 guest