I have an application on C6748 which use principally 3 peripherals :
- McASP to acquire samples from an 8 channels ADC working at 3200Hz. The samples are acquired by EDMA in blocks working in flip flop
- SPI in slave mode to configure application and send results. The results are sent every second on SPI by using EDMA
- EHRPWM at 5000Hz to generate sinus. The width (CMPA register) of the PWM is updated by interrupt every 200us.
The McASP works properly, the SPI works properly. The PWM 'alone' works properly. But, in the application, every second, when data are sent by DMA on SPI, there are false PWM interrupts : instead of having interrupts every 200us, we have many wrong interrupts. On following display channel 2 rises at start of transfer DMA on SPI and goes back to 0 at end of DMA channel tansfer. On channel 1, the signal goes high at start of PWM interruption and goes low at end of PWM interrupt.
I have mad Emany traials :
- modification of HWI interrupt priority between EDMA and PWM
-Interruption programms and datas used by these programs in internal memory
- In interrupt of PWM test if interrupt is really theree before updating register CMPA with the new value of PWM
WHATEVER I TRY, DOES NOT CHANGE ANYTHING. I HAVE ALWAYS FASE PWM INTERRUPTS.It seems that functionning of EHRPWM is disturbed when there is a transfer by DMA on SPI. It is complely incredible.
Anaybody who has an idea is welcome
Anne-Marie