SPRUJB6B November 2024 – May 2025 AM2612
The TMU accelerator result registers support a context save and restore feature so that the TMU hardware can be used in an ISR (Interrupt Service Routine) context while simultaneously being used in the Main function.
When an interrupt occurs, and thus triggers an ISR, the context save can be initiated by writing ‘1’ to the CONTEXT_SAVE.SAVE bit. TMU result registers are saved to CSAVE_<*> registers. A context save will happen only after all operations initiated before writing to CONTEXT_SAVE.SAVE are complete. This is to ensure that the context save happens at the correct point.
Even though TMU operations are multi-cycle, the TMU operation will have completed by the time a context save operation is initiated in the ISR. Therefore, no additional measure is needed in ISR. After saving the context, the ISR can use the TMU without any restriction.
Restoring TMU registers from CSAVE_<*> registers can be initiated by writing ‘1’ to CONTEXT_RESTORE.RESTORE. This is done as the last step of the ISR before returning to the Main function from the ISR.