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.

TMS570LS1224: Enabling pull up and pull down for input, open drain and push pull for output in GIO

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Hello everyone,

I am an software engineer and working on a project with the TMS570LS1224 MCU.

I am trying to use pull up and pull down in input mode, and open drain and push pull in output mode using GIO pins.
I want to use the LED in GIOB[1] as open drain and push pull respectively with output mode, and I want to use the button in GIOB[2] with input mode as pull up and pull down respectively. Thus, I will see the effects of pull up, pull down, open drain and push pull in input and output modes.
Unfortunately, even though I made the configurations in HalCoGen, I cannot see the correct effect after running my code. The button always works as a pull up (even if I enable pull down). A similar situation happens with output configurations and it does not work correctly.

How can I accurately see the effects of pull-up, pull-down, push-pull and open drain?

Thank you for your help

Greetings

Fatih

  • Hi Fatih,

    I created one example project to test these things.

    I am explaining how i tested.

    1. Input Pull-down and Pull-up Test:

    To test this i took one GIO pin which doesn't have any switch, because if we choose the pin which have switch then we might not get good result because a external pull-up was connected to the switch right, so it will affect the result. so i choose GIOB_0.

    Now what i did was first i set pull-down and verified whether i am getting logic-0 or not and then i set pull-up and verified whether i am getting logic-1 or not.

    2. Output Open-drain Test:

    For this test i choose the pin which have LED and i verified visually this test. In this case i choose GIOB-1.

    First i set push/pull mode, in this mode LED should work normally. I mean if we set logic-1 then LED should glow and if we set logic-0 then LED should be OFF.

    Now i set open-drain mode, in this mode if we try to set logic-1 then output will be tristated (high impedance), so LED will be OFF only because there is no external pull-up connected to this LED pin. and in this mode if we write logic-0 then still LED will be in OFF only.

    I am attaching my complete project for your reference:

    Input_PULL_AND_Output_OD_TEST_RM46.zip

    --
    Thanks & regards,
    Jagadish.