KW45B41Z board eDMA Clock Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW45B41Z board eDMA Clock Issue

1,102 Views
kaif1
Contributor II

I am trying to enable clock to the eDMA module in LPSPI as the KW45B41Z data sheet suggests that eDMA0 module uses CPU clock itself and by default it will be disabled, and we should enable it but when i try to enable the clock using 

CLOCK_EnableClock(kCLOCK_Dma0);

PRINTF("Dma0 clk : %lu \n", CLOCK_GetIpFreq(kCLOCK_Dma0));

 

I am getting Dma0 clk as 0MHZ, what is the reason for this and why can't i enable the eDMA clock? I have cross verified the channels, request sources everything. 

 

Kindly reply for this issue

0 Kudos
Reply
3 Replies

1,079 Views
luis_maravilla
NXP Employee
NXP Employee

Hello,

What example are you using?

I would recommend the [kw45b41evk_lpspi_edma_b2b_transfer_master], as I believe it might solve your doubts.

This example example shows how to use LPSPI driver in eDMA way and implements the kCLOCK_Dma (check hardware_init.c file)

Best Regards

Luis

0 Kudos
Reply

1,076 Views
kaif1
Contributor II

I have used kw45b41evk_lpspi_edma_b2b_transfer_master example itself but when I print the DMA clock in that example too i am getting clock as 0 MHZ. My doubt here is if the DMA0 module in KW45B41Z board  drives the CPU clock itself then why it is giving 0MHZ or is it like the clock is abstracted from the programmer and after CLOCK_EnableCLOCK(kClock_DMA0) we don't need to care about the DMA clock. Kindly Clarify me this issue.

0 Kudos
Reply

1,042 Views
luis_maravilla
NXP Employee
NXP Employee

Hello

 

The reason you're seeing 0 MHz when calling CLOCK_GetIpFreq(kCLOCK_Dma0) is because the DMA module doesn't have a selectable clock source like other peripherals, and this function returns by default a 0 when the clk it's not listed for having a selection of frequency. Do not change this.

 

Are you having any issues running the example without modifications?

 

Best Regards

Luis

0 Kudos
Reply