I'm having a rough time figuring out how to get the cc1312 into low power mode. I'm finally narrowed it down to the SCS code apparently not shutting down completely. I have all the settings I can find in SCS to low power, 2MHz, uninitialized states, etc.
The SCS code runs for about 30s (it enables an output and does some SPI transfers). Then I uninitialized it for another 30s (which is where I expect to see low power mode) and repeat.
Prior to the first SCS initialization, I sleep for 5 seconds just to verify it is in low power mode (i.e. microamps and below the capacity of my ampmeter). Once the SCS code starts, the whole thing runs around 0.75mA and stays there while the SCS is running or not.
The problem is that when I am done with the SCS, it does not drop back into low power mode.
To "end" the SCS, I do the following:
while(scifWaitOnNbl(0) != SCIF_SUCCESS); while(scifStopTasksNbl(BV(SCIF_SENSOR_DATA_OBJECT_TASK_ID)) != SCIF_SUCCESS); scifStopRtcTicks(); scifUninit();
But that doesn't appear to be enough and it continues to run at the higher current (when it should drop significantly following that code above).
Any thoughts?