Xtensa ESP32: Clock frequency is different if running from IRAM or is booting from FLASH. This is a booltloader issue.
This commit is contained in:
parent
59c5ae3eae
commit
89c33e9799
@ -50,15 +50,22 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Clock reconfiguration is currently disabled, so the CPU will be running
|
/* Clock reconfiguration is currently disabled, so the CPU will be running
|
||||||
* at the XTAL frequency.
|
* at the XTAL frequency or at two times the XTAL frequency, depending upon
|
||||||
|
* how we load the code:
|
||||||
|
*
|
||||||
|
* - If we load the code into FLASH at address 0x1000 where it is started by
|
||||||
|
* the second level bootloader, then the frequency is the crystal
|
||||||
|
* frequency.
|
||||||
|
* - If we load the code into IRAM after the second level bootloader has run
|
||||||
|
* this frequency will be twice the crystal frequency.
|
||||||
|
*
|
||||||
|
* Don't ask me for an explanation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
#ifdef CONFIG_ESP32CORE_RUN_IRAM
|
||||||
# define BOARD_CLOCK_FREQUENCY 80000000
|
|
||||||
#else
|
|
||||||
/* Hmmm... actually appears to be running at about 2 x the XTAL frequency */
|
|
||||||
|
|
||||||
# define BOARD_CLOCK_FREQUENCY (2 * BOARD_XTAL_FREQUENCY)
|
# define BOARD_CLOCK_FREQUENCY (2 * BOARD_XTAL_FREQUENCY)
|
||||||
|
#else
|
||||||
|
# define BOARD_CLOCK_FREQUENCY BOARD_XTAL_FREQUENCY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __CONFIGS_ESP32_CORE_INCLUDE_BOARD_H */
|
#endif /* __CONFIGS_ESP32_CORE_INCLUDE_BOARD_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user