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.

TMS570LC4357: Diagnostic GIO1A/B - How does it work?

Part Number: TMS570LC4357

Hi experts,

I took a look at the answer you suggeted to my question here:
TMS570LC4357: Implementation of GIO1A and GIO1B (internal analog loopback) - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

After reviewing the code you posted here:
RM48L952: IO Loopback diagnostics - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums
I have several Questions.

The test is startet by reading the bit from DIN-Register for the corresponding pin:

txdata = SL_gioGetBit(sl_gioPORT, pin);

I do not understand what this line is for. The value stored in rxdata is never used:

rxdata = txdata;

The bit that has been read is flipped and written into DSET or DCLEAR (depending on the value). I assume this is done to force a change in the pin state:

txdata ^= (uint32)0x1U;

/* set txdata on the pin */
SL_gioSetBit(sl_gioPORT, pin, txdata);

After the pin has changed DIN register is read back and compared to the value written to DOUT through DSET/DCLEAR:


/* read back the value */
rxdata = SL_gioGetBit(sl_gioPORT, pin);

/* compare values */
if(rxdata == txdata)
{
    retVal = TRUE;
}
else
{
    retVal = FALSE;
}

As far as I understand this, the test does nothing else than write a value to DOUT and then check if DIN mirrors DOUT. Is this correct?

Thank you and best regards,
Max

  • Hi Max,

    I started working on your issue and will provide an update ASAP.

    --

    Thanks & regards,
    Jagadish.

  • Hi Max,

    Apologies for the delay in my response.

    As far as I understand this, the test does nothing else than write a value to DOUT and then check if DIN mirrors DOUT. Is this correct?

    Yes, this is correct. In this test we will test signal path of the GIO by writing a different value and readback the same.

    If any issues in the signal path of GIO then we may not read the value what we write on the path, and this indicates as a GIO signal path failure. This might look simple but it verifies the complete path (Like analog loopback), the readback value on the DIN is not just what we write the value is calculated based on the what the pin value present on that pin.

    I mean for example imagine the pin is shorted to the ground, and i am writing logic high using DSET register but after reading DIN register i don't get logic high as the pin shorted to the ground the result on the pin value will be logic zero. So, in this particular case our GIO analog fails and indicates a failure. So, this test looks simple but very effective and tests the complete GIO path.

    --

    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    This would mean that with a capacitive load we would have delay the readback of DIN after setting DOUT correct?

    Thank you and best regards,
    Max

  • This would mean that with a capacitive load we would have delay the readback of DIN after setting DOUT correct?

    You are right max, capacitive load will delay the readback.

    --

    Thanks & regards,
    Jagadish.