I have a custom printed circuit board that uses PG6 on a TM4C129XNCZAD to talk to a serial EEPROM using the one-wire protocol. I am using the following test code:
static bool busIsBusy(void)
{
UInt32 busStatus = OneWireBusStatus(ONE_WIRE_BASE);
return (0 != (busStatus & ONEWIRE_BUS_STATUS_BUSY));
}
void ONE_WIRE_debug(void)
{
SysCtlPeripheralEnable( SYSCTL_PERIPH_GPIOG );
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOG))
{
}
SysCtlPeripheralEnable(SYSCTL_PERIPH_ONEWIRE0);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_ONEWIRE0))
{
}
GPIOPinConfigure ( GPIO_PG6_OWIRE );
GPIOPinTypeOneWire( GPIO_PORTG_BASE, GPIO_PIN_6 );
OneWireInit( ONEWIRE0_BASE,
ONEWIRE_INIT_SPD_OD // overdrive speed bus timing
);
// wait for init to complete
while (busIsBusy());
while (1)
{
OneWireBusReset(ONEWIRE0_BASE);
sysDelayMilliseconds(5);
}
}
The code executes the loop where OneWireReset() is continually invoked, but I do not see any signals coming out on PG6.
I am using a logic analyzer that has one-wire protocol decoding built-in. I have it set to trigger on a high-to-low transition, but it never sees one.
I modified the code to configure PG6 as a GPIO output, and sent out low-going pulses periodically in a loop. In that case, the logic analyzer sees the signal, and correctly decodes it as a reset.
Any idea what I might be doing wrong when configuring the pin for one-wire? I think I followed the sample code in the TivaWare manual.
Thanks,
Dave