1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

Merge pull request #16060 from benpicco/cpu/sam0_common/periph/adc-errata

sam0/adc: work around ADC errata on SAM D5x/E5x
This commit is contained in:
Dylan Laduranty 2021-02-22 21:30:26 +01:00 committed by GitHub
commit dc8b96f7a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,11 @@ static inline void _wait_syncbusy(void)
#ifdef ADC_STATUS_SYNCBUSY
while (ADC_DEV->STATUS.reg & ADC_STATUS_SYNCBUSY) {}
#else
while (ADC_DEV->SYNCBUSY.reg) {}
/* Ignore the ADC SYNCBUSY.SWTRIG status
* The ADC SYNCBUSY.SWTRIG gets stuck to '1' after wake-up from Standby Sleep mode.
* SAMD5x/SAME5x errata: DS80000748 (page 10)
*/
while (ADC_DEV->SYNCBUSY.reg & ~ADC_SYNCBUSY_SWTRIG) {}
#endif
}