Hello.
I'm trying to SDADC with using DMA for resolver Sin & Cos Signals.
So now I'm reffering to eTPURDCCUG.pdf with example codes (Example_MPC5777C-SDADC_eTPU_triggered_v0_0-GHS714 & Example_MPC5777C_DSPI_Master_TXRX_DMA_S32DSPower21)
eTPURDCCUG.pdf suggets three DMA channels are used – two channels to transfer the ADC data of Sine and Cosine signals, and one channel to transfer the HSRs.
I wanna use SDA[0], SDA[1] for Sin signal and Cos signal.
Sin signal - SDA0
Cos signal - SDA1
Now I'm using eQADC with DMA, below the source code is summary of DMA init for eQADC.
---- No 1. summary of DMA init for eQADC ---
void SDADC2_Init(void)
{
/* for comments see SDADC1_Init */
SIU.SDCLKCFG.R = 0x0000003F;
SDADC_2.MCR.B.EN = 1;
/* TRIGSEL = 0101b = 5 = eTPU_A23 */
SDADC_2.MCR.R = 0x00001593;
SDADC_2.CSR.R = 0x0;
SDADC_2.OSDR.R = 0xFF;
SDADC_2.FCR.R = 0x107;
SDADC_2.RSER.R = 0x00000001;
}
Solved! Go to Solution.
I see. This table is described quite straightforward. Use recommended values.
For SDADC following channels is supposed to be used (eDMA_B):
For HSR, you may use any channel.
According sketch in shows using differential inputs i.e. SIN by one pair of inputs, COS by another pair.
In comparison to eQADC - SDADC does not use any commands as you have in the TCD above. You will only need DMA transfers for results' draining.
Some general words to SDADC:
SDADC is targeted to high-precision, moderate input bandwidth AC signal processing (knock detection/in pressure cylinder control).
Once enabled the SDADC keeps running. There is no “Single conversion mode”. This requires converted data to be continually drained by DMA or ISR. The digital nature of the SDADC means that there is a propagation delay as the data is clocked through the internal digital filters. This has to be taken into account at startup or at any channel mux change. This latency means that the SDADC is not well suited to some applications including motor control. When used in an AC sampling application it is likely that each SDADC will have to be dedicated to a particular input rather than switching the input channel.
SDADC offers higher conversion accuracy (16-bit result).
SDADC is always combined with other type of ADC, on this device it is eQADC offering advanced triggering and channel multiplexing capability (on other MPC57xx device SDADC is supplemented by SAR ADC).
Thank you for your answer.
I'm a beginner level so I couldn't understand much of your explained without exmaples...
Can you show me how should I configure SDADC with using DMA?
I want to configure DMA configuration as shown in the table below.
I want to use SDA0 and SDA1 channel for Sine ADC FIFO DMA channel and Cosine ADC FIFO DMA channel, but I'm already using TCD[0] and TCD[1] for eQADC.
If I want to use SDA0 and SDA1 channel for DMA Channel, How should I do?
I see. This table is described quite straightforward. Use recommended values.
For SDADC following channels is supposed to be used (eDMA_B):
For HSR, you may use any channel.