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.

Using GPIO35, 36,37 &38 for LCD output port in TMS320F28027

Other Parts Discussed in Thread: CONTROLSUITE

Hi, I would like to use GPIO 35 (TD0), GPIO36 (TMS), GPIO37 (TDI) & GPIO38 (TCK) of TMS 320F28027 as a output port. How do I do it? In CCS we configure any GPIO as below. GPIO_setMode(myGpio, GPIO_Number_34, GPIO_34_Mode_GeneralPurpose); GPIO_setDirection(myGpio, GPIO_Number_34, GPIO_Direction_Output); But for GPIO 35 (TD0), GPIO36 (TMS), GPIO37 (TDI) & GPIO38 (TCK), mode -General Purpose is not possible. Is it Ok to do below? What is mean by Mode-Rsvd_1,2 etc? GPIO_setMode(myGpio, GPIO_Number_35, GPIO_35_Mode_Rsvd_1); GPIO_setMode(myGpio, GPIO_Number_36, GPIO_36_Mode_Rsvd_1); GPIO_setMode(myGpio, GPIO_Number_37, GPIO_37_Mode_Rsvd_1); GPIO_setMode(myGpio, GPIO_Number_38, GPIO_38_Mode_Rsvd_1); Please support me. Regards, Mahesh K.R.
  • Hi Mahesh,

    There's nothing to panic. You can refer "gpio_setup" example from controlSuite; this will give you a total idea on how to configure GPIOs. Also, you can go through "gpio_toggle example" for using the internal functions.

    Regards,

    Gautam

  • Hi Gautam, Thanks for that. The gpio-setup is talking up to GPIO34. As you know, GPIO 35, 36, 37 & 38 are used for JTAG programming during flashing and wants to configure as a output port while working. This type of switching is not found anywhere. If you know how to switch the port, please let me know. Regards, Mahesh K.R.
  • Hello,

    I have never tried it but based on the documentation:

    Just set these JTAG pins (GPIO35-38) as 00 and modify the TRST pin to be 0, so these pins can be GPIO.

    If you success with this setting, please share.

    Good luck!

    Best regards,

    Maria

  • Hi Maria, Thanks for that. The grounding resistor 2.2K from TRST will ensure TRST pin to be zero. When I write the coding in CCS I have to Initialize the port. For eg. If I want to set port 34 as a output port I do below steps. GPIO_setMode(myGpio, GPIO_Number_34,GPIO_34_Mode_GeneralPurpose); GPIO_setDirection(myGpio, GPIO_Number_34, GPIO_Direction_Output); But for pins 35, 36, 37,&38, The "Mode_ General purpose" is not available. Where as Mode_Rsvd_1 is available. I don't know how do I use this mode for output port setting. If you have any idea, Please let me know. Regards, Mahesh K.R.
  • My idea is to put 0x00 as it is in GPIO_setMode. Because by default, 0x00 is GPIO select for GPIO35-38.

    GPIO_setMode(myGpio, GPIO_Number_35,GPIO_35_Mode_JTAG_TDI); //GPIO_35_Mode_JTAG_TDI = 0x00

    GPIO_setDirection(myGpio, GPIO_Number_35, GPIO_Direction_Output);

    etc...


    Best regards,

    Maria



  • Hi Maria, It is not working, When I try to debug, it is popping up with an error. Can any one help me , How to use GPIO 35, 36 37 & 38 as general purpose output for driving the LCD display? Please let me know How to initialise in CCS. Regards, Mahesh K.R.
  • Hello,

    I don't understand how you debug it.

    If you are using JTAG for debugging, i think you can't modify these JTAG GPIOs.

    Best regards,

    Maria