Low Power Wake-up Timer disabled via PINT

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Low Power Wake-up Timer disabled via PINT

ソリューションへジャンプ
1,410件の閲覧回数
Gabriel88
Contributor II

Dear Community,

I am trying to set a #OM15076-3 Carrier Board with a #JN5189 Module for a #QN9090 development.

Unfortunately, using a Low Power Wake-up Timer (based on powerdown example) I don't know how to momentarily disable Deep Sleep/Power-down mode through software control triggered by an Pin INT (based on pint example).

I do manage to set a periodical timer on its own, and to go into a constant Power-down mode waking up with a button interruption, separately.

The main objective is to have a periodical event whenever the timer reach zero, and have a different event during the timer's period triggered by a button, resuming back where the timer stopped.

Thanks in advance for whatever information that could help.

Looking forward to hearing from you,

Gabriel

0 件の賞賛
返信
1 解決策
1,375件の閲覧回数
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello Gabriel,

In addition to the timer, powerdown_demo allows the user to select the User Button (board BP1) as wake-up source:

EduardoZamora_0-1663715086613.png

You can use this event as base and it can be merged with the timer event; both the timer and the IO can be selected as wake-up source in config.pm_wakeup_src. For example:

config.pm_wakeup_src=POWER_WAKEUPSRC_WAKE_UP_TIMER0 | POWER_WAKEUPSRC_IO;

And the wake-up pin can be selected in config.pm_wakeup_io. For example:

config.pm_wakeup_io = 1 << BOARD_SW1_GPIO_PIN;

Regards,
Eduardo.

元の投稿で解決策を見る

7 返答(返信)
940件の閲覧回数
Gabriel88
Contributor II

Dear community,

What if I would like to use whatever interruption instead of Switch 1?
Let's say I configured pin 3 as an external interruption.

How does the following line change: 

config.pm_wakeup_io = 1 << BOARD_SW1_GPIO_PIN;

Thanks in advance for your comments.

Best regards,
Gabriel

0 件の賞賛
返信
941件の閲覧回数
Gabriel88
Contributor II

Dear community,

What if I would like to use whatever interruption instead of Switch 1?
Let's say I configured pin 3 as an external interruption.

How does the following line change: 

config.pm_wakeup_io = 1 << BOARD_SW1_GPIO_PIN;

 Thanks in advance for your comments.

Best regards,
Gabriel

0 件の賞賛
返信
1,376件の閲覧回数
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello Gabriel,

In addition to the timer, powerdown_demo allows the user to select the User Button (board BP1) as wake-up source:

EduardoZamora_0-1663715086613.png

You can use this event as base and it can be merged with the timer event; both the timer and the IO can be selected as wake-up source in config.pm_wakeup_src. For example:

config.pm_wakeup_src=POWER_WAKEUPSRC_WAKE_UP_TIMER0 | POWER_WAKEUPSRC_IO;

And the wake-up pin can be selected in config.pm_wakeup_io. For example:

config.pm_wakeup_io = 1 << BOARD_SW1_GPIO_PIN;

Regards,
Eduardo.

1,358件の閲覧回数
Gabriel88
Contributor II

Dear @EduardoZamora,

I tried to merge them but maybe not as easy as you did.

The problem is that once in the Timer cycle the IO will not have priority, am I right?

Thanks for the hint anyways, I'll start just like you propose.

Regards,
Gabriel

0 件の賞賛
返信
1,352件の閲覧回数
EduardoZamora
NXP TechSupport
NXP TechSupport

Hi,

With this configuration you should be able to wake up the device by using either the timer or the IO when the device is in low power mode, both events should be independent and have the same effect.

Regards,
Eduardo.

1,308件の閲覧回数
Gabriel88
Contributor II

Hi @EduardoZamora , how are you?

Your solution worked like a charm!

The only thing I didn't manage to set is a “pause/resume” timer, as in whenever the GPIO INT takes place the whole timer cycle restart from scratch.

I didn't find any function on fsl_clock.c that allows me to do that pause/resume action. Maybe I'm looking in the wrong place.

Let me know if you have some hints for that.

Thanks in advance as always.

Regards,
Gabriel

0 件の賞賛
返信
1,270件の閲覧回数
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello,

Could you please try reading the timer counter value when the IO wake-up event occurs? Function

uint32_t WTIMER_ReadTimer(WTIMER_timer_id_t timer_id)

may be usefull for this, and you can try starting the timer again using this value as count before re-entering low-power mode.

Regards,
Eduardo.