boards: nxp: frdm_mcxa156: Support dac for NXP frdm_mcxa156 board
Support dac for NXP frdm_mcxa156 board. Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
This commit is contained in:
parent
2d37c3dfcf
commit
bbec164673
5 changed files with 24 additions and 1 deletions
|
@ -116,6 +116,14 @@ static int frdm_mcxa156_init(void)
|
||||||
CLOCK_AttachClk(kFRO12M_to_LPUART0);
|
CLOCK_AttachClk(kFRO12M_to_LPUART0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(dac0))
|
||||||
|
SPC_EnableActiveModeAnalogModules(SPC0, kSPC_controlDac0);
|
||||||
|
CLOCK_SetClockDiv(kCLOCK_DivDAC0, 1u);
|
||||||
|
CLOCK_AttachClk(kFRO12M_to_DAC0);
|
||||||
|
|
||||||
|
CLOCK_EnableClock(kCLOCK_GateDAC0);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set SystemCoreClock variable. */
|
/* Set SystemCoreClock variable. */
|
||||||
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
|
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,8 @@ The FRDM-MCXA156 board configuration supports the following hardware features:
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
| FLASH | on-chip | soc flash |
|
| FLASH | on-chip | soc flash |
|
||||||
+-----------+------------+-------------------------------------+
|
+-----------+------------+-------------------------------------+
|
||||||
|
| DAC | on-chip | dac |
|
||||||
|
+-----------+------------+-------------------------------------+
|
||||||
|
|
||||||
Targets available
|
Targets available
|
||||||
==================
|
==================
|
||||||
|
|
|
@ -16,5 +16,11 @@
|
||||||
input-enable;
|
input-enable;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
pinmux_dac0: pinmux_dac0 {
|
||||||
|
group0 {
|
||||||
|
pinmux = <DAC0_OUT_P2_2>;
|
||||||
|
drive-strength = "low";
|
||||||
|
slew-rate = "fast";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,3 +88,9 @@
|
||||||
pinctrl-0 = <&pinmux_lpuart0>;
|
pinctrl-0 = <&pinmux_lpuart0>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&dac0 {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&pinmux_dac0>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
};
|
||||||
|
|
|
@ -16,4 +16,5 @@ toolchain:
|
||||||
- xtools
|
- xtools
|
||||||
supported:
|
supported:
|
||||||
- gpio
|
- gpio
|
||||||
|
- dac
|
||||||
vendor: nxp
|
vendor: nxp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue