Other Parts Discussed in Thread: TDA4VM, TDA4VL
Hi,
We were developing until now with TDA4VM and are now moving to TDA4VE. We're still using the RTOS SDK. Specifically, for DMA, we're using vision_apps/utils/udma/app_udma_utils.h.
We've added two functions to appUdmaUtils to be able to trigger a Transpose transaction. It works perfectly on TDA4VM, but the same code doesn't work on TDA4VE. To be noted that all other DMA functionality works as before.
Are there some difference of usage between TDA4VM and TDA4VE that might not be reflected in appUdmaUtils?
The code we added are these three functions:
-
appUdmaTrpdSetTransposeND(): Copy-paste of appUdmaTrpdSetND(), but we also setpTr->fmtflags |= CSL_FMK(UDMAP_TR_FMTFLAGS_DFMT, CSL_UDMAP_TR_FMTFLAGS_DFMT_TRANSPOSE);
- appUdmaTransposeNDInit(): Copy-paste of appUdmaCopyNDInit(), but we call appUdmaTrpdSetTransposeND() instead of appUdmaTrpdSetND()
-
appUdmaCopyNDIsFinished(): To be able to do some polling on the channel instead of blocking on it.
#if defined(__C7100__) || defined(__C7120__) || defined(__C7504__) int32_t appUdmaCopyNDIsFinished( app_udma_ch_handle_t ch_handle) { int32_t retVal = UDMA_SOK; if ((uint32_t)TRUE == ((app_udma_ch_obj_t *)ch_handle)->create_prms.use_dru) { uint64_t wait_word = ((app_udma_ch_obj_t *)ch_handle)->wait_word; if ((__get_indexed(__EFR,0) & wait_word ) == wait_word ) { __set_indexed(__EFCLR,0, wait_word); } else { retVal = UDMA_EFAIL; } } else { Udma_EventPrms *eventPrms = &((app_udma_ch_obj_t *)ch_handle)->tr_event_obj.eventPrms; if(CSL_REG64_RD(eventPrms->intrStatusReg) & eventPrms->intrMask) { /* Clear interrupt */ CSL_REG64_WR(eventPrms->intrClearReg, eventPrms->intrMask); /* Work-around for K3_OPEN_SI-213 */ /* We need to ensure that status clear is written to IA before re-submitting on the same channel */ #if defined (_TMS320C6X) _mfence(); _mfence(); #endif } else { retVal = UDMA_EFAIL; } } return (retVal); } #endif
Right now, the code gets stuck in an infinite loop while polling appUdmaCopyNDIsFinished(). To be noted that we have a lot of other code calling this function and they all work, except for transpose mode.
What's missing?