Externaly trigger the audio block data aqusition

WeTec

Member
Hi,
in my project I'm measuring AC voltage among other things using a CS4272 codec. The CS4272 has a crystal attached, so I'm using AudioInputI2Sslave. Everything is working fine and AudioAnalyzeRMS gives me the AC voltage measured at the inputs. I can average the measured voltage. Source of the input voltage is one of the output of the CS4272 by the way. It delivers a sinewave with constant frequency and level. No rocket science so far. The output frequency is 100Hz or a multiple of it.
I want to measure the AC voltage as precise as possible and want to supress the effect of the 50Hz AC mains frequency.
The idea is to trigger the audio block data aqusition somehow that the update() function of audio objects are called exactly AUDIO_BLOCK_SAMPLES / AUDIO_SAMPLE_RATE after the trigger event to have a defined start of the measurement.
I played around with setting the I2S1_RCSR register to reset the FIFO of the I2S reciver but with no success.
I hope that someone has an idea about this.
 
Back
Top