Skip to content

Conversation

@zejiang0jason
Copy link
Contributor

Enabled modes:
  idle: SLEEP
  suspend: DEEP-SLEEP
  standby: POWER-DOWN with CPU retention

OS Time Base: OSTIMER with fro1m clock source

@zejiang0jason zejiang0jason changed the title Feature/add mcxw23 power Add mcxw23 power management support Nov 6, 2025
@zejiang0jason zejiang0jason changed the title Add mcxw23 power management support [DRAFT]Add mcxw23 power management support Nov 6, 2025
@zejiang0jason zejiang0jason marked this pull request as draft November 6, 2025 09:26
@yeaissa

This comment was marked as resolved.

@zejiang0jason zejiang0jason force-pushed the feature/add_mcxw23_power branch from 465082f to 7920277 Compare November 24, 2025 14:33
@zejiang0jason

This comment was marked as resolved.

*** Booting Zephyr OS build v4.2.0-2105-g48f2ffda26de ***
Hello World! frdm_mcxw23/mcxw236
Power Management
Copy link
Contributor

@yeaissa yeaissa Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not ok with this, since it will require adding the overlay on each app that will run with PM. I expect to have everything I need once I enable CONFIG_PM.
To avoid this lets set the os_timer status to okay by default in the nxp_mcxw23x_common.dtsi file, and change the MCUX_OS_TIMER redefinition in Kconfig.defconfig to:

 config MCUX_OS_TIMER
-       default y if PM
+       default n if !PM

This will allow to run on the CORTEX_M_SYSTICK when PM is not defined and switch to OS_TIMER when PM is enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

Add to support reset OS_TIMER in driver

Signed-off-by: Jason Yu <[email protected]>
Use reset API to reset OSTIMER for better portability.

Signed-off-by: Jason Yu <[email protected]>
Only access deep_sleep_counter when it is available.

Signed-off-by: Jason Yu <[email protected]>
Call pm_policy_device_power_lock_put/pm_policy_device_power_lock_get
to coordinate with system level power modes.

Signed-off-by: Jason Yu <[email protected]>
Add for the case that the registers are not kept in some
low power modes.

Signed-off-by: Jason Yu <[email protected]>
Call pm_policy_device_power_lock_put/pm_policy_device_power_lock_get
to coordinate with system level power modes.

Signed-off-by: Jason Yu <[email protected]>
PINT connects GPIO pin to seperate IRQ slot.
Add new API to get which IRQ slot is connected to, based on
pin index.

Signed-off-by: Jason Yu <[email protected]>
When os_timer is enabled in dts, then os_timer will be used as
OS tick timer.

To make systick as the default OS tick timer, currently os_timer
is not enabled in dts. When users want to use os_timer as
OS tick timer, they need to override the dts.

Improve the method, enable the os_timer is dts, but not enable
in Kconfig by default. If need to use os_timer as OS tick, just pass
CONFIG_MCUX_OS_TIMER=y

Signed-off-by: Jason Yu <[email protected]>
Enabled modes:
  idle: SLEEP
  suspend: DEEP-SLEEP
  standby: POWER-DOWN with CPU retention

OS Time Base: OSTIMER with 32K clock source

Signed-off-by: Jason Yu <[email protected]>
Add poweroff MCXW2xx SoCs, support btn_wk pin wakeup.

Signed-off-by: Jason Yu <[email protected]>
Add mcxw23_evk and frdm_mcxw23 platforms to the power management
test suite to validate power management functionality on MCXW23
hardware.

Signed-off-by: Jason Yu <[email protected]>
@zejiang0jason zejiang0jason force-pushed the feature/add_mcxw23_power branch from 7920277 to 2e2eba2 Compare December 1, 2025 03:55
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

@dleach02 dleach02 removed their assignment Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants