This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS570LC4357: Why do some pins appear to be perpetually on? (Need help using the gioSetBit command

Part Number: TMS570LC4357

Tool/software: Code Composer Studio

Hello,

I tried previously to turn on a pin M1 (GIOA7) using the command gioSetBit(PORTA,7,1), and it appeared to work, however, when I load another program with the command gioSetBit(PORTA,7,0) the pin doesn't turn off. It's still outputting a voltage.

Also, it seems that since I've run the original program, random pins across the board are just on for some reason. (V5,W8,C3,A7 just to name a few)

Anyone have some idea what's going on??

  • Hello,

    Please check how you are configuring gio port in the program where GIO is not responding to your commands (check PINMUX Tab and Port A tab ).

    In Drivers Tab enable gio driver and disable all unused modules.

    GIO driver must be enabled. In PINMUX Tab GIOA check box must be enabled an all conflicts must be resolved. From GIO, Port A tab set GIOA[7] as output (enabling DIR check-box).

    Best regards,
    Miro

  • Hi Miro,

    Pin M1 is still outputting 3.15V no matter what I do. Even if I'm holding down the PORRST button, it doesn't affect the signal at all.

    In fact, I even tried disconnecting the black power chord, and only leaving the USB cable in, and the pin appears to be outputting 1.445V

  • Hello,

    All I/O signals except nRST are configured as inputs while nPORRST is low and immediately after nPORRST goes High. While nPORRST is low, the input buffers are disabled, and the output buffers are disabled with the default pulls enabled. All terminals with default GIO signals are configured as inputs and pulled down internally during this reset phase. Once the system reset is released, the I/Os are controlled by the default states of the individual control registers. For example, the GIODIRx register defaults to configuring all GIOx terminals as inputs (DIR = 0). In this case the value of the DOUT, DSET and DCLR registers do not affect the terminals. The pull select registers (PULSEL) define the pull applied to the terminals. In case of GIOx terminals, the pull-select registers default to applying a pull-down on the terminals.

    Best regards,

    Miro

  • Hm, that makes sense, but then how can I go about using C code to actually set a pin as high or low on command?