1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 22:43:50 +01:00

boards/same54-xpro: enable DAC

Both PA2 and PA5 are exposed on the board, so we can enable the DAC
feature.
This commit is contained in:
Benjamin Valentin 2020-04-28 01:41:02 +02:00
parent bfb3d52a63
commit d4b601327b
2 changed files with 14 additions and 0 deletions

View File

@ -2,6 +2,7 @@ CPU = samd5x
CPU_MODEL = same54p20a
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_dac
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_rtt

View File

@ -242,6 +242,19 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.gclk_src = SAM0_GCLK_48MHZ,
}
};
/** @} */
/**
* @name DAC configuration
* @{
*/
/* Must not exceed 12 MHz */
#define DAC_CLOCK SAM0_GCLK_8MHZ
/* Use external reference voltage on PA03 */
/* (You have to manually connect PA03 with Vcc) */
/* Internal reference only gives 1V */
#define DAC_VREF DAC_CTRLB_REFSEL_VREFPU
/** @} */
#ifdef __cplusplus
}