CommunityGD32Cores / ArduinoCore-GD32

Arduino core for GD32 devices, community developed, based on original GigaDevice's core
Other
85 stars 33 forks source link

Internal ADC Channel sampling #107

Open Candas1 opened 11 months ago

Candas1 commented 11 months ago

Hi,

If an internal ADC Channel like temperature or voltage reference is requested to analogRead (I haven't tested this yet), a higher sampling time (ADC_SAMPLETIME_239POINT5 ?) could be used here.

Candas1 commented 11 months ago

Hmm I think this is also missing if I am not wrong.

Candas1 commented 10 months ago

This is also wrong. Pinmode should be set only if it's not an internal ADC channel, otherwise fails (in default branch of the switch).

I experimented with VREF but it was messing up my other readings. If I find a solution to this I can propose a PR for all the issues I mentioned if it helps.