SPRU514Z July 2001 – October 2023 SM320F28335-EP
The --isr_save_vcu_regs compiler option generates instructions to save and restore VCU registers using the stack when interrupt service routines occur. This allows VCU code to be re-entrant. If an ISR interrupts a VCU computation, it will not impact results if this option is used.
This option can only be used if the --vcu_support option is set.
VMOV32 *SP++,VCRC
VMOV32 *SP++,VSTATUS
<ISR code here>
VMOV32 VSTATUS,*--SP
VMOV32 VCRC,*--SP
VMOV32 *SP++,VCRC
VMOV32 *SP++,VSTATUS
VMOV32 *SP++,VCRCPOLY
VMOV32 *SP++,VCRCSIZE
<ISR code here>
VMOV32 VCRCSIZE,*--SP
VMOV32 VCRCPOLY,*--SP
VMOV32 VSTATUS,*--SP
VMOV32 VCRC,*--SP