FILE: sdfm_ex4_pwm_sync_cpuread.c
In this example, SDFM filter data is read by CPU in SDFM ISR routine. The SDFM configuration is shown below:
- SDFM1 is used in this example. For using SDFM2, few modifications would be needed in the example.
- MODE0 Input control mode selected
- Comparator settings
- Sinc3 filter selected
- OSR = 32
- hlt = 0x7FFF (Higher threshold setting)
- llt = 0x0000(Lower threshold setting)
Data filter settings
- All the 4 filter modules enabled
- Sinc3 filter selected
- OSR = 256
- All the 4 filters are synchronized by using PWM (Master Filter enable bit)
- Filter output represented in 16 bit format
- In order to convert 25 bit Data filter into 16 bit format user needs to right shift by 10 bits for Sinc3 filter with OSR = 256
Interrupt module settings for SDFM filter
- All the 4 higher threshold comparator interrupts disabled
- All the 4 lower threshold comparator interrupts disabled
- All the 4 modulator failure interrupts disabled
- All the 4 filter will generate interrupt when a new filter data is available
External Connections
- SDFM_PIN_MUX_OPTION1 Connect Sigma-Delta streams to (SDx-D1, SDx-C1 to SDx-D4,SDx-C4) on GPIO16-GPIO31
- SDFM_PIN_MUX_OPTION2 Connect Sigma-Delta streams to (SDx-D1, SDx-C1 to SDx-D4,SDx-C4) on GPIO48-GPIO63
- SDFM_PIN_MUX_OPTION3 Connect Sigma-Delta streams to (SDx-D1, SDx-C1 to SDx-D4,SDx-C4) on GPIO122-GPIO137
Watch Variables
- filter1Result - Output of filter 1
- filter2Result - Output of filter 2
- filter3Result - Output of filter 3
- filter4Result - Output of filter 4