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.

TMS320F28379D: STL's official safety diagnostic library performs ADC testing, and the DAC-A has no output data

Part Number: TMS320F28379D
Other Parts Discussed in Thread: LAUNCHXL-F28379D

Hi Team,

There's an issue from the customer need your help:

Run the ADC in STL's official safety diagnostic library with a resolution of 12, a test program without DMA, enable the DAC-A output, and set the value to 2048. On the LAUNCHXL-F28379D development board by connecting the ADCINA0 pins and ADCINA1 pins, Debug on CCS12, run the program at full speed, observe the value of the ADC result register in the register value window, always on the result that the ADC did not acquire data, suspect that the data sent by the DAC is always 0, not 2048. Tried to acquire using the EPWM and GPIO connected to the ADCINA1 pin of the ADC and the result register has the correct value of the register. What should I do in this situation?

Best Regards,

Ben

  • I believe the code by default uses VDAC for the DAC reference voltage. When running on a controlCARD, it is expected that you will connect this reference voltage in addition to connecting the ADC pins. As far as I can tell, this pin isn't available on the LaunchPad. See the thread below:

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/867853/launchxl-f28379d-vdac-vrefhi-of-the-buffered-dac

    I suspect you'll need to update the DAC configuration in the software to use a different reference voltage.

    Whitney

  • Hi Whitney,

    I updated the configuration of the DAC as you said, modified the reference voltage to ADC_VREFHI, ran and debugged the program, and the DAC outputs normally.

    However, when the program is running continuously in a loop, when you look at the value of the ADC result register in the Debug window, you will find that its value is always the data of 0 and 2048 output by the DAC. The value of 4095 was not read. I tried to do breakpoint debugging in the program, all three values were received and read correctly, and the test passed successfully. In the program, the while loop of delay is masked in the STL_ADC_test function, so that the timeout operation is not performed.

    It is suspected that when the DAC outputs the first value of 0, actualResult reads the value of the ADC result register as 0, and when the second value is output 2048, the value of the ADC result register read by actualResult is the offset calibrated value of the first value 0 when the DAC outputs the value of the first value 0, and the difference from 2048 is outside 300, causing the test to fail and exit the DAC output loop, so that the third value has no output.

    How do I do this, so that the program is continuously looped, and all three values can be read within the correct range and the ADC test passes.

    Best Regards,

    Ben

  • Hi Ben,

    Thanks for your patience. Were you able to find a solution? It has been a long time since I looked at this code, so I think I'll need to try this out myself to see if I can reproduce it. I'll make some time for it tomorrow.

    Whitney