How to configure the SCT o/p pin as Bidirectional I/O

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

How to configure the SCT o/p pin as Bidirectional I/O

699 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prashanth_prabhu on Thu Jan 01 23:46:52 MST 2015
Hi

We have assigned SCT output COUT available in PINASSIGN6 to GPIO 13.

    LPC_SWM->PINASSIGN6 = (LPC_SWM->PINASSIGN6 & ~(0xFF<<24)) | ((0*32+13)<<24);    //P0.13 = CTOUT_0

We need to use this pin as GPIO input pin while reading ACK from follower and also for reading CEC data.
We tried deassigning SCT output to that pin and using as GPIO, also used GPIOSetDir( 0, 13, 1 ); to set direction as input. But none of these worked.

So, we need to know if there is any way this can be done.
Labels (1)
0 Kudos
Reply
4 Replies

657 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prashanth_prabhu on Thu Jan 08 03:20:31 MST 2015
Thanks mc for your valuable suggestion. Your suggestion helped us in completing the project.  :)


0 Kudos
Reply

657 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Fri Jan 02 15:11:00 MST 2015
Hi Prashanth,
See below comments

Quote:
We need to use this pin as GPIO input pin while reading ACK from follower and also for reading CEC data.
We tried deassigning SCT output to that pin and using as GPIO, also used GPIOSetDir( 0, 13, 1 ); to set direction as input. But none of these worked.



It means you are setting port as an output port.

Only de-assigning the SCT function will be needed , if GPIO direction is set as input. Please also check that you are not assigning any other function to this pin.
Also SWM clock should be turned on when assigning and de-assigning functions to pins. 
0 Kudos
Reply

657 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by prashanth_prabhu on Fri Jan 02 05:41:32 MST 2015
We are using LPC Xpresso 812 board
0 Kudos
Reply

657 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Fri Jan 02 04:49:36 MST 2015
What chip are you using?

Also,  the chips default to GPIO at reset.
0 Kudos
Reply