xmc4400 dma interrupt clear register

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
my code:

#define MVB_Set( m, v, p ) do{ (m) |= ((1UL)<<(p)); (v) |= (1<<(p)); }while(0)
#define BIT_SET(p) MVB_Set(dwMask, dwVal, p)
int main()
{
SCU_RESET_TypeDef *pSCU_Reset = SCU_RESET;
GPDMA0_CH_TypeDef *pGPDMA0_CH0 = GPDMA0_CH0;

BIT_SET(4);
REG_WR( pSCU_Reset->PRCLR2, dwMask, dwVal );
while( pSCU_Reset->PRSTAT2 & (1<<4) );

pGPDMA0_CH0->CLEARBLOCK = 1;
}

then the busfault happen, why ?
the register PPB->CFSR is 33280,whichi is Precise data bus error
the value of register PPB->BFAR is the address of register pGPDMA0_CH0->CLEARBLOCK

tks
0 Likes
1 Reply
User8819
Level 4
Level 4
Sorry its non of my business but what is the purpose of this code? While DMA peripheral is in reset, you are clearing one of DMA registers?
0 Likes