Pullup Voltage on Wakeup Pin

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

Pullup Voltage on Wakeup Pin

706 Views
ASN7
Contributor III

I am using an S32K314 on a custom board and would like to use the wakeup (WKPU) functionality. My requirement is for the MCU to wake up on a falling edge on pin PTA25. To achieve this, in the MEX configuration, I configured PTA25 as WKPU34 (with the offset applied; the corresponding hardware channel is 38). The pin is enabled and configured with an internal pull-up.

On the hardware side, only a multimeter is connected to PTA25—there are no other external components on this pin.

So I initially wanted to measure the voltage on this pin, so after Clock_Ip_Init and Siul2_Port_Ip_Init, the voltage measured on PTA25 is approximately 2.227 V. If I initialize SIUL2 only (without clock initialization), the voltage on the same pin measures about 5.102 V.

WKPU0_CLK is sourced from AIPS_SLOW_CLK, AIPS_SLOW_CLK is 40 MHz, SCS_CLK is set to PLL PHI0 which is at 160 MHz.
RTD Version:3.0.0 (S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331)
S32KDS Version:S32 Design Studio for S32 Platform, Version: 3.5, Build id: 240924 (Update 14)

How is the clock initialization affecting the pull-up voltage on PTA25? What could be causing this issue ?

0 Kudos
Reply
1 Reply

563 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @ASN7,

The pin PTA25 shares functionality with the OSC32K, as shown in the S32K314_IOMUX excel file:

PTA25 SIUL_MSCR25 0000_0000 GPI[25] SIUL  
  - - OSC32K_EXTAL OSC32K External Oscillator Input
  - - WKPU[34] WKPU Wakeup Input
  SIUL_IMCR533 0000_0010 EIRQ[5] SIUL External Interrupt
  SIUL_IMCR600 0000_0010 eMIOS_1_CH[8]_X eMIOS_1 eMIOS Channel
  SIUL_IMCR632 0000_0010 eMIOS_2_CH[8]_X eMIOS_2 eMIOS Channel
  SIUL_IMCR666 0000_0110 FXIO_D2 FXIO FlexIO Bi-directional Shift/timer I/O

 

I have not tested the functionality, but this is most likely the root cause. Make sure to disable the oscillator, this can be checked in the OSCON bitfield in the SXOSC control register. It can also be reset manually with the following code line:

IP_SXOSC->SXOSC_CTRL &= ~SXOSC_SXOSC_CTRL_OSCON_MASK;

I think that when using the RTDs, SXOSC is enabled by default, so it has to be disabled.

Best regards,
Julián

