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.

HalCogen v03.08.01 - DMA driver - critical bug

BTC and FTC interrupt routines are wrong.

Code generated

#pragma CODE_STATE(dmaBTCAInterrupt, 32)
#pragma INTERRUPT(dmaBTCAInterrupt, IRQ)

void dmaBTCAInterrupt(void)
{
    uint32 offset;

    if (dmaREG->BTCAOFFSET != 0U)
    {
        offset = dmaREG->BTCAOFFSET - 1U;
        dmaGroupANotification(BTC, offset);
    }

}

Wrong because reading *TCAOFFSET register will clear it.

Correct code:

void dmaBTCAInterrupt(void)
{
    uint32 offset = dmaREG->BTCAOFFSET;

    if (offset != 0U)
    {
        dmaGroupANotification(BTC, offset-1U);
    }

}

This bug seems to be new to v03.08.01