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 !
Solved! Go to Solution.
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.
Hi @Ashlie ,
Can you specify which target device and which SW package version you're working on?
Hi @Ashlie ,
As per Reference Manual, section Wake-up sources:
for Pin PTD4, there're below modes:
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
Hi @cuongnguyenphu ,
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.
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.