S32K312 休眠唤醒

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

S32K312 休眠唤醒

Jump to solution
7,404 Views
Gaulle
Contributor II

背景信息我目前正在使用S32k312进行休眠唤醒的功能开发,我有以下问题请请教咨询一下;

1、我使用的是Normal Wakeup而非Fast Standby,请问在Normal唤醒模式下可以实现唤醒源在StandbyRam的存储吗,我目前无法从WISR寄存器中读到有效唤醒源;

2、我通过示波器观察发现K3在休眠状态下收到唤醒源后是先走复位然后才进入的Icu中断,我想知道唤醒到底是先复位再进Icu中断还是先进Icu中断再复位;

3、我在休眠后只触发一次电平沿边中断唤醒,唤醒后从WISR寄存器中的值来看我所有配置了Icu唤醒功能的中断都触发了一次,因此我怀疑是否存在AB两种唤醒源,通过A方式唤醒MCU后WISR会同时记录AB两个唤醒事件,麻烦帮我解答一下;

Tags (1)
0 Kudos
Reply
1 Solution
7,334 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Gaulle

自己去排查,可能是的程序根本就没有成功进入standby模式,亦或者你的唤醒源一直存在

View solution in original post

0 Kudos
Reply
5 Replies
7,369 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Gaulle

Q.请问在Normal唤醒模式下可以实现唤醒源在StandbyRam的存储吗

可以,外部唤醒源唤醒后读取WISR,再将其存储在StandbyRam中没有问题

 

Q.我通过示波器观察发现K3在休眠状态下收到唤醒源后是先走复位然后才进入的Icu中断,我想知道唤醒到底是先复位再进Icu中断还是先进Icu中断再复位;

唤醒的中断标志位在唤醒后依然存在,如果当前使能了中断,那么会在唤醒后进入唤醒中断处理。

Since the wakeup flag register is retained after waking up, the wakeup ISR can be entered once the NVIC->ISER of Wakeup Unit is enabled by code. All the 64 wakeup sources share one interrupt vector.

 

Q.唤醒后从WISR寄存器中的值来看我所有配置了Icu唤醒功能的中断都触发了一次

所有的64个唤醒源共用一个中断向量,ICU唤醒功能的中断都触发了一次是可能的,但是相应的唤醒WISR是独立的,所有你自己去排查是否响应的唤醒口是否触发了唤醒操作。

Read the WKPU->WISR & WKPU->WISR_64 (Wakeup/Interrupt Status Flag Register). They are cleared by writing 1.

 

0 Kudos
Reply
7,364 Views
Gaulle
Contributor II
1、我的软件内部如果检测到有效唤醒源会进行一个唤醒状态的维持,在这种情况下,我在MCU休眠后如果只触发一次唤醒事件,MCU只会唤醒然后很快再次休眠下去,愿意是未识别到有效唤醒源,而在休眠后如果触发二到三次MCU就可以识别到有效唤醒源且维持唤醒,因此我认为在K3平台上只触发一次唤醒事件只能唤醒且复位MCU,如果没有第二三次唤醒事件,则MCU在复位起来后会立马又休眠下去,请问我的结论正确吗?谢谢
0 Kudos
Reply
7,353 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Gaulle

不正确,除非你的程序在唤醒后又进入了休眠,不存在几次唤醒的问题

0 Kudos
Reply
7,345 Views
Gaulle
Contributor II
对的,如你所说,我的程序也是这样设计的,同样的唤醒源,例如我是CAN唤醒,如果我只发一次唤醒报文,那么我的程序会唤醒然后又休眠,而我发两三帧唤醒报文的时候,软件就能识别到有效唤醒源且维持唤醒,这是为什么呢,谢谢
0 Kudos
Reply
7,335 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@Gaulle

自己去排查,可能是的程序根本就没有成功进入standby模式,亦或者你的唤醒源一直存在

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1982866%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K312%20sleep%20wakeup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1982866%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EBackground%20information%20I%20am%20currently%20using%20S32k312%20to%20develop%20sleep%20and%20wake-up%20functions.%20I%20have%20the%20following%20questions.%20Please%20ask%20for%20advice%3B%3C%2FP%3E%3CP%3E1.%20I%20use%20Normal%20Wakeup%20instead%20of%20Fast%20Standby.%20Can%20I%20store%20the%20wakeup%20source%20in%20StandbyRam%20in%20Normal%20wakeup%20mode%3F%20I%20cannot%20read%20the%20valid%20wakeup%20source%20from%20the%20WISR%20register%20at%20present.%3C%2FP%3E%3CP%3E2.%20I%20observed%20through%20an%20oscilloscope%20that%20after%20receiving%20the%20wake-up%20source%20in%20the%20sleep%20state%2C%20K3%20first%20resets%20and%20then%20enters%20the%20Icu%20interrupt.%20I%20want%20to%20know%20whether%20the%20wake-up%20is%20reset%20first%20and%20then%20enters%20the%20Icu%20interrupt%20or%20first%20enters%20the%20Icu%20interrupt%20and%20then%20reset%3B%3C%2FP%3E%3CP%3E3.%20I%20only%20triggered%20the%20level%20edge%20interrupt%20wake-up%20once%20after%20sleep.%20After%20waking%20up%2C%20the%20value%20in%20the%20WISR%20register%20shows%20that%20all%20my%20interrupts%20configured%20with%20the%20Icu%20wake-up%20function%20were%20triggered%20once.%20Therefore%2C%20I%20doubt%20whether%20there%20are%20two%20wake-up%20sources%20AB.%20After%20waking%20up%20the%20MCU%20through%20method%20A%2C%20WISR%20will%20record%20both%20wake-up%20events%20AB%20at%20the%20same%20time.%20Please%20help%20me%20solve%20this%20problem.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984445%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K312%20sleep%20wakeup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984445%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3EYes%2C%20as%20you%20said%2C%20my%20program%20is%20also%20designed%20in%20this%20way.%20For%20the%20same%20wake-up%20source%2C%20for%20example%2C%20I%20use%20CAN%20wake-up.%20If%20I%20only%20send%20a%20wake-up%20message%20once%2C%20my%20program%20will%20wake%20up%20and%20then%20go%20back%20to%20sleep.%20However%2C%20when%20I%20send%20two%20or%20three%20wake-up%20messages%2C%20the%20software%20can%20recognize%20the%20valid%20wake-up%20source%20and%20maintain%20wake-up.%20Why%20is%20this%3F%20Thank%20you.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984376%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K312%20sleep%20wakeup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984376%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E1.%20If%20my%20software%20detects%20a%20valid%20wake-up%20source%2C%20it%20will%20maintain%20a%20wake-up%20state.%20In%20this%20case%2C%20if%20I%20only%20trigger%20a%20wake-up%20event%20once%20after%20the%20MCU%20goes%20to%20sleep%2C%20the%20MCU%20will%20only%20wake%20up%20and%20then%20quickly%20go%20to%20sleep%20again.%20It%20is%20believed%20that%20the%20valid%20wake-up%20source%20is%20not%20recognized.%20If%20the%20MCU%20is%20triggered%20two%20or%20three%20times%20after%20sleep%2C%20it%20can%20recognize%20the%20valid%20wake-up%20source%20and%20maintain%20wake-up.%20Therefore%2C%20I%20think%20that%20on%20the%20K3%20platform%2C%20only%20triggering%20a%20wake-up%20event%20once%20can%20only%20wake%20up%20and%20reset%20the%20MCU.%20If%20there%20is%20no%20second%20or%20third%20wake-up%20event%2C%20the%20MCU%20will%20immediately%20go%20to%20sleep%20again%20after%20resetting.%20Is%20my%20conclusion%20correct%3F%20Thank%20you%3C%2FLINGO-BODY%3E