FILE: sdfm_ex1_filter_sync_cpuread.c
In this example, SDFM filter data is read by CPU in SDFM ISR routine. The SDFM configuration is shown below:
- SDFM used in this example - SDFM1
- Input control mode selected - MODE0
- 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 = 128
- All the 4 filters are synchronized by using MFE (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 7 bits for Sinc3 filter with OSR = 128
- 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.
To view results in graph window, add breakpoint in ISR where counter is reset once the buffer is full and plot the watch variables.
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