Optimisation and clock speed menu - enhancements

Information on the latest releases
edogaldo
Posts: 291
Joined: Fri Jun 03, 2016 8:19 am

Re: Optimisation and clock speed menu - enhancements

Post by edogaldo » Thu Oct 12, 2017 10:04 am

RogerClark wrote:
Mon Jul 31, 2017 3:11 am
BTW. I've updated the repo so there is a much bigger warning in upper case which reads

Overclocked 128Mhz NO USB SERIAL. MANUAL RESET NEEDED TO UPLOAD
Hi Roger, if you are adding unsupported options (i.e. 128MHz overclock) then I'd suggest also "HSI@48MHz with USB", not officially supported but seems working and could be useful for people having issues with HSE..
Here a sample on how to implement it: http://stm32duino.com/viewtopic.php?f=58&t=2676

Best, E.

[edit]This mode could be even more useful in the Maple bootloader.

User avatar
RogerClark
Posts: 7681
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Optimisation and clock speed menu - enhancements

Post by RogerClark » Thu Oct 12, 2017 8:29 pm

Thanks.

Can you explain when this would be used ?

Is it for people who want to build their own board without the High Speed External crystal ( normally 8 Mhz) ?

edogaldo
Posts: 291
Joined: Fri Jun 03, 2016 8:19 am

Re: Optimisation and clock speed menu - enhancements

Post by edogaldo » Thu Oct 12, 2017 9:33 pm

It could be useful to provide usb features (ie dfu or serial usb) to custom boards missing the HSE or for boards with defective HSE.

alexandros
Posts: 73
Joined: Mon Oct 02, 2017 6:51 pm

Re: Optimisation and clock speed menu - enhancements

Post by alexandros » Tue Feb 20, 2018 1:24 pm

Hi Guys.

i want to add 96MHZ option in arduino IDE.just for test purposes
if i go to Boards.txt and add this red line into this section


#-- CPU Clock frequency
genericSTM32F103C.menu.cpu_speed.speed_96mhz=96Mhz (My Speed)
genericSTM32F103C.menu.cpu_speed.speed_96mhz.build.f_cpu=96000000L

genericSTM32F103T.menu.cpu_speed.speed_72mhz=72Mhz (Normal)
genericSTM32F103T.menu.cpu_speed.speed_72mhz.build.f_cpu=72000000L

genericSTM32F103T.menu.cpu_speed.speed_48mhz=48Mhz (Slow - with USB)
genericSTM32F103T.menu.cpu_speed.speed_48mhz.build.f_cpu=48000000L

genericSTM32F103T.menu.cpu_speed.speed_128mhz=Overclocked 128Mhz NO USB SERIAL. MANUAL RESET NEEDED TO UPLOAD
genericSTM32F103T.menu.cpu_speed.speed_128mhz.build.f_cpu=128000000L


So if i choose 96MHZ and just compile the sketch i am getting the following error ,

C:\Program Files (x86)\Arduino\hardware\Arduino_STM32-master\STM32F1\variants\generic_stm32f103c\wirish\boards_setup.cpp:63:49: error: 'BOARD_RCC_PLLMUL' was not declared in this scope

static stm32f1_rcc_pll_data pll_data = {BOARD_RCC_PLLMUL};



its obviously that something is missing , can somebody help me how to solve this?

stevestrong
Posts: 2057
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: Optimisation and clock speed menu - enhancements

Post by stevestrong » Tue Feb 20, 2018 2:16 pm

Insert to https://github.com/rogerclarkmelbourne/ ... up.cpp#L53 following piece of code:

Code: Select all

#elif F_CPU==96000000
		#define BOARD_RCC_PLLMUL RCC_PLLMUL_12

alexandros
Posts: 73
Joined: Mon Oct 02, 2017 6:51 pm

Re: Optimisation and clock speed menu - enhancements

Post by alexandros » Tue Feb 20, 2018 2:26 pm

It works Thank you ,
I wonder if i can change from 72 to 96 and vice versa on runtime

Post Reply