Background:
I'm using the bare metal starterware as an example for my custom board using the AM3358 with an external 24Mhz crystal on OSC0.
I'm using a 1ms timer (DMTimer 4and an adjustable ms timer (DMTimer 6).
The RTC 32kHz external crystal is not populated on my board, so I have the timer set to use the OSC0 24Mhz clock.
For example with my 1ms timer, I have it set to auto-reload with a value of 0xFFFFA23F.
When the booloader runs, the BootMaxOppGet function detects deviceVersion "DEVICE_VERSION_2_1" and oppSupport "EFUSE_OPPNT_1000" (1Ghz).
Problem:
When my Bootloader runs, the processor gets set to 1Ghz and my timers are not accurate. (they are too fast)
Possible Solution:
If I force the bootloader support to be "EFUSE_OPP120_720" (720Mhz), all my timers are fine.
However, I'd like to run the processor at 1Ghz.
How can I calculate the correct timer values for 1Ghz when the calculations should be based in both cases on the 24Mhz clock according to the manual?