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.

TMS320F28379S: Having problems using GPIO133 as a GPIO on the TMS320F28379s

Part Number: TMS320F28379S
Other Parts Discussed in Thread: C2000WARE

Does anyone know if it is possible to use the GPIO133/AUXCLKIN pin on the TMS320F28379s as a general purpose output? If so, do I need something different in my configuration to use it as an output? My code doesn't seem to let me control it as an output:-

    GPIO_setPadConfig(EN_400V, GPIO_PIN_TYPE_STD);          // Enable pullup on GPIO133
    GPIO_writePin(EN_400V, 0);                              // Load output latch
    GPIO_setPinConfig(GPIO_133_GPIO133);                    // GPIO133 = GPIO133 (Enable for 400V PSU)
    GPIO_setDirectionMode(EN_400V, GPIO_DIR_MODE_OUT);      // GPIO133 = output

Here, EN_400V is defined as 133

When I use the same code on GPIO132, I am able to configure it as an output and change its state like a normal GPIO

Thanks, Iain

  • Hello Iain,

    Looking at the technical reference manual for F28379S, it seems that GPIO133 can be used as an optional external clock, but it does not appear to be locked in that configuration in the GPIO muxing table (table 7-7). When you say the code doesn't let you control it as an output, do you mean that the output of GPIO133 does not change if you toggle it? If so, can you show me the code you wrote to toggle the pin?

    Best regards,

    Omer Amir

  • Hi Omer,

    Thanks for your reply. With GPIO pin setup as above, I ran my application using a debug connection and then toggle the GpioDataRegs.GPEDAT.bit.GPIO133 vale in the register window in CCS. It seems to be stuck high. If I do the same with the other GPIO's I have configured as outputs, using the same initialisation as above but for the relevant pin, I see the GPIOs toggle inline with what I put in the register in debug mode.

    I am wondering whether I need to do some extra configuration on the GPIO133 pin since it does seem to also be multiplexed with an AUXCLKIN input signal.

    Thanks, Iain

  • Hi Iain,

    Let me try and do some research to see if there is a known configuration for this pin, I will let you know once I discover anything.

    Best regards,

    Omer Amir

  • Sounds good, thanks Omer

  • Hello Iain,

    When you are debugging the program, can you verify that the GPIO configuration is as you expect it to be? For example, the direction and both GPyMUX and GPyGMUX1/2 registers have the correct values for GPIO133?

    Best regards,

    Omer Amir

  • Hi Omer,

    To check this out, I set another GPIO to compare. So, we have GPIO27 and GPIO133 now both configured as GPIO's and both as outputs. Here are the values of the GPyDIR and GPyMUX1/2 registers for the two pins:-

    I think this config should set both these pins up as GPIO outputs. When running my code in debug, I can modify the value of GpioDataRegs.GPADAT.GPIO27 in the register window and see GPIO27 toggle on the 'scope. When I try to do the same with GpioDataRegs.GPEDAT.GPIO133, the value cannot be changed from 0x1 in the register window and the GPIO133 pin doesn't change state on the 'scope.

    This isn't too much of a problem for me now since I have re-tasked one of the other spare GPIO's for the function I need but I would be curious to know for the future if I am doing something wrong here.

    Thanks for your help,

    Iain

  • Hello Iain,

    From what I have tested with a controlCARD, GPIO133 worked fine on my end. Was this code you are using from an example or your own handwritten code? If it's your own, can you try running one of the examples from this directory?

    C2000Ware_4_XX_XX_XX\driverlib\f2837xs\examples\cpu1\gpio

    Best regards,

    Omer Amir