SBOA444 November 2020 TMCS1100
The Voltage and Current Sampling Events figure shows the different events that occur when sampling voltage and current, where the items in olive green are done by the hardware settings and not the test software.
Figure 4-3 Voltage and Current Sampling
Events.
Figure 4-4 Background Process.
The ADS131M08 ADC Sample Request Packet figure shows the packet that is transmitted by the DMA of the MSP432 MCU and the response packet from the ADS131M08 that is received and assembled by the DMA as well. The transmission and reception packets contain ten words, where each word is three bytes long.
Figure 4-5 ADS131M08 ADC Sample Request
Packet.
After writing the command word, it is necessary for a dummy write to be performed for each byte that is to be read. The dummy byte write is necessary to enable the SPI clock, which is necessary to read a byte from the ADS131M08 device. For each dummy byte write, a value of 0x00 is written to the SPI transmit register for EUSCIB0. Immediately after writing the command byte, writing three dummy bytes allows the MSP432 MCU to receive the 3-byte ADC value from channel 0 of the ADS131M08. Writing the next 21 dummy bytes gets the ADC data for channel 1–7. Finally, writing the next three dummy bytes gets the CRC word. The CRC word is 24-bits; however, note that the actual CRC is only 16-bits, which are placed in the most significant bits of the 24-bit word. As a result, when parsing the CRC word, the last byte is not needed (note though that the dummy write for this zero-padded byte must still be sent though for proper ADS131M08 operation).
In parallel to receiving the newest current samples from the ADS131M08 using the DMA, the ADS131M08 is currently sampling the next voltage (Vphx[N]) and current samples (Iphx[N]) and the test software also performs per-sample processing on the last voltage (Vphx[N – 2]) and current samples (Iphx[N – 2] ) obtained from the ADS131M08. This per-sample processing is used to update the intermediate dot product quantities that are used to calculate the metrology parameters. After sample processing, the background process uses the "per_sample_energy_pulse_processing" for the calculation and output of energy-proportional pulses. Once the per_sample_energy_pulse_processing is completed, the test software exits from the port ISR.