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.
- 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
Connect Sigma-Delta streams to (SD-D1, SD-C1 to SD-D4,SD-C4) on GPIO24-GPIO31
Watch Variables
- filter1Result - Output of filter 1
- filter2Result - Output of filter 2
- filter3Result - Output of filter 3
- filter4Result - Output of filter 4