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/TMS320F28232: GPIO enabled for the TMS320F28232

Part Number: TMS320F28232


Tool/software: Code Composer Studio

Hi,

We have some issue for the GPIO of the TMS320F28232:

We want the GPIO76/GPIO77 to output high,There are 2 ways to slove these issues:

1.Modify the configuration register settings.

2.Defined the GPIO76/GPIO77 high.

now the first way is well and the other is failure.We used the same definition for the GPIO76 and GPIO77,

the signal of the high delay between GPIO76 and GPIO77(maybe 10ms - 200ms),please help to analyze why we met this issue,thanks?

  • User5005024,

    I am sorry I do not understand what you are writing about.

    1. Could you explain in more detail what is going on in solution 1 and 2?
    2. Have you enabled the Pull-ups on GPIO76 and GPIO77?
    3. Please provide the configuration code for GPIO76 and GPIO77.

    Regards,
    Cody 

  • Hi Cody,

    Sorry to reply you later.

    The below is the code of the GPIO initialization:
    GpioCtrlRegs.GPCPUD.bit.GPIO76 = 0;
    GpioCtrlRegs.GPCMUX1.bit.GPIO76 = 0;
    GpioCtrlRegs.GPCDIR.bit.GPIO76 = 1;

    GpioCtrlRegs.GPCPUD.bit.GPIO77 = 0;
    GpioCtrlRegs.GPCMUX1.bit.GPIO77 = 0;
    GpioCtrlRegs.GPCDIR.bit.GPIO77 = 1;

    The solution 1:
    Used the instruct of SET/CLEAR,the GPIO76/GPIO77 jump to high synchronous,the code as below:
    GpioDataRegs.GPCSET.bit.GPIO76 = 1; //OUTPUT HIGH
    GpioDataRegs.GPCSET.bit.GPIO77 = 1;

    GpioDataRegs.GPCCLEAR.bit.GPIO76 = 1; //OUTPUT LOW
    GpioDataRegs.GPCCLEAR.bit.GPIO77 = 1;

    The Oscillograph waveform like as picture SET/CLEAR(Green:GPIO76,Yellow:GPIO77)

    )


    The solution 2:
    Used the instruct of DAT,the GPIO76/GPIO77 jump to high desynchrony,the GPIO76 will be delayed and the
    lenght don't uncertained,the code as below:
    GpioDataRegs.GPCDAT.bit.GPIO76 = 1; //OUTPUT HIGH
    GpioDataRegs.GPCDAT.bit.GPIO77 = 1;

    GpioDataRegs.GPCDAT.bit.GPIO76 = 0; //OUTPU LOW
    GpioDataRegs.GPCDAT.bit.GPIO77 = 0;

    The Oscillograph waveform like as picture DAT(Green:GPIO76,Yellow:GPIO77):

    So please help to check if there is error in our code for this issue,thanks?

  • Edited for correctness 4/23 1:30PM CST.

    __________________________________________________

    Back-to-back writes to DAT registers do not function as expected. You should use solution 1 if you would like to toggle GPIOs.

    Please see the wiki.  

    Regards,
    Cody 

  • Hi Watkins,

    Thanks for your patient comment.We solve this issues.