Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

Concerto - Does the GPIO Toggle function work?

Other Parts Discussed in Thread: CONTROLSUITE

This does not work (code is on the C28 side):

GpioDataRegs.GPCTOGGLE.bit.GPIO70=1;

The bit/output always stays at 0.

However, with no other changes, replacing the above line with the following works as planned:

if (GpioDataRegs.GPCDAT.bit.GPIO70==1)
 GpioDataRegs.GPCCLEAR.bit.GPIO70=1;

else
 GpioDataRegs.GPCSET.bit.GPIO70=1;

Am I missing something?

EDIT: One thing to note, this is happening at a loop that is executing every 1-2Hz, if that matters.

  • William Perdikakis said:

    This does not work (code is on the C28 side):

    GpioDataRegs.GPCTOGGLE.bit.GPIO70=1;

    The bit/output always stays at 0.

    However, with no other changes, replacing the above line with the following works as planned:

    if (GpioDataRegs.GPCDAT.bit.GPIO70==1)
     GpioDataRegs.GPCCLEAR.bit.GPIO70=1;

    else
     GpioDataRegs.GPCSET.bit.GPIO70=1;

    Am I missing something?

    EDIT: One thing to note, this is happening at a loop that is executing every 1-2Hz, if that matters.

    William,

    It should work - we will get a card and try it out.  I don't think your rate of changing the pin is too quick, but one thing you could try is single stepping the TOGGLE instruction to see if that changes the behavior. 

    -Lori

  • William,

    I will be happy to look into the issue. Are you running an example code that comes with controlSUITE?

    Thanks

    Noah

  • Lori,

    I have tried stepping through the code and verifying the value in the GPCDAT register directly under the "Expressions" tab in Debug mode.

    Not only this, but GPIO70 connects to an LED on the Concerto Control Card. At 1 -2 Hz, there is a visual indication that this is working. Using toggle = no blink, using an outright conditional = blink.

    Noah,

    I was not using an example project, however, I checked one of the examples and interestingly enough, the project blinky does not use the toggle function either, when this seems like the perfect spot for it. Instead, the code looks as follows.

    <* Setup Snip>

    // Step 6. IDLE loop. Just sit and loop forever (optional):
    for(;;)
    {
    //
    // Turn on LED
    //

    GpioG1DataRegs.GPCDAT.bit.GPIO70 = 0;
    //
    // Delay for a bit.
    //
    for(delay = 0; delay < 2000000; delay++)
    {
    }

    //
    // Turn off LED
    //
    GpioG1DataRegs.GPCDAT.bit.GPIO70 = 1;
    //
    // Delay for a bit.
    //
     for(delay = 0; delay < 2000000; delay++)
    {
    }
    }

    Changing the code to this does not work:

    // Step 6. IDLE loop. Just sit and loop forever (optional):
    for(;;)
    {
    //
    // Toggle LED
    //
    GpioG1DataRegs.GPCTOGGLE.bit.GPIO70=1;
    //
    // Delay for a bit.
    //
    for(delay = 0; delay < 2000000; delay++)
    {
    }
    }

  • William, 

    You must have an early silicon version which has issues on PORTC as specified in the errata sheet.

    http://www.ti.com/lit/er/sprz357d/sprz357d.pdf page 17

    Rev A silicon has the issue resolved.

    Thanks

    Noah

  • Noah,

    That sounds right.  My device marking prefix is "X" (experimental).

    Thanks!

  • Good ! I've notice the same problem