Changing Oscillator for Flash Programming

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
pcat
Posts: 5
Joined: Wed Sep 07, 2016 9:14 am

Changing Oscillator for Flash Programming

Post by pcat »

Hi,

I have the need to store calculated values, I decided I would use a Page of the Flash Memory on the STM32F103VCT

I realise all Threads/Drivers/VTimers etc need to be stopped, I was hoping I could stop, do the Flashing and start the OS and carry on.
After a lot of head scratching I read the data sheets again and it states the HSI Internal High speed Oscillator must be enabled.

I am using the HSE as I have an 8Mhz Xtal for timing accuracy as my project uses CAN Bus communication.
As we know this is set in the mcuconf.c file and I guess the clocks are setup by the __early_init() function.

If I can change the HS Oscillator would it make sense just to Reboot ?
Best regards
Paul
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Changing Oscillator for Flash Programming

Post by Giovanni »

Hi,

HSI must be enabled not necessarily used. By default it is enabled even if you run from HSE.

Yes, clocks are setup in __early_init().

Giovanni
Post Reply