I am using CCS 5.4, Tivaware 2.0 and a TM4C1`23BE6PZ. I would like to use SysCtlMOSCConfigSet and SYSCTL_MOSC_VALIDATE to avoid trying to use an non-existent XTAL in SysCtlClockSet.
The code is:
SysCtlMOSCConfigSet(SYSCTL_MOSC_VALIDATE); SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_20MHZ);
I step past the first function call, but when I step past the second call I end up in the FaultISR. It has the same feel as addressing a peripheral that has not been enabled. But there is no SYSTCTL_PERIPH_MOSC_VALIDATE peripheral.
When I comment out the first call, the program executes as expected.
I find this call documented in the Tivaware user guide, but only one example of the call in the examples using a different argument.
On another target I use the SYSCTL_MOSC_NO_XTAL arg with no issue.
Using the ROM_ version of the call does not help.
Is there an example of calling the MOSC validation functionality?
Is there something else I need to be doing to get this to work?
I replace the function call with:
HWREG(SYSCTL_MOSCCTL_R) = SYSCTL_MOSC_VALIDATE;
And my program runs as expected.
While in emulation, I do not see the register's value change using either method.