boards: nxp/frdm_mcxn236: Support LPCMP for NXP frdm_mcxn236 board
Support LPCMP for NXP frdm_mcxn236 board Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
This commit is contained in:
parent
e7743db7b4
commit
9b532e3e7a
5 changed files with 26 additions and 0 deletions
|
@ -180,6 +180,12 @@ static int frdm_mcxn236_init(void)
|
|||
CLOCK_AttachClk(kFRO_HF_to_ADC0);
|
||||
#endif
|
||||
|
||||
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(lpcmp0))
|
||||
CLOCK_SetClkDiv(kCLOCK_DivCmp0FClk, 1U);
|
||||
CLOCK_AttachClk(kFRO12M_to_CMP0F);
|
||||
SPC_EnableActiveModeAnalogModules(SPC0, (kSPC_controlCmp0 | kSPC_controlCmp0Dac));
|
||||
#endif
|
||||
|
||||
/* Set SystemCoreClock variable. */
|
||||
SystemCoreClock = CLOCK_INIT_CORE_CLOCK;
|
||||
|
||||
|
|
|
@ -72,6 +72,8 @@ The FRDM-MCXN236 board configuration supports the following hardware features:
|
|||
+-----------+------------+-------------------------------------+
|
||||
| ADC | on-chip | adc |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| LPCMP | on-chip | sensor(comparator) |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Targets available
|
||||
==================
|
||||
|
|
|
@ -100,4 +100,13 @@
|
|||
drive-strength = "low";
|
||||
};
|
||||
};
|
||||
|
||||
pinmux_lpcmp0: pinmux_lpcmp0 {
|
||||
group0 {
|
||||
pinmux = <CMP0_IN0_PIO1_0>;
|
||||
drive-strength = "low";
|
||||
slew-rate = "fast";
|
||||
bias-pull-up;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -121,3 +121,7 @@
|
|||
&lpadc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&lpcmp0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -123,3 +123,8 @@
|
|||
pinctrl-0 = <&pinmux_lpadc0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&lpcmp0 {
|
||||
pinctrl-0 = <&pinmux_lpcmp0>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue