SDFM Filter Sync CPU Read

Brief

Configure SDFM data filters 1 and 4, read filter output from CPU in SDFM ISR

Details

This example demonstrates SDFM (Sigma-Delta Filter Module) filter synchronization and CPU-read functionality

Powers up the SDFM converter core and configures an EPWM output as the on-chip modulator clock source

Signal Routing: Sigma-Delta modulator data bitstreams input to SDFM data pins; EPWM clock output looped back to SDFM shared clock input pin

Test Cases:

  • Configures and enables SDFM data filters 1 and 4, then synchronizes them via the main filter enable bit

  • Enables modulator failure and data filter acknowledge interrupts on filters 1 and 4

  • Waits for the SDFM ISR to capture a fixed number of filter samples, with a timeout to prevent indefinite blocking

  • Reads filter results from the CPU inside the SDFM interrupt handler and stores them in a local buffer

Validation:

  • Performs a pass/fail test by checking that sample capture completed before the timeout

  • Prints captured filter results to the console

Peripherals used

SDFM
    Instance             : APP_SDFM
     Filters enabled      : 1, 4
     Filter 1 clock       : SD1_C1
     Filter 4 clock       : SD1_C1; share filter 1's clock
     Data filter          : Sinc3, OSR = 128, 16-bit output, shift = 7
     Interrupts           : For filters 1 and 4
                          : Data filter acknowledge - enabled
                          : Modulator failure - enabled
EPWM
     MODE      : UpCount
     PRD       : 20 cycles
     Actions   : Toggle output A on Period hit.
     Output    : PWM_A
SoC
    INTERRUPTS
       Instance  : SDFM0_INT
       Handler   : SDFM0_IRQHandler
       Priority  : Default

External connections

External Sigma-Delta modulator data bitstreams, modulator clock loopback from EPWM

  • Connect: BoosterPack header J1 pin 6 (EPWM4_1A) to BoosterPack header J1 pin 3 (SDFM0 C1)

  • Connect: BoosterPack header J3 pin 27 (SDFM0 D1) to External Sigma-Delta modulator 1 data bitstream

  • Connect: BoosterPack header J1 pin 4 (SDFM0 D4) to External Sigma-Delta modulator 4 data bitstream

LED Details: PASS LED (LED8), FAIL LED (LED7)