AnsweredAssumed Answered

Kinetis L DMA BCR error

Question asked by Wenderson Oliveira on Aug 18, 2014
Latest reply on Aug 19, 2014 by Wenderson Oliveira

Hi all,

 

I'm using KDS to program the DMA of KL25Z.

 

I'm setting the DMA to transfer a few configurations to ADC registers. DMA is triggered by hardware request (TPM0_CH1).

When the transfer complete event is called, the BCR is reset to the initial value and the SAR to begining of the config vector. But just 1 transfer (cycle steel of 8 bytes) can be completed, after this the DMA just call the OnError event.

To see what's happening I've installed the EmbSysRegView (How to Add Register Details View in Eclipse | MCU on Eclipse). By setting a break point at the DMA_Error event, I saw the BCR register comes to this value:

value1.JPG.jpg

I don't know why, because the value that I put on this register is 0x8.

 

This is my code:

 

void DMA_CH1_OnComplete(LDD_TUserData *UserDataPtr)
{
  printf("\nch1 dma complete");

  DMA_DSR_BCR1 = (uint32_t)8;
  DMA_SAR1 = AB_CFG_SOURCE; //Macro definition of the source address
}

 

Anyone knows whats happening?

 

Thanks

Outcomes