Hi, I have implemented the One-Wire protocol for the TM4C123BH6PGE, which features a very quick output-to-input transition. When I tried to read the temperature, everything worked fine, but I noticed a significant drop in current on my device. Later, I disconnected the One-Wire connection and tested the code again, only to find that I was still experiencing a loss of current. I have narrowed down the source of this current loss to this specific operation.unsigned int OneWireReset(void) {
OneWireSetOutput();
GPIOPinWrite(ONE_WIRE_PORT, ONE_WIRE_PIN, 0); // Drive the line low
delayMicroseconds(480); // Reset pulse time
OneWireSetInput(); // Release the line
delayMicroseconds(70); // Wait for presence pulse
unsigned int OW = OneWireRead(); // Read presence pulse
delayMicroseconds(410); // Wait for end of timeslot
return OW; // Return presence pulse status
}
I believe I am experiencing current loss due to switching to input mode too quickly. Has anyone encountered a similar issue before?