AnsweredAssumed Answered

MPC5643L_ some ques tion about DMA

Question asked by na yan on Mar 22, 2016
Latest reply on Mar 23, 2016 by Mark Piffer
  • Some details of the follow code @

 

const struct CTU_Commands DMA_CTU  = // DMA_CTU will be sent to CLR4

        {

                /* configure the conversion sequence for ADC dynamic channels  (CTU.CLR_SCM4.R)

                 * every 20 us the next value is written to the ADC commands list entry 4. It is

                 * not clear up to now whether enty 0 is transfered via DMA or not, so it is done

                 * redundant now  */

                CTU_CLR_CMS_DUAL

                | CTU_CLR_CMS_CH_ADC0(7)

                | CTU_CLR_CMS_CH_ADC1(8) ,

 

                CTU_CLR_CMS_DUAL

                | CTU_CLR_CMS_CH_ADC0(7)

                | CTU_CLR_CMS_CH_ADC1(7) ,

 

                CTU_CLR_CMS_DUAL

                | CTU_CLR_CMS_CH_ADC0(7)

                | CTU_CLR_CMS_CH_ADC1(8) ,

               

                CTU_CLR_CMS_DUAL

                | CTU_CLR_CMS_CH_ADC0(7)

                | CTU_CLR_CMS_CH_ADC1(7) ,

 

        };

Q1: In the description ,it says “It is  not clear up to now whether enty 0 is transfered via DMA or not  it is related to entry 0? Why ? Does the RM(reference mannual ) have the related text ?  I can’t understand the whole meaning of the last sentence(descripition above).,could you give me any clue?.

 

Q2:                                          CTU_CLR_CMS_DUAL              // 0XF0F0

                | CTU_CLR_CMS_CH_ADC0(7)       //0X0101

                | CTU_CLR_CMS_CH_ADC1(8) ,        //0X0808

 

The symbol   | represent or , is it right ? if so , the value above is 0xF9F9 , is it right ?

 

Why was it written in this form(3 lines), other than A|B|C (1 line)?

 

Does there exist some instructions verstion of the programing in the NXP(freescale) website?

 

Q3:

 

#define CTUCOMCOUNT (sizeof(DMA_CTU)/2) /* count of CTU Commands set by DMA*/

 

The value of CTUCOMCOUNT is 4,is it right ?

 

 

 

Thanks very much!

Yanna

 

 

Petr Stancik

Outcomes