Part Number: MSP432P401R
Tool/software: TI C/C++ Compiler
Hi,
I´m using the MSP432 Simple Link Libary in order to use the DMA for a buffer transfer. The example works fine on channel 0 but if I change the code to channel 1 the interrupt vector don`t get called.
Can only channel 0 used for software transfers?
Working code: (From the example libary):
int main(void)
{
/* Halting Watchdog */
MAP_WDT_A_holdTimer();
/* Zero Filling the Destination */
memset(destinationArray, 0x00, 1024);
isFinished = false;
/* Configuring DMA module */
MAP_DMA_enableModule();
MAP_DMA_setControlBase(controlTable);
/* Setting Control Indexes. In this case we will set the source of the
* DMA transfer to our random data array and the destination to the
* destination data array. Set as auto mode with no need to retrigger
* after each arbitration */
MAP_DMA_setChannelControl(UDMA_PRI_SELECT,
UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_8 | UDMA_ARB_1024);
MAP_DMA_setChannelTransfer(UDMA_PRI_SELECT, UDMA_MODE_AUTO, data_array,
destinationArray, 1024);
/* Assigning/Enabling Interrupts */
MAP_DMA_assignInterrupt(DMA_INT1,0);
MAP_Interrupt_enableInterrupt(INT_DMA_INT1);
MAP_Interrupt_disableSleepOnIsrExit();
/* Enabling DMA Channel 0 */
MAP_DMA_enableChannel(0);
/* Forcing a software transfer on DMA Channel 0 */
MAP_DMA_requestSoftwareTransfer(0);
while(1)
{
MAP_PCM_gotoLPM0InterruptSafe();
if(isFinished)
while(1);
}
}
/* Completion interrupt for DMA */
void DMA_INT1_IRQHandler(void)
{
MAP_DMA_disableChannel(0);
isFinished = true;
}
Not working code:
int main(void)
{
/* Halting Watchdog */
MAP_WDT_A_holdTimer();
/* Zero Filling the Destination */
memset(destinationArray, 0x00, 1024);
isFinished = false;
/* Configuring DMA module */
MAP_DMA_enableModule();
MAP_DMA_setControlBase(controlTable);
/* Setting Control Indexes. In this case we will set the source of the
* DMA transfer to our random data array and the destination to the
* destination data array. Set as auto mode with no need to retrigger
* after each arbitration */
MAP_DMA_setChannelControl(UDMA_PRI_SELECT,
UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_8 | UDMA_ARB_1024);
MAP_DMA_setChannelTransfer(UDMA_PRI_SELECT, UDMA_MODE_AUTO, data_array,
destinationArray, 1024);
/* Assigning/Enabling Interrupts */
MAP_DMA_assignInterrupt(DMA_INT1, 1);
MAP_Interrupt_enableInterrupt(INT_DMA_INT1);
MAP_Interrupt_disableSleepOnIsrExit();
/* Enabling DMA Channel 0 */
MAP_DMA_enableChannel(1);
/* Forcing a software transfer on DMA Channel 0 */
MAP_DMA_requestSoftwareTransfer(1);
while(1)
{
MAP_PCM_gotoLPM0InterruptSafe();
if(isFinished)
while(1);
}
}
/* Completion interrupt for DMA */
void DMA_INT1_IRQHandler(void)
{
MAP_DMA_disableChannel(1);
isFinished = true;
}
Best regards
Steffen