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.

TMS320F28379D: GPIO Issue

Part Number: TMS320F28379D


Hi all,

I am using TMS320F28379D microcontroller for my applications. For my first application I am using "X"code and flashing into this. Without any issues I am able to run my system. However when I use same micro controller for "Y" code, I am getting "X" code output at "Y" code undefined GPIO.

For example if I defined 9 GPIO pins for "X" code and 8 GPIO pins for "Y" code. After Flashing "Y" code into microcontroller I am getting excepted outputs at defined GPIO pins and also I am getting X code output at undefined GPIO pin of Y code. I am not sure why it is happening like this and also I don't where I am doing mistake.

Is it possible to permanently store in TMS micro controller? If I didn't define particular GPIO will that give old code output? 

In my case I am getting pulses from extra GPIO when I flash "Y" code. Since in "X" code I used this extra pin for pulses generation. 

Note: IF define extra pin in "Y" code as zero I am getting zero but only under undefined condition I am getting X code pules output at that pin. 

Please let me know the what could be the reason for this.... Thanks 

  • Hello,

    For example if I defined 9 GPIO pins for "X" code and 8 GPIO pins for "Y" code. After Flashing "Y" code into microcontroller I am getting excepted outputs at defined GPIO pins and also I am getting X code output at undefined GPIO pin of Y code. I am not sure why it is happening like this and also I don't where I am doing mistake.

    Undefined GPIO pins are not guaranteed to have specific behavior; if you want to verify that certain pin connections have expected values, you must define this behavior in your code. If you're not leaving these pins in an undefined state (i.e. you are setting the direction, pull-up enables, and value appropriately) and are still seeing unexpected behavior, let me know. The GPIO pins are used by other peripherals and may have different outputs/inputs than what you're expecting if you aren't using them within your program.

    Is it possible to permanently store in TMS micro controller? If I didn't define particular GPIO will that give old code output? 

    If you're programming to Flash then relatively speaking it is 'permanent'. Are you power cycling the board and the GPIO are still behaving unexpectedly?

    Best regards,

    Omer Amir

  • Thanks for the reply,

    Yes, after power cycle also same before.

    My observation:

    Today I probed both input and output of the buffer and observed the expected output (zero) even under defined GPIO18 condition. However after removing the probe from buffer input side I observed 50 HZ pulses and also sometimes 3.3 V at output of the buffer 1 (GPIO18). 

     Also I observed pulses at same buffer output side when I keep my hand near to the TMS320 GPIO18 side or by pressing TMS320 but after removing the output was normal. 

    From the above experiment I belive that this not because of TMS320 it may be due to static energy created by hand or something on buffer input. Please correct me if I am wrong.

    Note: I did not see any unexpected behaviour after defining GPIO 18 to push-pull configuration. For your reference I have attached the schematic of my circuit. 

    Kindly provide if you have any further information on this. Thanks 

  • Hello,

    However after removing the probe from buffer input side I observed 50 HZ pulses and also sometimes 3.3 V at output of the buffer 1 (GPIO18).

    To confirm, this is with GPIO18 properly defined? Do you have a picture of your scope reading of this noise? Is this pin configured as an input or output at the time of the measurement?

    Also I observed pulses at same buffer output side when I keep my hand near to the TMS320 GPIO18 side or by pressing TMS320 but after removing the output was normal. 

    From the above experiment I belive that this not because of TMS320 it may be due to static energy created by hand or something on buffer input. Please correct me if I am wrong.

    These are metal pins, so yes they can be affected by ambient noise. Are you using anything to prevent noise on the input? Is the GPIO taking reading incorrect values as a result of the noise?

    Note: I did not see any unexpected behaviour after defining GPIO 18 to push-pull configuration. For your reference I have attached the schematic of my circuit. 

    I feel like I may be misunderstanding something with the post; are you generally asking why there is unpredictable readings when the GPIO pin configuration is left undefined? Or are you seeing unexpected behavior that is showing up whether the pin is configured properly or not?

    Best regards,

    Omer Amir

  • 1.To confirm, this is with GPIO18 properly defined? Do you have a picture of your scope reading of this noise? Is this pin configured as an input or output at the time of the measurement?

    Reply: No, it was undefined when I see noise. It's square pulses of 50 Hz , 12 KHz (basically it's varying based on my hand position on TMS 320). Sometimes showing 3.3 V even if I have not put hand. This  measurement is not on GPIO 18, it is on buffer output side.

    For now I don't have waveforms but I have saved in pendrive, soon I ll post here.

    2. These are metal pins, so yes they can be affected by ambient noise. Are you using anything to prevent noise on the input? Is the GPIO taking reading incorrect values as a result of the noise?

    Reply: I have not defined this GPIO either input nor output, it just undefined pin. Also I didn't see any noise in DSO when I probe on GPIO. I believing this mainly because of buffer. Since after undefine a GPIO pin has output with push-pull configuration everything looks normal.

    No, Did not used any prevent noise circuit either side (TMS320/buffer input or buffer output side). Please let me know if you have any idea what to use for this. I thinking pulldown resistor at input side of buffer will solve this issue. 

    3. I feel like I may be misunderstanding something with the post; are you generally asking why there is unpredictable readings when the GPIO pin configuration is left undefined? Or are you seeing unexpected behavior that is showing up whether the pin is configured properly or not?

    Reply: I think this not because of GPIO or TMS320 controller. This may be due to poor design of buffer circuit. Since there was no pulldown resistor at input side of the buffer to prevent this type of noise or static engery.

  • Hello,

    (As a note, you can highlight the text of my reply and click "Quote" to copy the text into your reply, this will make it easier to read)

    No, it was undefined when I see noise.
    This  measurement is not on GPIO 18, it is on buffer output side.
    I have not defined this GPIO either input nor output, it just undefined pin. Also I didn't see any noise in DSO when I probe on GPIO. I believing this mainly because of buffer. Since after undefine a GPIO pin has output with push-pull configuration everything looks normal.

    I don't think I understand the actual issue here; if you are using a pin, it needs to have a defined configuration. If it doesn't, you will have unpredictable behavior, there isn't a way to avoid this besides defining your system properly. Are you using GPIO18 in your program? If so, it needs to have a define configuration. If not, I'm not sure if there is a concern that this GPIO will affect the rest of the program you are running, but it shouldn't.

    I think this not because of GPIO or TMS320 controller. This may be due to poor design of buffer circuit. Since there was no pulldown resistor at input side of the buffer to prevent this type of noise or static engery.

    The GPIO does not have a pull-down resistor, if you intend to use one you need to add it on your hardware (there is a pull-up resistor as part of the input). Figure 8-1 GPIO Logic for a Single Pin shows what exactly the circuit for a GPIO pin looks like. Please take a look and let me know if you have any questions on this diagram.

    Best regards,

    Omer Amir