Other Parts Discussed in Thread: OMAP-L138
Dear all,
I a using the OMAP L138 CPU (ARM9 + DSP 674x dual core).
On the DSP, we have a task running at 125us, which is a sequence of
- DMA (edma31cc0) input from EMIFA parallel bus
- computational task
- DMA output to EMIFA
The task time is counted to the end of DMA output.
We found that the task time is not stable when we execute programmed read or write transfers from ARM to EMIFA bus (which should have low priority). On the scope, I noticed that the ARM transfers get executed during the DMA transfer, thus prolonging the DMA time.
I have tried to fix this in the MSTPRIx registers (see below). This did not have any measurable effect. A helpful measure was to insert wait loops in ARM code between the transfers. Now, we have up to 20ms prolonging of the fast task, which is still too much.
What exactly should the MSTPRIx registers do? Should the behaviour change if we set the priorities more extreme (ARM = 7)?
Are there other methods to prioritize the DMA?
Thanks for any hint.
-----------------------------
sysRegs->MSTPRI0 = CSL_FMK(SYSCFG_MSTPRI0_SATA, 7) |
CSL_FMK(SYSCFG_MSTPRI0_UPP, 7) |
CSL_FMK(SYSCFG_MSTPRI0_DSP_CFG, 1) |
CSL_FMK(SYSCFG_MSTPRI0_DSP_MDMA, 1) |
CSL_FMK(SYSCFG_MSTPRI0_ARM_D, 2) |
CSL_FMK(SYSCFG_MSTPRI0_ARM_I, 2);
sysRegs->MSTPRI1 = CSL_FMK(SYSCFG_MSTPRI1_VPIF_DMA_1, 7) |
CSL_FMK(SYSCFG_MSTPRI1_VPIF_DMA_0, 7) |
CSL_FMK(SYSCFG_MSTPRI1_EDMA31TC0, 0) |
CSL_FMK(SYSCFG_MSTPRI1_EDMA30TC0, 0) |
CSL_FMK(SYSCFG_MSTPRI1_EDMA30TC1, 0) |
CSL_FMK(SYSCFG_MSTPRI1_PRU0, 7) |
CSL_FMK(SYSCFG_MSTPRI1_PRU1, 7);
sysRegs->MSTPRI2 = CSL_FMK(SYSCFG_MSTPRI2_LCDC, 7) |
CSL_FMK(SYSCFG_MSTPRI2_USB1, 7) |
CSL_FMK(SYSCFG_MSTPRI2_UHPI, 7) |
CSL_FMK(SYSCFG_MSTPRI2_USB0CDMA, 7) |
CSL_FMK(SYSCFG_MSTPRI2_USB0CFG, 7) |
CSL_FMK(SYSCFG_MSTPRI2_EMAC, 4);