As we know , kl25 has many dma peripheral requests and four DMA channels , and my question is when have a dma peripheral requests ,it will trigger which DMA channle ? where or which register config it ?
You define which peripheral trigger is used for each DMA channel in the DMAMUX.
Thank you for help.
I find your said , use DMAUX0_CHCFGN -> SOURCE define , while where can find the peripheral trigger's slot number? for example , now i use UART _DMA trigger DMA0 , the slot number is ? or the DMAMUX0_CHCFG0 is ?
You can search "DMA request source" in RM, and you would find a table.
These are the trigger defines that I use when working with the KL devices (not all triggers are available on particular devices)
Thank for your help.
And i have another question, now I want use DMA transmit ADC result data. I need collect two different signals use two ADC channles . And the in kl25 , all of the adc channels dma trigger are called ADC0, my question is now I can't use two DMA channals transmit two ADC data , do you have any good idea ?
Thank you !
The KL25 has one ADC controller. You can configure it for HW triggered mode so that it samples two channels automatically.
The results are available in ADC0_RA and ADC0_RB so it is possible to transfer these by configuring a DMA channel to copy two 16 bit words from ADC0_RA address on each trigger. The result is the two channels at the destination - if a buffer, the two channels will be stored Channel A, Channel B, Channel A, Channel B etc,
Or you can program two DMA channels with the same trigger and each one can copy either ADC0_RA or ADC0_RB to a buffer so that the channel data is not alternating.
Retrieving data ...