Getting the pin status using PINS_DRV_ReadPins

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

Getting the pin status using PINS_DRV_ReadPins

1,535 Views
abhinandan
Contributor II

Hi Community,

I am working on S32K118, I want to read the status of each pins of every port ('1' or '0'), I used PINS_DRV_READPINS function, but I am not getting the required result, can you please help me with this. I am attaching the part of the code as reference, kindly let me know where I am getting it wrong. I want to print the value returned by this function on the console.

Thank You

0 Kudos
Reply
3 Replies

1,511 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Abhinandan,

for reference, you can take a look at this SW example:

c:\NXP\S32DS.3.4\S32DS\software\S32SDK_S32K1XX_RTM_4.0.2\examples\S32K118\driver_examples\system\crc_checksum\

Did you configure that pin as input? For example from the project mentioned above:

lukaszadrapa_0-1652852019177.png

Did you call init function like this?

/* Initialize pins */
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);

Regards,

Lukas

0 Kudos
Reply

1,455 Views
abhinandan
Contributor II

Hi @lukaszadrapa ,

   Thank You for your time in replying to my query, I am unable to access the link which you mentioned, can please resend me the link.

Thank You

 

0 Kudos
Reply

1,449 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

You need to have S32 Design Studio 3.4 installed:

https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=S32DS-3-4

Then select:

lukaszadrapa_0-1653368314679.png

Update the SDK package to version RTM 4.0.2:

lukaszadrapa_1-1653368337154.png

And then you will find the example(s) at mentioned folder on c:\ drive. 

Regards,

Lukas

0 Kudos
Reply