How to configure Pin PTD4 as a low-level wake-up source from VLPS mode?

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

How to configure Pin PTD4 as a low-level wake-up source from VLPS mode?

Jump to solution
724 Views
Ashlie
Contributor III

Hello,

I wonder how to configure Pin PTD4 as a low-level wake-up source from VLPS mode. I can't find any options to choose a low level source in the icu module of the EB tresos. Please tell me what to do.

Thanks !

0 Kudos
1 Solution
607 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Ashlie ,
You're correct, EB Tresos doesn't support to configure all register in RM, so sometimes we need to manually config it by hard code.
However, in our SW package (i.e RTD AUTOSAR 4.4 version 1.0.1), we provide macro to help user define these registers by themself:
Module: Base/header/<TargetDerivetive>_PORT.h
#define PORT_PCR_IRQC_MASK (0xF0000U)
#define PORT_PCR_IRQC_SHIFT (16U)
#define PORT_PCR_IRQC_WIDTH (4U)
#define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK) 

So you can use it to set the IRQC in your application.


 

View solution in original post

0 Kudos
5 Replies
673 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Ashlie ,
Can you specify which target device and which SW package version you're working on?  

0 Kudos
671 Views
Ashlie
Contributor III
Hi cuongnguyenphu,
I use s32k144, and EB tresos's version is 26.0.1
0 Kudos
657 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Ashlie ,
As per Reference Manual, section Wake-up sources:

cuongnguyenphu_0-1682655364789.png

for Pin PTD4, there're below modes:

cuongnguyenphu_1-1682655904584.png

As I see you can only use ADC interrupt to wakeup from VLPS, otherwise you can choose another pin with other source wake-up follow with above Wake-up sources table

 

0 Kudos
632 Views
Ashlie
Contributor III

Hi @cuongnguyenphu ,

Ashlie_0-1683250212736.png

As you can see, If I configure this irq as a wakeup source from the PORT-PCRn by my hand-write, I can get the effect I want. But the configuration couldn't come true by EB. Maybe EB didn't support this function I guess.

0 Kudos
608 Views
cuongnguyenphu
NXP Employee
NXP Employee

Hi @Ashlie ,
You're correct, EB Tresos doesn't support to configure all register in RM, so sometimes we need to manually config it by hard code.
However, in our SW package (i.e RTD AUTOSAR 4.4 version 1.0.1), we provide macro to help user define these registers by themself:
Module: Base/header/<TargetDerivetive>_PORT.h
#define PORT_PCR_IRQC_MASK (0xF0000U)
#define PORT_PCR_IRQC_SHIFT (16U)
#define PORT_PCR_IRQC_WIDTH (4U)
#define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK) 

So you can use it to set the IRQC in your application.


 

0 Kudos