Hi all,

Me and my colleagues (NXP mobile robotics) encountered a problem and we would 
like to start a discussion on how to solve that. We're making a development 
board using NuttX and we would like to add the power mode configuration to it. 
But this needs to be specific for this "project".

The problem:
The pm.h specific logic is in the chip dependent code (for example the 
up_pm_prepare() and up_pm_notify() callback functions are located in 
nuttx/arch/arm/src/s32k1xx/s32k1xx_clockconfig.c for the power mode switch of 
the MCU). And for peripherals in the chip specific files as well, for example 
to enable/disable peripherals, like in 
nuttx/arch/arm/src/s32k1xx/s32k1xx_serial.c to enable the serial on the other 
clock which is active in the MCU low power run mode.

But you should not decide on chip level what your current board is doing, each 
board/project would want to have its own power optimizations and ability to 
enable/disable peripherals depending on the use case.

So in that case you would want to give the user/developer the option to refine 
which power reductions he will use for his product/project.

We have several ideas which we would like to use to start a discussion on this.

Idea 1:
Add the configuration with the kconfig files to for example "System Type" in 
menuconfig. Make a PM configure part in which you can enable/disable the 
various PM states (PM_IDLE, PM_STANDBY, PM_SLEEP) and going in this PM state 
will allow you to configure in what state the MCU should be and which 
peripherals should be enabled.

 [Machine generated alternative text: menuconfig  Build Setup  System Type  
Allows user to specify which peripherals  are enabled In e specflc power mode  
and in which mode the MCI-I Is  PM configuration  IDLE  SLEEP  Copy 
configuratjon from  menuconfig (pherjpherals)?  chip specific MCIJ mode  RUN  
chip specific MCIJ mode  UART  CARTO  LIARTI  only show PM suppo?ed peripherals 
 HSRUN  RUN  VLPR  STOP]
Idea 2:
Another idea is that you add the PM configuration of the peripherals, to the 
peripheral configuration.

[Machine generated alternative text: menuconfig  Build Setup  System Type  
Peripheral Selection  UART  CARTO  LIARTI  BAUD rate  OMA support  Power 
Management  NORMAL  PM  IDLE  PM  STANDBY  PM SLEEP]
Of course we are open to other ideas. We just wanted to get a discussion 
started on how to do this the best way.

Kind regards,

Cis van Mierlo
Embedded Software Engineer
NXP Semiconductors, CTO Systems Innovations

High Tech Campus 46, room 0.64, 5656 AE Eindhoven, The Netherlands
E-mail: cis.van.mie...@nxp.com<mailto:cis.van.mie...@nxp.com>
Internet: http://www.nxp.com<http://www.nxp.com/>

Reply via email to