boards: frdm_mcxn947: Add support for dac
Add support for dac Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit is contained in:
parent
296b732e63
commit
e3937e99fc
6 changed files with 36 additions and 0 deletions
|
@ -132,6 +132,22 @@ static int frdm_mcxn947_init(void)
|
|||
CLOCK_EnableClock(kCLOCK_Gpio5);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac0), okay)
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac0);
|
||||
CLOCK_SetClkDiv(kCLOCK_DivDac0Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO_HF_to_DAC0);
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Dac0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(dac1), okay)
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac1);
|
||||
CLOCK_SetClkDiv(kCLOCK_DivDac1Clk, 1u);
|
||||
CLOCK_AttachClk(kFRO_HF_to_DAC1);
|
||||
|
||||
CLOCK_EnableClock(kCLOCK_Dac1);
|
||||
#endif
|
||||
|
||||
/* Set SystemCoreClock variable. */
|
||||
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
|
||||
|
||||
|
|
|
@ -69,6 +69,8 @@ The FRDM-MCXN947 board configuration supports the following hardware features:
|
|||
+-----------+------------+-------------------------------------+
|
||||
| FLEXSPI | on-chip | flash programming |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| DAC | on-chip | dac |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Targets available
|
||||
==================
|
||||
|
|
|
@ -49,4 +49,12 @@
|
|||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
|
||||
pinmux_dac0: pinmux_dac0 {
|
||||
group0 {
|
||||
pinmux = <DAC0_OUT_PIO4_2>;
|
||||
drive-strength = "low";
|
||||
slew-rate = "fast";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -131,3 +131,8 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dac0 {
|
||||
pinctrl-0 = <&pinmux_dac0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
|
|
@ -92,3 +92,7 @@
|
|||
&w25q64jvssiq {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&dac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -18,4 +18,5 @@ supported:
|
|||
- dma
|
||||
- gpio
|
||||
- spi
|
||||
- dac
|
||||
vendor: nxp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue