How to config GPIO to wake pin in RT1170

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

How to config GPIO to wake pin in RT1170

Jump to solution
6,499 Views
kwf
Contributor III

Hi there

I try to config to GPIO wake up function.

In the SDK example the evkmimxrt1170_power_mode_switch_bm project is work well, but I try to add other GPIO as wake up function.

Base on MCUXpresso pin configure tool the GPIO_SNVS_00 power group as same as WKAEUP pin, so I decide used this pin as wake up pin. I config this pin as GPIO to input  pin (same configuration as WAKEUP Pin) and add GPIO_ClearPinsInterruptFlags , GPIO_EnableInterrupts in APP_SetWakeupConfig(void) function. But it's did not work.

I check the pin GPIO_SNVS_00 voltage (It was config to internal pull up ), the there are 0V, It seems the configuration did not success.

So I try to config to output through another project, but it also fail, the GPIO output can not pull high.

Through survey and study. I found some clue in "Hardware Development Guide for the MIMXRT1170 Processor , Rev. 0, 11/2020" Table 3. Power sequence and recommendations, It say

"By default, the GPIO_SNVS_XX signals are configured for tamper functionality. To use either/both of them as a GPIO instead, the corresponding TAMPER_PIN_DISABLE[1:0] fuse must be blown."

Unfortunately, I had search project key word "TAMPER_PIN_DISABLE", but there found zero match in project.

Can anyone help the little lamb find the way to config GPIO_SNVS_02 as wake up pin?(The best way is give an example code please)

Thanks your time for read.

Tags (1)
0 Kudos
Reply
1 Solution
6,444 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kwf

   Thanks for lucas_cao help, he is our low power expert!

  1. You can use the GPIO_SNVS_XX pin to wakeup the SNVS mode, but we still highly recommend you use the WAKEUP pin.

2. About the GPIO_SNVS_XX pin which support the tamper function.

 Some part support the tamper function, then the related GPIO_SNVS_00 is the tamper function in default:

kerryzhou_0-1617787109417.png

This situation, you need to burn the fuse to disable the tamper function, it will be back to the GPIO function.

Related fuse bit is: 0X860[15:14]=TAMPER_PIN_DISABLE[1:0], used to disable tamper pins.

Two fuse bit will control two tamper group.

Two groups, tamper 0/1/5/6 use fuse bit 0, the others use bit 1.

As you know, some RT1170 chip part don't support the tamper function, then the related pin is the GPIO function in default.

More details about the RT1170 parts tamper support situation, please check the RT1170 datasheet.Table 1. Order information

 

3. About the fuse burning

 You can use our MCUBootUtility tool 

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v3.1.1
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

kerryzhou_1-1617787558957.png

 

Wish it helps you!

if you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

 

 

View solution in original post

14 Replies
6,445 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kwf

   Thanks for lucas_cao help, he is our low power expert!

  1. You can use the GPIO_SNVS_XX pin to wakeup the SNVS mode, but we still highly recommend you use the WAKEUP pin.

2. About the GPIO_SNVS_XX pin which support the tamper function.

 Some part support the tamper function, then the related GPIO_SNVS_00 is the tamper function in default:

kerryzhou_0-1617787109417.png

This situation, you need to burn the fuse to disable the tamper function, it will be back to the GPIO function.

Related fuse bit is: 0X860[15:14]=TAMPER_PIN_DISABLE[1:0], used to disable tamper pins.

Two fuse bit will control two tamper group.

Two groups, tamper 0/1/5/6 use fuse bit 0, the others use bit 1.

As you know, some RT1170 chip part don't support the tamper function, then the related pin is the GPIO function in default.

More details about the RT1170 parts tamper support situation, please check the RT1170 datasheet.Table 1. Order information

 

3. About the fuse burning

 You can use our MCUBootUtility tool 

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v3.1.1
the related user manual is:
https://github.com/JayHeng/NXP-MCUBootUtility

kerryzhou_1-1617787558957.png

 

Wish it helps you!

if you still have questions about it, please kindly let me know.

Best Regards,

Kerry

 

 

 

5,750 Views
Lghtdhff_456
Contributor II

I need to configure multiple GPIO pin as a wake up pin in Rt1170 GPIO_SNVS_00 
 GPIO_SNVS_01 
 GPIO_SNVS_02

 so how i configure multiple gpio pin as wakeup ?

0 Kudos
Reply
5,734 Views
lucas_cao
NXP Employee
NXP Employee

One question,

Do you want to ust these pins as the wake up source under SNVS mode?

If yes, i have to say these pin cannot be the wakeup source.

If no, just configure it as the wake up pin. Please refer the SDK example.

5,691 Views
Lghtdhff_456
Contributor II

1] Thank you so much  for the replied 

2] No ,i am not using SNVS mode 

3] If i configure multiple pin as a wakeup , after that i want to know that from which wakeup pin interrupt was generated(Detect the cause of wakeup ) so should i able to read that gpio pin value or not  ? 

0 Kudos
Reply
5,663 Views
lucas_cao
NXP Employee
NXP Employee

Hi 

Yes, you can get the wakeup source by get the pin status in the interrupt handler. Just use it as a general GPIO will meet your requrement. But please note that, the GPIO in SNVS doamin, cannot work as fast as other domain's GPIO.

5,571 Views
Lghtdhff_456
Contributor II

Hi ,

I am trying to get pin intrupput flag status but I didn't get that ,could you please help me ,?

0 Kudos
Reply
5,561 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Lghtdhff_456 

   If you have any issues, please create your own question post. 

  Then we will help you in your own question post, don't follow the resolved post. Thanks.

 

Best Regards,

Kerry

0 Kudos
Reply
6,454 Views
lucas_cao
NXP Employee
NXP Employee

1.You need to enable the GPIO function by fuse if you want to use GPIO13_IO3

2. Which GPIO pin that you suggest I can use to wake up pin in low power mode?

Lucas:Wakeup pin, it is always online even under SNVS mode.

3.Which GPIO's power domain does not disable in low power mode?

Lucas: It depends on your application.

3.Which doc. describe the SETPOINT 0-15 detail?

Lucas: https://www.nxp.com.cn/docs/en/application-note/AN13148.pdf

6,435 Views
kwf
Contributor III

Hi Lucas_cao and Kerryzhou

Thanks your reply and help.

Lucas_cao the document is very helpful.

Though some test and modify, I had giving up to use GPIO_SNVS_00 as wake up pin.

After some test, I confirm the GPIO which I choosing can wake up CPU in both CPU suspend and SP10 mode.

Kerryzhou thanks for your information, maybe after burn fuse will solve the GPIO_SNVS_00 cannot config to GPIO,I will try it.

Best Regard

0 Kudos
Reply
6,490 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kwf,

  I find these information in the RM:

kerryzhou_1-1617333989269.png

kerryzhou_2-1617334080952.png

 

This pin is include in the note 3, it can't be used as the GPIO function.

About the GPIO wakeup, could you please check this application note:

https://www.nxp.com/docs/en/application-note/AN13104.pdf

chapter 4.9.1 GPIO as a wakeup source,

This has an example about it, please check whether it is useful to you!

Best Regards,

kerry

 

 

0 Kudos
Reply
6,477 Views
kwf
Contributor III

Hi kerryzhou

Thanks for your reply.

In fact, I had read the note and try those code (if you check those code in project "evkmimxrt1170_power_mode_switch_bm_core0" you will see the function "APP_SetWakeupConfig" same as 4.9.1 GPIO as a wakeup source ), but it's not work.

as below picture, the #if - #endif is I try to added. The "BOARD_USER_BUTTON2_GPIO_PIN" are 3U that I try to config GPIO13_IO3

kwf_1-1617673574093.png

 

So, you mean GPIO_SNVS_00 CAN NOT use to GPIO function even though user manual show function ALT5 - GPIO13_IO3?

I find the description in "i.MX RT1170 Processor Reference Manual, Rev. 0, 12/2020" 11.1.2 Pin Assignments page450 "For GPIO_SNVS_00-09, tamper is available only on select part numbers. On those devices, the users can select between Tamper and GPIO functionality".

kwf_0-1617673389436.png

Is this description wrong? Or the "select part numbers" was not RT1170?That's confuse me...

In "Debug and Application for RT1170 Clock and Low Power Feature, Rev. 0, January 4, 2021" 4.12 Wake up from SNVS mode say "For RT1170, the tamper pin on some parts can be used as a GPIO, which means these pins can wake up the chip."

kwf_2-1617675315034.png

So, Which GPIO pin that you suggest I can use to wake up pin in low power mode?

Or, Which GPIO's power domain does not disable in low power mode?

Other Question. Which doc. describe the SETPOINT 0-15 detail?

In "Debug and Application for RT1170 Clock and Low Power Feature, Rev. 0, January 4, 2021" only describe some part of SETPOINT clock status.

 

 

Tags (1)
0 Kudos
Reply
6,468 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi kwf,

  Please keep patient, I will help you to check it with our internal expert.

  Any updated information from my side, I will let you know ASAP.

 

Best Regards,

kerry

0 Kudos
Reply
6,222 Views
starwarrior
Contributor I

Hello,kerry

i was confused with this question too , any conclution? can the GPIO_SNVS_00 -09 be used as GPIO?

Thanks

Nick

 

0 Kudos
Reply
6,205 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @starwarrior ,

  In the none SNVS mode, you can configure it as GPIO and as wakeup pin directly, don't need to burn the fuse.

 RT1173 need to burn the fuse, other RT1170 series, can configure it as GPIO directly in the none SNVS mode.

Wish it helps you!

Best Regards,

Kerry

0 Kudos
Reply