I have the problem with the DMTIMER1 (1ms timer) as follow:
1- The DMTIMER1 after being configured and as part of the configuration for that timer the last step is to send the soft reset command then to monitor the reset done status . The reset done status never showed done.
In this case, the CLOCK source is configured to use external 32KHz.
2- Because #1 was failed, I have tried to use the internal clock source but this also failed plus I am not sure the correct way to onfigured the processor to use the internal clock source.
I need help to be sure the internal clock source is configured properly.
And I also need help to analyze the the processor failed case.
The following the code fragment show the clock selection:
/*! \details select the clock source for the 1ms timer
*/
void BSP_SetupClockSrc(void)
{
RTCWriteProtectDisable(SOC_RTC_0_REGS); //Write to Kick0 and Kick 1
RTC_OSC_RegStruct tOSC_Reg;
tOSC_Reg.All = HWREG(SOC_RTC_0_REGS + RTC_OSC);
tOSC_Reg.Bit.RES_SELECT = 0u; //select internal resistor
#ifdef INTERNAL_CLKSRC //Internal clock source
tOSC_Reg.Bit.SEL_32KCLK_SRC = 0u; //select Internal clock source
tOSC_Reg.Bit.OSC32K_GZ = 0u; //select Enable OSC32K Osc
#else //External clock source
tOSC_Reg.Bit.SEL_32KCLK_SRC = 1u; //select External clock source
tOSC_Reg.Bit.OSC32K_GZ = 0u; //select Enable OSC32K Osc
#endif
HWREG(SOC_RTC_0_REGS + RTC_OSC) = tOSC_Reg.All;
if (HWREG(SOC_RTC_0_REGS + RTC_OSC) != tOSC_Reg.All)
{
//Sysfail here
}
RTCWriteProtectEnable(SOC_RTC_0_REGS); //enable the RTC write protect
}