Other Parts Discussed in Thread: HALCOGEN
Hi
In the generated interrupt routine dmaBTCAInterrupt there is bug.
If the dmaBTCAInterrupt is generated for DMAchannel 0 the offset calculated for dmaGroupANotification.
uint32 offset;
/* USER CODE BEGIN (6) */
/* USER CODE END */
if (dmaREG->BTCAOFFSET != 0U)
{
offset = dmaREG->BTCAOFFSET - 1U;
dmaGroupANotification(BTC, offset);
}
Somehow dmaREG->BTCAOFFSET is resetted after the if condition and then the channel variable passed to dmaGroupNotificaton is wrapped off to 0xFFFFFFFF.
This can be solved by
uint32 offset = dmaREG->BTCAOFFSET;
/* USER CODE BEGIN (6) */
/* USER CODE END */
if (offset != 0U)
{
offset = offset - 1U;
dmaGroupANotification(BTC, offset);
}
Kind regards,
C.W.