S32K144 PORT

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

S32K144 PORT

Jump to solution
3,199 Views
Embedded_novice
Contributor III

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.pngSnipaste_2024-06-16_21-38-28.png

0 Kudos
Reply
1 Solution
3,153 Views
VaneB
NXP TechSupport
NXP TechSupport

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.pngVaneB_0-1718645352478.png

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

 

B.R.

VaneB

View solution in original post

2 Replies
3,195 Views
Embedded_novice
Contributor III

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?

0 Kudos
Reply
3,154 Views
VaneB
NXP TechSupport
NXP TechSupport

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.pngVaneB_0-1718645352478.png

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

 

B.R.

VaneB

%3CLINGO-SUB%20id%3D%22lingo-sub-1888252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K144%20PORT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1888252%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3BI%20want%20to%20configure%20the%20PORTB%20pins%20of%20S32K144%20in%20EB%20project%2C%20but%20I%20find%20that%20some%20of%20the%20PCR%20values%20of%20the%20pins%20are%20wrong%20after%20configuration%2C%20such%20as%20PORTB0-14%2C%20is%20there%20anything%20special%20about%20these%20pins%3F%20My%20MCU%20package%20is%20LQFP_100%2C%20thank%20you%20for%20your%20help!%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Snipaste_2024-06-16_21-38-28.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Snipaste_2024-06-16_21-38-28.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284342i30961E3B2C848504%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Snipaste_2024-06-16_21-38-28.png%22%20alt%3D%22Snipaste_2024-06-16_21-38-28.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ESnipaste_2024-06-16_21-38-28.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1888877%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20S32K144%20PORT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1888877%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%2F213197%22%20target%3D%22_blank%22%3E%40Embedded_novice%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESection%26nbsp%3B3.6%20(Driver%20usage%20and%20configuration%20tips)%20of%20the%26nbsp%3BUser%20Manual%20for%20S32K1_S32M24X%20PORT%20Driver%20provides%20a%20formula%20to%20obtain%20the%26nbsp%3BPortPinPcr%20value.%20For%20easy%20reference%2C%20I%20am%20adding%20it%20to%20my%20response%2C%20but%20you%20can%20find%20the%20document%20for%20example%20%3CEM%3E%3CSTRONG%3EC%3A%5CNXP%5CSW32K1_S32M24x_RTD_4.4_R21-11_2.0.0%5Ceclipse%5Cplugins%5CPort_TS_T40D2M20I0R0%5Cdoc%3C%2FSTRONG%3E%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3EThe%20value%20of%20actual%20PortPin%20Pcr%20is%20identified%20by%20the%20formula%3A%26nbsp%3B%3CEM%3E%3CSTRONG%3EPortPinPcr%20%3D%20PinId%20%2B%20PortId%E2%88%9732%3C%2FSTRONG%3E%3C%2FEM%3E.%26nbsp%3BWhere%20PortId%20is%20the%20numeric%20identifier%20of%20the%20port.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22VaneB_0-1718645352478.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22VaneB_0-1718645352478.png%22%20style%3D%22width%3A%20385px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F284496i6CA3A7069FBC4BAB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22VaneB_0-1718645352478.png%22%20alt%3D%22VaneB_0-1718645352478.png%22%20%2F%3E%3Cspan%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EVaneB_0-1718645352478.png%3C%2Fspan%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFor%20example%2C%20the%20PortPinPcr%20value%20of%20PTC7%20will%20be%207%20%2B%20(2%E2%88%9732)%20%3D%2071.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EB.R.%3C%2FP%3E%0A%3CP%3EVaneB%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1888255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20S32K144%20PORT%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1888255%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20see.%20It's%20my%20understanding.%20I%20think%20PORTA%20has%2018%20pins%2C%20so%20the%20PCR%20of%20PORTB_0%20should%20be%2019%2C%20but%20in%20fact%2C%20the%20PCR%20value%20is%20calculated%20according%20to%20the%20maximum%2032%20per%20PORT%20group%2C%20PORTA%20occupies%200-32%2C%20PORTB_0%20should%20start%20from%2033.%3C%2FP%3E%3CP%3EHowever%2C%20when%20I%20checked%20the%20section%20on%20the%20number%20of%20PORT%20pins%20in%20the%20RM%20manual%2C%20there%20seemed%20to%20be%20no%20clear%20mark%20indicating%20that%20I%20should%20calculate%20according%20to%20the%20absence%20of%2032%20pins%20in%20the%20PORT%20group.%20Could%20you%20tell%20me%20where%20in%20the%20manual%20to%20get%20this%20information%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E