Removal of 48Mhz setting in Libmaple core

Post here first, or if you can't find a relevant section!
Post Reply
User avatar
RogerClark
Posts: 7422
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Removal of 48Mhz setting in Libmaple core

Post by RogerClark » Tue Nov 14, 2017 6:04 am

Guys

Its been pointed out to me that there is very little use for the 48Mhz setting that I added a while ago
Current consumption is not greatly reduced.

For really low current we'd need to have a 8 or 16Mhz option instead, but IMHO this option would also rarely be used as its generally more efficient to run the CPU at normal speed 72MHz when processing and use a low power sleep mode when processing is not required.

There is a PR to add the 8 and 16Mhz modes, but I think that it would be better just to have a code snippet people could use for this, rather than adding this option to boards.txt (which is already very verbose)

BTW. I will retain the overclock mode even though it does not support USB, as it increases processing speed by around 60%, which may be handy for anyone how wants to push the boundaries

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

Re: Removal of 48Mhz setting in Libmaple core

Post by stevestrong » Tue Nov 14, 2017 10:28 am

I think I used the 48MHz clock to generate different SPI clock pulses which were not possible with 72MHz clock.
For instance 24MHz can be used with some 3.5 inch LCD panels which do not support 36Mhz.

User avatar
Pito
Posts: 1626
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Removal of 48Mhz setting in Libmaple core

Post by Pito » Tue Nov 14, 2017 10:34 am

I would not remove options unless they cause troubles..
Pukao Hats Cleaning Services Ltd.

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

Re: Removal of 48Mhz setting in Libmaple core

Post by RogerClark » Tue Nov 14, 2017 11:16 am

OK.

I didnt realise it had other uses.

I will not remove it

User avatar
mrburnette
Posts: 1877
Joined: Mon Apr 27, 2015 12:50 pm
Location: Greater Atlanta
Contact:

Re: Removal of 48Mhz setting in Libmaple core

Post by mrburnette » Tue Nov 14, 2017 1:38 pm

RogerClark wrote:
Tue Nov 14, 2017 6:04 am
<...>
...but I think that it would be better just to have a code snippet people could use for this, rather than adding this option to boards.txt (which is already very verbose)
A WiKi example of editing the awesome boards.txt file to add an new option with a short caveat (USB, etc.) would be useful to those that wish to craft their own boards.txt file.

Generally speaking, I'm not a proponent of adding options to the boards.txt file beyond what is known to be required for general usage. Beyond that, forum members need to educate themselves on the underpinnings of how this whole ArduinoIDE actually works and toward that end, quality documentation is the first step. I see no reason why you (Roger) should be looked to to maintain numerous and little used options that just complicate and confuses the maintenance of the STM32F1xx core.

Arduino.cc discusses the boards.txt file here. IMO, for those pull requests for other frequency options beyond the current 48MHz and 72MHz, the relevant text can be committed to the WiKi.

Ray

Post Reply