i have the following problem:
- Core running with PLL at 60MHz
- SPI is activated in slave-mode running with a frequency at 10MHz
- SPI-receiver-full-IRQ configured as fast-interrupt-irq
- every 1,6us occurs an SPI-receiver-full-irq
In the main-loop i have a do-loop. In the do-loop the Accumulator B is incremented. The do-loop is executed 19 times. At the beginning the accumulator is cleared, so after the do-loop the accumulator should have the value of 19. Dependent of the number of NOPs in the do-loop the accumulator have the value 19 or 20. The value 19 is correct, the value 20 is not correct. The value 20 depends of the number of the NOPs and only happens when the SPI-receiver-full-irq is enabled. The SPI-receiver-full is a fast-irq.
Here is the Code:
;// No NOP --> O.k.
;// 1 NOP --> O.k.
;// 2 NOPs --> fail
;// 3 NOPs --> O.k.
;// 4 NOPs --> fail
;// 5 NOPs --> O.k.
;// 6 NOPs --> fail
;// 7 NOPs --> O.k.
;// 8 NOPs --> fail
;// Here i check if the result is correct:
;// Result is not correct --> Error-Loop
Here is the SPI-receiver-full-irq-code:
The 56F8322 and 56F8335 DSPs don't have this problem!
What is the reason for this behavior and what can i do to avoid this problem?
Many thanks for your help!
Attachment: The Project
Original Attachment has been moved to: Project.rar