Open CSC-Olivier opened 5 years ago
OK, if I change line 272 of wiring_analog.c to:
DAC->CTRLB.reg = DAC_CTRLB_REFSEL_INT1V | // Using the 1V reference
Then it uses the 1V reference. Not sure how to make the DAC automatically use the reference defined by analogReference though. Maybe by using DAC_CTRLB_REFSEL(value) ?
It seems that the DAC always use the 3.3V reference even if analogReference is used to define a different reference. I see that line 272 of wiring_analog.c is:
DAC->CTRLB.reg = DAC_CTRLB_REFSEL_AVCC | // Using the 3.3V reference
Is there an easy way to change this so that one can use the 1.0V reference or the 1.65V reference for the DAC?