mathertel / Radio

An Arduino library to control FM radio chips like SI4703, SI4705, RDA5807M, TEA5767.
http://mathertel.github.io/Radio
BSD 3-Clause "New" or "Revised" License
297 stars 89 forks source link

Code polls for STC bit using I2C instead of waiting for interrupt on GPIO2 #72

Open abraxa opened 4 months ago

abraxa commented 4 months ago

The datasheet https://media.digikey.com/pdf/Data%20Sheets/Silicon%20Laboratories%20PDFs/Si4703-B16.pdf says on page 17:

The Si4703-B16 seek/tune performance may be affected by data activity on the SDIO bus when using the integrated internal oscillator. SDIO activity results from polling the tuner for status or communicating with other devices that share the SDIO bus. If there is SDIO bus activity while the Si4703-B16 is performing the seek/tune function, the crystal oscillator may experience jitter, which may result in mistunes and/or false stops. SDIO activity during all other operational states does not affect performance. For best seek/tune results, Silicon Laboratories recommends that all SDIO data traffic be suspended during Si4703-B16 seek and tune operations. This is achieved by keeping the bus quiet for all other devices on the bus, and delaying tuner polling until the tune or seek operation is complete. The STC (seek/tune complete) interrupt should be used instead of polling to determine when a seek/tune operation is complete.

This project violates this recommendation as https://github.com/mathertel/Radio/blob/master/src/SI4703.cpp#L510 shows.

Are there plans to remedy this?