Hi MartinK,
I am using _cortex_int_init to set the priority.
_cortex_int_init(INT_DMA1, 3, TRUE); // rx DMA interrupt
_cortex_int_init(INT_DMA0, 3, TRUE); // tx DMA interrupt
_cortex_int_init(INT_UART0_RX_TX, 4, TRUE); // UART0 interrupt
And below is one of my audio DMA ISR.
static void
dma_tx_ch0_isr(
pointer foo
) {
DMA_CINT = DMA_CINT_CINT(0); /* Use the Clear Intr. Request register */
if (dma_tx_buff_in_use_a) {
/*
** Finished playing Buffer A
*/
DMA_TCD0_SADDR = (uint32) &dma_tx_buff[BUFF_SIZE];
dma_tx_buff_in_use_a = FALSE;
}
else{
DMA_TCD0_SADDR = (uint32) &dma_tx_buff[0];
dma_tx_buff_in_use_a = TRUE;
}
/*
** DMA finished playback
*/
_event_set(dma_tx_rx_dma_ready,0x01);
}
If I comment out _event_set(dma_tx_rx_dma_ready,0x01) the stack grows very slowly but putting this back in it grows very quickly and reaches 88% of size (1024).
Also what are the interrupts which are assigned by default in MQX. I want to see what are the priorities of other interrupts i.e. Ethernet, etc.
Thanks,
Mohsin455