This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1114: ADC memory configuration for circular buffering

Part Number: TMS570LS1114

Dear support forum,

i want to measure 6 currents with the internal ADC of the MCU during a time interval of 100µs. 
I want the measurements to be triggered by HW. Also, preferable I want to have multiple measurements stored inside the memory so that I can calculate the measurements average during the last 100µs.

So the idea is as follows:

I need to reserve 6 words of the ADC memory for different signals. Then, I want to measure the mentioned 6 signals up to 5 times during the windows of 100µs. 

Therefore, I need 30 words that shall all be used for the ADC event group in which the 6 signals are stored.

By setting the total conversion time close to 20µs, I can make sure that I have 5 measurements distributed equally across the 100µs time. The HW trigger shall be ETPWM2, which has a period of 19900ns to ensure that all conversions can be finished correctly. 

Can I then assume that the memory of the AD event group is filled in a circular buffer? So if word 30 is filled for example with the conversion result of signal 6, than the next conversion result, that of signal 1, is placed at the memory adress of word 1 again?

Then, I could just read the results directly inside the memory and calculate the average to get the average signal amplitude during the last 100µs with the help of 5 measurements. 

The conversion is configured to run in single conversion that is triggered by the ETPWM to basically become a continous conversion. A

Thank you and kind regards

Sebastian 

  • Hi Sebastian,

    Can I then assume that the memory of the AD event group is filled in a circular buffer? So if word 30 is filled for example with the conversion result of signal 6, than the next conversion result, that of signal 1, is placed at the memory adress of word 1 again?

    Yes, you can configure it as circular buffer if needed using the "OVR_RAM_IGN" bit in the corresponding group operating mode control register.

    If the above bit set then after memory filled with the conversions then new conversion result will wrap again to the start address.

    If this bit not set then the wrapping will not takes place until the program has read out the result.

    The default value of this bit is 0(not set), so make this bit value 1 to use the buffer as circular buffer.

    --

    Thanks & regards,
    Jagadish.