1888252_en-US

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

1888252_en-US

1888252_en-US

S32K144 PORT

Hi:

    I want to configure the PORTB pins of S32K144 in EB project, but I find that some of the PCR values of the pins are wrong after configuration, such as PORTB0-14, is there anything special about these pins? My MCU package is LQFP_100, thank you for your help!Snipaste_2024-06-16_21-38-28.png

回复: S32K144 PORT

Hi @Embedded_novice 

Section 3.6 (Driver usage and configuration tips) of the User Manual for S32K1_S32M24X PORT Driver provides a formula to obtain the PortPinPcr value. For easy reference, I am adding it to my response, but you can find the document for example C:\NXP\SW32K1_S32M24x_RTD_4.4_R21-11_2.0.0\eclipse\plugins\Port_TS_T40D2M20I0R0\doc.

The value of actual PortPin Pcr is identified by the formula: PortPinPcr = PinId + PortId∗32. Where PortId is the numeric identifier of the port.

VaneB_0-1718645352478.png

For example, the PortPinPcr value of PTC7 will be 7 + (2∗32) = 71.


B.R.

VaneB

回复: S32K144 PORT

I see. It's my understanding. I think PORTA has 18 pins, so the PCR of PORTB_0 should be 19, but in fact, the PCR value is calculated according to the maximum 32 per PORT group, PORTA occupies 0-32, PORTB_0 should start from 33.

However, when I checked the section on the number of PORT pins in the RM manual, there seemed to be no clear mark indicating that I should calculate according to the absence of 32 pins in the PORT group. Could you tell me where in the manual to get this information?

Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 09:48 PM
Updated by: