CPU and APB Frequency support (#2220)

* Add support to HAL for APB frequencies different than 80MHz

* Add support for CPU frequencies in the IDE board menu

* Switch to fast set_config

* Add method to uart so debug can be reassigned after apb frequency switch

* Return real APB frequency
This commit is contained in:
Me No Dev
2018-12-20 01:57:32 +01:00
committed by GitHub
parent 1628f533a1
commit c827bb4177
9 changed files with 101 additions and 34 deletions

View File

@ -72,8 +72,14 @@ void yield(void);
//returns chip temperature in Celsius
float temperatureRead();
bool cpuFrequencySet(uint32_t cpu_freq_mhz);
uint32_t cpuFrequencyGet();
//function takes the following frequencies as valid values:
// 240, 160, 80 <<< For all XTAL types
// 40, 20, 13, 10, 8, 5, 4, 3, 2, 1 <<< For 40MHz XTAL
// 26, 13, 5, 4, 3, 2, 1 <<< For 26MHz XTAL
// 24, 12, 8, 6, 4, 3, 2, 1 <<< For 24MHz XTAL
bool setCpuFrequency(uint32_t cpu_freq_mhz);
uint32_t getCpuFrequency();
uint32_t getApbFrequency();
unsigned long micros();
unsigned long millis();