Enable Clock for DMAMUX

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

Enable Clock for DMAMUX

Jump to solution
801 Views
armendgecaj
Contributor III

Hi all!

 

I am using Kinetis K60F MK60FN1M0 with CodeWarrior for MCU v10.6 and i have a question.

 

I want to enable the clock for DMAMUX but i get the problem report: 'error: 'SIM_SCGC6_DMAMUX_MASK' undeclared (first use in this function)'

 

I did this:

(1) SIM_SCGC6 |= SIM_SCGC6_DMAMUX_MASK; 

 

If i enable the clock for DMA then i did not get any problems (the code is: (2) SIM_SCGC7 |= SIM_SCGC7_DMA_MASK;

--> here is no problem).

 

Why i get only by the code (1) the problem report?

Do i need some header files?

 

Best Regards 

Armend

Labels (1)
0 Kudos
1 Solution
631 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Armend,

Please refer to the Reference Manual.

1) -  The DMA Source , please configure the  register of DMAMUXx_CHCFGn -> SOURCE :

pastedImage_2.png

About the source , please check the part of   3.3.9.1 DMA MUX request sources on RM.

- Yes, you can use the gpio to trigger DMA , about how to trigger ( rising or falling edge) ,please check the PORTx_PCRn register on PORT part .

pastedImage_1.png

2)  There is a easy way to configure , create a Processor Expert project on CW, then add the component of

"DMATransfer_LDD" , on the configure view , you can choose the Trigger source :

pastedImage_3.png

Also there is a demo , DAC trigger DMA,  you can refer to :

pastedImage_4.png

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
631 Views
armendgecaj
Contributor III

OK i think i have the solution.

I think i have two DMAMUX. 

So if i write SIM_SCGC6 |= SIM_SCGC6_DMAMUX0_MASK; then i get no error.

But i have a other question. I also tried to use the DMA_LDD Component.

There is a structure. It is called: LDD_DMA_TTransferDescriptor.

If i write in the structure at TriggerType the command LDD_DMA_HW_TRIGGER then i will have a hardware trigger. But how can i make a GPIO signal as a trigger (for example a button)?

I think i have to write something at TriggerSource. But what?

Best Regards

Armend

0 Kudos
632 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Armend,

Please refer to the Reference Manual.

1) -  The DMA Source , please configure the  register of DMAMUXx_CHCFGn -> SOURCE :

pastedImage_2.png

About the source , please check the part of   3.3.9.1 DMA MUX request sources on RM.

- Yes, you can use the gpio to trigger DMA , about how to trigger ( rising or falling edge) ,please check the PORTx_PCRn register on PORT part .

pastedImage_1.png

2)  There is a easy way to configure , create a Processor Expert project on CW, then add the component of

"DMATransfer_LDD" , on the configure view , you can choose the Trigger source :

pastedImage_3.png

Also there is a demo , DAC trigger DMA,  you can refer to :

pastedImage_4.png

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

631 Views
armendgecaj
Contributor III

Hi Alice

i am sorry, i am late. Thank you very much for your help.

Best Regards

Armend

0 Kudos