arduino / arduino/ArduinoCore-mbed
Wrong calculation of PDM clock?
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Hi Guys,
I think the calculation is wrong:
https://github.com/arduino/ArduinoCore-mbed/blob/838d64437afde5f3c53f8b34f920093bca6cebb0/libraries/PDM/src/rp2040/PDM.cpp#L77
the clock frequency that is getting the mic is just (samplerate*decimation). Maybe the misinterpretation is from this line:
https://github.com/arduino/ArduinoCore-mbed/blob/838d64437afde5f3c53f8b34f920093bca6cebb0/libraries/PDM/src/rp2040/PDM.cpp#L109
But at the end the clock frequency will be (samplerate*decimation).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with libraries/PDM/src/rp2040/PDM.cpp at the referenced lines 77 and 109, then trace how the samplerate and decimation values determine the microphone clock. Confirm the expected PDM clock calculation and update the implementation if it is wrong; the issue is done when the resulting clock matches the documented relationship and relevant checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100