iMXRT1060 On/Off power sequence

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMXRT1060 On/Off power sequence

601 Views
EmbeddedTech
Contributor III

Hi,

We have a requirement to complete few sequences like writing to flash before the MCU is turned off using the power button connected to the ONOFF pin of MCU. long press of power button for 5 secs or more shuts down the MCU. Is it possible to achieve the power mode functionality with ONOFF pin or should we use a GPIO to control the power modes?

Thanks.

0 Kudos
Reply
5 Replies

586 Views
Sam_Gao
NXP Employee
NXP Employee

@EmbeddedTech 

Yes, it is possible to achieve the dedicated functions as you mentioned. 

1. https://www.nxp.com.cn/docs/en/nxp/data-sheets/IMXRT1060IEC.pdf The DS shows ONOFF can be configured in debounce, off to on time, and max time-out configurations.

Sam_Gao_0-1752652163328.png

2. Please check 'power mode switch ' example, as well as https://www.nxp.com.cn/docs/en/application-note/AN12085.pdf to find how to use.

 

0 Kudos
Reply

571 Views
EmbeddedTech
Contributor III

Hi @Sam_Gao,

Currently our power button is tied to ONOFF pin of MCU directly. We do not use any GPIO to control the ON/OFF sequence. When power button is pressed for 5 secs it shuts down the MCU. How to perform the shutdown sequence in the software like finishing any pending flash writes etc. before the MCU shuts down. I see in the power mode switch example that GPIO pin is used. Thanks for your help in advance.

0 Kudos
Reply

561 Views
Sam_Gao
NXP Employee
NXP Employee

@EmbeddedTech 

Hi,

The ONOFF PIN doesn't support this kind of requirment based on its hardware, please implement the feature from software side by yourself.

0 Kudos
Reply

537 Views
EmbeddedTech
Contributor III

Hi @Sam_Gao ,
How should the power button be connected to the MCU in order to use the power mode switch example?

Thanks for your help.

0 Kudos
Reply

441 Views
Sam_Gao
NXP Employee
NXP Employee

Hi,

If there is no any other GPIO except ON/OFF PIn to connect MCU, it seems no any solution to get what the status is. 

About 'power mode switch', here is an example where the user can set the MCU to a specific power mode, User can wakeup the core by key interrupt (SW7, Reset or Power off).  I am not sure if it can help you for the dedicated requirment.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2132928%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EiMXRT1060%20On%2FOff%20power%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2132928%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EWe%20have%20a%20requirement%20to%20complete%20few%20sequences%20like%20writing%20to%20flash%20before%20the%20MCU%20is%20turned%20off%20using%20the%20power%20button%20connected%20to%20the%20ONOFF%20pin%20of%20MCU.%20long%20press%20of%20power%20button%20for%205%20secs%20or%20more%20shuts%20down%20the%20MCU.%20Is%20it%20possible%20to%20achieve%20the%20power%20mode%20functionality%20with%20ONOFF%20pin%20or%20should%20we%20use%20a%20GPIO%20to%20control%20the%20power%20modes%3F%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2143231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMXRT1060%20On%2FOff%20power%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2143231%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EIf%20there%20is%20no%20any%20other%20GPIO%20except%20ON%2FOFF%20PIn%20to%20connect%20MCU%2C%20it%20seems%20no%20any%20solution%20to%20get%20what%20the%20status%20is.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAbout%20'%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-mcuxpresso%2Fmcuxsdk-examples%2Fblob%2Frelease%2F25.06.00%2F_boards%2Fevkbmimxrt1060%2Fdemo_apps%2Fpower_mode_switch%2Fbm%2Fexample_board_readme.md%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Epower%20mode%20switch%3C%2FA%3E'%2C%20here%20is%20an%20example%26nbsp%3Bwhere%20the%20user%20can%20set%20the%20MCU%20to%20a%20specific%20power%20mode%2C%20User%20can%20wakeup%20the%20core%20by%20key%20interrupt%20(SW7%2C%20Reset%20or%20Power%20off).%26nbsp%3B%20I%20am%20not%20sure%20if%20it%20can%20help%20you%20for%20the%20dedicated%20requirment.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2136444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMXRT1060%20On%2FOff%20power%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2136444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233161%22%20target%3D%22_blank%22%3E%40Sam_Gao%3C%2FA%3E%26nbsp%3B%2C%3CBR%20%2F%3EHow%20should%20the%20power%20button%20be%20connected%20to%20the%20MCU%20in%20order%20to%20use%20the%20power%20mode%20switch%20example%3F%3C%2FP%3E%3CP%3EThanks%20for%20your%20help.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135515%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMXRT1060%20On%2FOff%20power%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135515%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F189325%22%20target%3D%22_blank%22%3E%40EmbeddedTech%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EThe%20ONOFF%20PIN%20doesn't%20support%20this%20kind%20of%20requirment%20based%20on%20its%20hardware%2C%20please%20implement%20the%20feature%20from%20software%20side%20by%20yourself.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2135398%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMXRT1060%20On%2FOff%20power%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2135398%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233161%22%20target%3D%22_blank%22%3E%40Sam_Gao%3C%2FA%3E%2C%3C%2FP%3E%3CP%3ECurrently%20our%20power%20button%20is%20tied%20to%20ONOFF%20pin%20of%20MCU%20directly.%20We%20do%20not%20use%20any%20GPIO%20to%20control%20the%20ON%2FOFF%20sequence.%20When%20power%20button%20is%20pressed%20for%205%20secs%20it%20shuts%20down%20the%20MCU.%20How%20to%20perform%20the%20shutdown%20sequence%20in%20the%20software%20like%20finishing%20any%20pending%20flash%20writes%20etc.%20before%20the%20MCU%20shuts%20down.%20I%20see%20in%20the%20power%20mode%20switch%20example%20that%20GPIO%20pin%20is%20used.%20Thanks%20for%20your%20help%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2134758%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMXRT1060%20On%2FOff%20power%20sequence%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2134758%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F189325%22%20target%3D%22_blank%22%3E%40EmbeddedTech%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20it%20is%20possible%20to%20achieve%20the%20dedicated%20functions%20as%20you%20mentioned.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com.cn%2Fdocs%2Fen%2Fnxp%2Fdata-sheets%2FIMXRT1060IEC.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com.cn%2Fdocs%2Fen%2Fnxp%2Fdata-sheets%2FIMXRT1060IEC.pdf%3C%2FA%3E%26nbsp%3BThe%20DS%20shows%26nbsp%3BONOFF%20can%20be%20configured%20in%20debounce%2C%20%3CSTRONG%3Eoff%20to%20on%3C%2FSTRONG%3E%20time%2C%20and%20max%20time-out%20configurations.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Sam_Gao_0-1752652163328.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Sam_Gao_0-1752652163328.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F347796iE72DE363A098D7E2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Sam_Gao_0-1752652163328.png%22%20alt%3D%22Sam_Gao_0-1752652163328.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20Please%20check%20'power%20mode%20switch%20'%20example%2C%20as%20well%20as%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com.cn%2Fdocs%2Fen%2Fapplication-note%2FAN12085.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com.cn%2Fdocs%2Fen%2Fapplication-note%2FAN12085.pdf%3C%2FA%3E%26nbsp%3Bto%20find%20how%20to%20use.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E