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
解決済! 解決策の投稿を見る。
Hello Armend,
Please refer to the Reference Manual.
1) - The DMA Source , please configure the register of DMAMUXx_CHCFGn -> SOURCE :
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 .
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 :
Also there is a demo , DAC trigger DMA, you can refer to :
Hope it helps
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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
Hello Armend,
Please refer to the Reference Manual.
1) - The DMA Source , please configure the register of DMAMUXx_CHCFGn -> SOURCE :
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 .
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 :
Also there is a demo , DAC trigger DMA, you can refer to :
Hope it helps
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Alice
i am sorry, i am late. Thank you very much for your help.
Best Regards
Armend