raspberrypi/pico-micropython-examples

Raspberry Pi Pico ADC changes the sampling rate in Free-running Sampling mode

Closed this issue · 5 comments

I am configuring the ADC sampling rate here. Due to unknown reasons, the DIV register cannot be configured here. The actual sampling period is fixed at 65.
Can anyone help me what is going wrong here?
c39121a7385513c1579481977b0c62e
b078a23843d708c1ae0b4c6966c8a88
a91a38f1944c012e122d14c44dcbc40

Solved, The right hand expression div_value | (int_part << 8) | frac_part seems wrong.

This is probably something that you should ask about at https://github.com/orgs/micropython/discussions rather than in this repo.

done,expressiondiv_value | (int_part << 8) | frac_partchange to (int_part << 8) | frac_part.

For anybody else finding this issue in future: please see https://github.com/orgs/micropython/discussions/15816