Tool/software: TI C/C++ Compiler
We are supporting a customer who is reporting that they are running into a reset issue on their device and based on the data that they have captured , it seem like related to DSP SPLOOP instruction been interrupted.
we would like to check if this is a known issue and what is the correct way to avoid this issue. The code i question is legacy code which was previously compiled with older version of CGT where this was not observed. It is not clear why it occurs now,and if there is any relation to new compiler (v7.4.13) but we would like to confirm as there was a previous issue where something similar was reported with SPLOOP:
Here are the symptoms and reading from the C674x DSP:
EFR = 0x40000000
NRP = 0xc7975fba
NTSR = 0x0001420f
IERR = 0x00000000
check with DSP core 674 document, it show
1. EFR show EXF flag =1, exception has been detected.
2. IERR show it's not internal exception.
3. NTSR bit 14:SPLX state issue happen due to SPLOOP been interrupted
Questions:
1. Compiler documentation indicates:
SPLOOPs that are terminated by an exception cannot be resumed correctly. The SPLX bit in NTSR should be verified to be 0 before returning. seem like the customer is facing the same issue as they can't resume correctly. So, is there a way to avoid this scenario? will HW or compiler insert mask interrupt during SPLOOP instruction?
2. section 7.13.1 Interrupting the Loop Buffer, states that "Interrupts are automatically disabled 2 cycles before an SPLOOP(D/W) instruction is encountered. Does this mean HW will actually mask interrupts during processing SPLOOP? if yes then why are they seeing the SPLOOP interrupted issue? Is there a compiler setting that allows SPLOOP from not being interrupted or any other configuration missing?
3. SInce the issue was not encountered before, with this legacy code base, they suspect this to be an issue introduced because of the new compiler (v7.4.13)? It would be good to know from compiler champs if they need to add any compiler option to avoid or prevent this issue? They use compiler option -im100, does it help avoid this issue?
Thanks for your help.
Regards,
Rahul