p2041 Problem with GPIO

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

p2041 Problem with GPIO

Jump to solution
531 Views
osmanzekier
Contributor II

Greetings,

I am trying to configure GPIO pins 16,17,30 and 31 as outputs. rcw 12 is set to 0xc8c39100. I can not test the output pins with a multimeter. It seems, from reading GPIODAT register, 16 and 17 works fine. 30 and 31 always seem to be 0. Pins are NOT set to open drain configuration. I tried rcw12 set to 0x88c39100 and 0x48c39100 also but it did not work. Any help is appreciated.

Thanks.

Labels (1)
0 Kudos
1 Solution
388 Views
lunminliang
NXP Employee
NXP Employee

Hello Osman Zeki ER,

From your RCW12, it seems you have RCW[360-361] bit field EC1 to be 0b11, don't you?

If the EC1 RCW is not set to be 0b01, then RCW[]352-353] field is meaningless.

And also as you are trying to set GPIO30 and 31 to be output, you may want to write the corresponding part in GPIODAT?


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
389 Views
lunminliang
NXP Employee
NXP Employee

Hello Osman Zeki ER,

From your RCW12, it seems you have RCW[360-361] bit field EC1 to be 0b11, don't you?

If the EC1 RCW is not set to be 0b01, then RCW[]352-353] field is meaningless.

And also as you are trying to set GPIO30 and 31 to be output, you may want to write the corresponding part in GPIODAT?


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

388 Views
osmanzekier
Contributor II

Hello Lunmin LIANG,

Having EC1 set to 0b01 has solved the issue. Thank you.

And by "reading GPIODAT register" I meant writing then reading.

Thank you again for your help.

0 Kudos