%3CLINGO-SUB%20id%3D%22lingo-sub-2295026%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EPullup%20Voltage%20on%20Wakeup%20Pin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2295026%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20using%20an%20S32K314%20on%20a%20custom%20board%20and%20would%20like%20to%20use%20the%20wakeup%20(WKPU)%20functionality.%20My%20requirement%20is%20for%20the%20MCU%20to%20wake%20up%20on%20a%20falling%20edge%20on%20pin%20PTA25.%20To%20achieve%20this%2C%20in%20the%20MEX%20configuration%2C%20I%20configured%20PTA25%20as%20WKPU34%20(with%20the%20offset%20applied%3B%20the%20corresponding%20hardware%20channel%20is%2038).%20The%20pin%20is%20enabled%20and%20configured%20with%20an%20internal%20pull-up.%3C%2FP%3E%3CP%3EOn%20the%20hardware%20side%2C%20only%20a%20multimeter%20is%20connected%20to%20PTA25%E2%80%94there%20are%20no%20other%20external%20components%20on%20this%20pin.%3C%2FP%3E%3CP%3ESo%20I%20initially%20wanted%20to%20measure%20the%20voltage%20on%20this%20pin%2C%20so%20after%20Clock_Ip_Init%20and%20Siul2_Port_Ip_Init%2C%20the%20voltage%20measured%20on%20PTA25%20is%20approximately%202.227%20V.%20If%20I%20initialize%20SIUL2%20only%20(without%20clock%20initialization)%2C%20the%20voltage%20on%20the%20same%20pin%20measures%20about%205.102%20V.%3C%2FP%3E%3CP%3EWKPU0_CLK%20is%20sourced%20from%20AIPS_SLOW_CLK%2C%20AIPS_SLOW_CLK%20is%2040%20MHz%2C%20SCS_CLK%20is%20set%20to%20PLL%20PHI0%20which%20is%20at%20160%20MHz.%3CBR%20%2F%3ERTD%20Version%3A3.0.0%20(S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331)%3CBR%20%2F%3ES32KDS%20Version%3AS32%20Design%20Studio%20for%20S32%20Platform%2C%20Version%3A%203.5%2C%20Build%20id%3A%20240924%20(Update%2014)%3C%2FP%3E%3CP%3EHow%20is%20the%20clock%20initialization%20affecting%20the%20pull-up%20voltage%20on%20PTA25%3F%20What%20could%20be%20causing%20this%20issue%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2296808%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Pullup%20Voltage%20on%20Wakeup%20Pin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296808%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F242204%22%20target%3D%22_blank%22%3E%40ASN7%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThe%20pin%20PTA25%20shares%20functionality%20with%20the%20OSC32K%2C%20as%20shown%20in%20the%20S32K314_IOMUX%20excel%20file%3A%3C%2FP%3E%0A%3CTABLE%20width%3D%221011%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3EPTA25%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3ESIUL_MSCR25%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E0000_0000%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3EGPI%5B25%5D%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3ESIUL%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3E%3CSTRONG%3E-%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E%3CSTRONG%3E-%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3E%3CSTRONG%3EOSC32K_EXTAL%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3E%3CSTRONG%3EOSC32K%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3E%3CSTRONG%3EExternal%20Oscillator%20Input%3C%2FSTRONG%3E%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3E-%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E-%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3EWKPU%5B34%5D%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3EWKPU%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3EWakeup%20Input%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3ESIUL_IMCR533%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E0000_0010%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3EEIRQ%5B5%5D%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3ESIUL%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3EExternal%20Interrupt%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3ESIUL_IMCR600%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E0000_0010%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3EeMIOS_1_CH%5B8%5D_X%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3EeMIOS_1%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3EeMIOS%20Channel%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3ESIUL_IMCR632%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E0000_0010%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3EeMIOS_2_CH%5B8%5D_X%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3EeMIOS_2%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3EeMIOS%20Channel%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2258.1458px%22%20height%3D%2225px%22%3E%26nbsp%3B%3C%2FTD%3E%0A%3CTD%20width%3D%22121.312px%22%20height%3D%2225px%22%3ESIUL_IMCR666%3C%2FTD%3E%0A%3CTD%20width%3D%22100.979px%22%20height%3D%2225px%22%3E0000_0110%3C%2FTD%3E%0A%3CTD%20width%3D%22192.917px%22%20height%3D%2225px%22%3EFXIO_D2%3C%2FTD%3E%0A%3CTD%20width%3D%22125.938px%22%20height%3D%2225px%22%3EFXIO%3C%2FTD%3E%0A%3CTD%20width%3D%22410.375px%22%20height%3D%2225px%22%3EFlexIO%20Bi-directional%20Shift%2Ftimer%20I%2FO%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20have%20not%20tested%20the%20functionality%2C%20but%20this%20is%20most%20likely%20the%20root%20cause.%20Make%20sure%20to%20disable%20the%20oscillator%2C%20this%20can%20be%20checked%20in%20the%20OSCON%20bitfield%20in%20the%20SXOSC%20control%20register.%20It%20can%20also%20be%20reset%20manually%20with%20the%20following%20code%20line%3A%3C%2FP%3E%0A%3CP%3EIP_SXOSC-%26gt%3BSXOSC_CTRL%20%26amp%3B%3D%20~SXOSC_SXOSC_CTRL_OSCON_MASK%3B%3C%2FP%3E%0A%3CP%3EI%20think%20that%20when%20using%20the%20RTDs%2C%20SXOSC%20is%20enabled%20by%20default%2C%20so%20it%20has%20to%20be%20disabled.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E