Hi all,
I am working on an application where i need to maintain 32MHz clock all the time in my peripheral device. I have called following function in SimpleBLEPeripheral_Main.c just before osal_start_system() is called in main().
void initialise(void)
{
// Set system clock source to HS XOSC, with no pre-scaling.
CLKCONCMD = (CLKCONCMD & ~(CLKCON_OSC | CLKCON_CLKSPD)) | CLKCON_CLKSPD_32M;
// Wait until clock source has changed.
while (CLKCONSTA & CLKCON_OSC);
}
Since i am calling above function after HAL_BOARD_INIT(), it should overwrite the initial clock settings. I have disabled POWER_SAVING. Even after calling above function the clock changes. I am using SimpleBLEPeripheral project.
1)How can i maintain 32MHz clock setting all the time.
2)If i am processing for loop for longer time(10sec suppose), will osal event(set for 5sec) occur then also to process the osal event and come back again to process the for loop?
Thanks