Tool/software: Code Composer Studio
I am trying to implement a one-wire interface to a temperature sensor device.
For this, I ideally need to have the GPIO pin capable of operating in open drain mode, and be able to be read as an input when floating (i.e. '1' written to the port bit)
syscfg in ccs seems to offer this possibility but document SRWU543A does not cite this as a possibility for GPIOs in general, only when they are configured to be I2C data pins or similar.
Emprically, whilst 'open drain' appears to be working, in that if I write a '1' to the output, it can be held low by the peripheral, when I read the bit back, I think I'm getting the state of the output latch, rather than the state of the physical pin.
I guess I can achieve what I want by reconfiguring the GPIO pin on the fly, but that's a bit messy, and the timing is fairly tight for onewire bus. I may have to use a second input to read the pin - rather than turning round the single pin.