SBOA444 November   2020 TMCS1100

 

  1.   Trademarks
  2. 1Introduction
  3. 2Implementation Block Diagram
  4. 3Hardware Implemenation
    1. 3.1 Analog Inputs
      1. 3.1.1 Voltage Measurement Analog Front End
      2. 3.1.2 Current Measurement Analog Front End
    2. 3.2 MSP432 LaunchPad Connections
    3. 3.3 PCB Layout Recommendations
  5. 4How to Implement Software for Metrology Testing
    1. 4.1 Setup
      1. 4.1.1 Clock
      2. 4.1.2 UART Setup for GUI Communication
      3. 4.1.3 Real-Time Clock (RTC)
      4. 4.1.4 Direct Memory Access (DMA)
      5. 4.1.5 ADC Setup
    2. 4.2 Foreground Process
      1. 4.2.1 Formulas
        1. 4.2.1.1 Standard Metrology Parameters
        2. 4.2.1.2 Power Quality Formulas
    3. 4.3 Background Process
      1. 4.3.1 per_sample_dsp( )
        1. 4.3.1.1 Voltage and Current ADC Samples
        2. 4.3.1.2 Pure Waveform Samples
        3. 4.3.1.3 Frequency Measurement and Cycle Tracking
      2. 4.3.2 LED Pulse Generation
      3. 4.3.3 Phase Compensation
  6. 5Metrology Accuracy Testing
    1. 5.1 Test Setup
    2. 5.2 Results
  7. 6Schematics
  8. 7References

Clock

The MSP432 is configured to have its CPU clock (MCLK) set at 48 MHz and its subsystem master clock (SMCLK) set to 8.192 MHz. The clock source for MCLK is the internal DCO of the MSP432 MCU, which is configured for a frequency of 48 MHz.

The clock source for SMCLK is an external crystal. The MSP432 LaunchPad comes with a 48 MHz crystal (part number FA-238 48.0000MB-W0) by default, which is replaced with a 16.384 MHz crystal (part number: FA-238 16.3840MB-K). The new crystal also requires a 10-pF load capacitance instead of the 12-pF load capacitance of the previous crystal. To support this new crystal, the C11 and C12 22-pF crystal load capacitors were changed to 18-pF capacitors. The 16.384-MHz clock from the external crystal is internally divided by two to create the 8.192-MHz SMCLK frequency. Please note that the clock for the ADS131M08 is derived from its own 8.000-MHz crystal, so it is independent of the 8.192 MHz SMCLK of the MCU.

An external 32.768- kHz crystal is used as the clock source for the auxiliary clock (ACLK) of the device. This ACLK clock is set to a frequency of 32.768 kHz.