To whom it may concern:
First, I don't know if this is posted in the correct spot.
I am new to posting to this community for the most part. I am creating an interrupt routine that services several interrupts to perform various tasks. The tasks are not really important for this question, except one. To give a bit more info, I have successfully used interrupts in two ways: starting on zero and CMPA trigger. Also, I am using an oscilloscope to observe the interrupts triggering and the tasks completing using GPIO registers. Everything looks great except again the one task. That task is transmitting bytes to a microSD card. First I buffer the data into a Uint16 variable[512] where the data is stored on high 8 bits to be read properly and transmitted into the SD card (because it is configured to read the upper 8 bits). The transmission of bytes isn't the issue, it is the spi commands to specify the sector and make sure the data is stored properly. This task (i.e., specifying a sector, sending bytes, and checking the SD card) takes 20+ ms. I am running the whole routine with a period of 6.6 ms. Every time I go to store data, the interrupt handling the data storage stops the rest of the interrupts from executing.
Diagram of my routine (setup and order):
`````Add epwm_isr()'s to PieVectTable
`````Reset EPwmxRegs.TBCTR
`````Enable CPU Interrupt 3
`````Setup EPwmxRegs for shape, phase, and period
`````Assign PieCtrlRegs.PIEIER3.bit.INTx for all interrupts
`````PIEIER3_CRIT all interrupts
`````Enable all interrupts
`````Add to clock all interrupts
`````Start timer
epwm3, 4, and 7 start synchronized on zero, and 5 and 6 start on CMPA a couple ms later. While the data is buffering (epwm7), epwm3 sits and waits. Once the buffer is full, epwm3 calls a function to store data. As mentioned before this takes a long time relative to the routine.
My question is, how do I remove this interrupt (epwm3 or INT3) from the IER group such that the other interrupts (4-7),can be used as normal every 6.6 ms (the specified period), while the other interrupt (epwm3) continues to store data and then restart (and be reinserted into the IER group) after it completes?
I hope my question makes sense. If you have any other questions regarding my routine, feel free to ask!
Thanks!