DA14699 SDK D2522_SDK_10.0.1.52
When I start the software, I've noticed that the clock speed seems wrong for about 9s. I'm trying to understand what is going on. The OS is FreeRTOS, and my timers are based around FreeRTOS primitives. The FreeRTOS port appears to be using the 32,768Hz low power clock as its ticker. I've set a timer to toggle a digital output every 250ms (approx since ticks are 1/512 seconds). What is see is that the output is toggled every ~294.2ms for about 9s, and then switches to toggling at precisely 250ms. The ratio of these values is 1.177. I suppose it is conceivable that the 32,000Hz RC clock is being used for a while, and then the 32,768Hz takes over (ratio 1.024 if the RC clock is accurate). The discrepancy between the ratios seems large, though.
Can anyone suggest what might be causing this? I assume its something I have done or not done in my code, perhaps relating to the power manager, but I originally modeled my code on one of the examples.
We are trying to upgrade the SDK (breaking changes in the drivers), and have found that the device just goes to sleep after the 9s period. Aside from bringing in the new SDK and making necessary changes to the project code, nothing else was changed.
Cheers
Al
I've been told that this might relate to the time taken by the SDK to initialise and calibrate the crystal, or something like that. That sounds like a long time...
Hi UnicycleBloke,
During first 8 seconds, the device is awake and in this period is the XTAL32 settling procedure. To do so, it is expected that you don’t get accurate results because crystal is not settled yet and that’s why the system cannot be in sleep mode. After 8 seconds, which is the optimal duration, which is calculated for crystal settling, the XTAL32 has been settled, so that it can be used as a Low Power clock and the system can be put in sleep mode.
Thanks, PM_Dialog