This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: DK-TM4C129X
I'm working with uDMA on the TM4C129 series processor on the DK-TM4C129x development kit. The code performs a software memory to memory scatter / gather transfer then does a little clean up in an interrupt routine following the transfer.
I have this code working, but during development I noticed that the udma.h provided value for UDMA_INT_SW is 62. The correct value seems to be 60. The relevant parts of my working code are:
tDMAControlTable sUnpackTaskList[kMaxChan]; void UnpackSamples() { ... } void DMAManager::SetupSampleTransfer() { ...
// Note UDMA_INT_SW in udma.h seems to be incorrect (62) uDMAIntRegister(60, UnpackSamples); uDMAChannelAttributeEnable(UDMA_CHANNEL_SW, 0); } void DMAManager::TransferSamples(...) { ... uDMAChannelScatterGatherSet(UDMA_CHANNEL_SW, 8, sUnpackTaskList, 0); uDMAChannelEnable(UDMA_CHANNEL_SW); uDMAChannelRequest(UDMA_CHANNEL_SW); }
The TM4C1294kcpdt Microcontroller datasheet lists "uDMA Software Channel Transfer" interrupt as 44 which is consistent with 60 as the exception number per the vector table shown in Figure 2-6 (60 = 44 + 16).
It seems unlikely that such an error in the udma.h header has gone unnoticed. Is there something silly I've missed here?
Thanks for the quick feedback Bob. However it's not a magic bullet. Turns out I had already installed the current version of the library, but I couldn't figure out how to get my CCS project to use it (I still can't).
Even had I figured that out, there would still have been pain waiting for me: the macro name has changed and the definition has jumped from udma.h to <processorHeader>.h (tm4c129xkczad.h in my case).
As an interesting aside I noticed the following code in udma.c:
void uDMAIntRegister(uint32_t ui32IntChannel, void (*pfnHandler)(void)) { // // Check the arguments. // ASSERT(pfnHandler); // // Register the interrupt handler. // IntRegister(ui32IntChannel, pfnHandler); // // Enable the memory management fault. // IntEnable(ui32IntChannel); }
Note the "memory management fault" comment. I'm pretty sure that's not right!