AnsweredAssumed Answered

KM34Z256: PDB back to back mode trigger ADC0 ch0->ch2 and DMA copy

Question asked by Nick Ng on May 4, 2018
Latest reply on Jun 26, 2018 by Nick Ng



I have tried to go through all the possible related reference manuals and example code project about the usage of triggering the ADC0 [ch 0 ~2]conversion sequentially by PDB and use DMA P2M to copy the conversion result to buffer over back to back mode .

So that the PDB0.ch0pretrig0 pretriggered the ADC0.ch0 to do the ADC conversion and then emit a ADC.COCO complete flag to the DMA0 , DMA0 starts to copy the result from ADC0.R[0].

PDB0.ch0pretrig1 is then automatically pretriggered the ADC0.ch1 conversion and the result goes to ADC0.R[1] -> DMA0 copy it as well..


PDB0.ch0pretrig0 ->  ADC0.ch0 ->ADC0.R[0] -> DMA0->P2M->

PDB0.ch0pretrig1 ->  ADC0.ch1 ->ADC0.R[1] -> DMA0->P2M->

PDB0.ch0pretrig2 ->  ADC0.ch2 ->ADC0.R[2] -> DMA0->P2M-> PDB0.ch0 ->  ...


  But I am  still not really sure the correct  way to configure the PDB in such scene ...

Here is my config :

1. please help to correct.....

2. if I set in this way, is that possible kick it to start?


The manual (KM34P144M75SF0RM.pdf ) says I can control the pretrigger   channel by assigning the CHnC1.BB register.


So I guessI need to configure the enableBackToBackOperationMask w.r.t PDB0 pretrigger channel with certain delay



  PDB0.ch0 : pdbAdcPreTriggerConfigStruct.enableBackToBackOperationMask = 0U;

  PDB0.ch1 : pdbAdcPreTriggerConfigStruct.enableBackToBackOperationMask = 1U;

  PDB0.ch2 : pdbAdcPreTriggerConfigStruct.enableBackToBackOperationMask = 2U;


and XBAR setting:

    /* Configure the XBAR signal connections. */

    /* Configure the XBAR interrupt. */
    xbarConfig.activeEdge = kXBAR_EdgeRising;
    xbarConfig.requestType = kXBAR_RequestDisable;

    XBAR_SetSignalsConnection(XBAR, kXBAR_InputPdb0Ch0Pretrigger0, kXBAR_OutputPdb0PreTrigger2Ack );

    XBAR_SetOutputSignalConfig(XBAR, kXBAR_OutputAdcTrgA, &xbarConfig);


    XBAR_SetSignalsConnection(XBAR, kXBAR_InputPdb0Ch0Pretrigger1, kXBAR_OutputPdb0PreTrigger0Ack );
    XBAR_SetOutputSignalConfig(XBAR, kXBAR_OutputAdcTrgB, &xbarConfig);


    XBAR_SetSignalsConnection(XBAR, kXBAR_InputPdb0Ch0Pretrigger2, kXBAR_OutputPdb0PreTrigger1Ack );
    XBAR_SetOutputSignalConfig(XBAR, kXBAR_OutputAdcTrgC, &xbarConfig);