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.

CCS/CC3235MODSF: Is 'open drain' mode supported on the CC3235SF

Part Number: CC3235MODSF


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.

  • Hi  Chris,

    This is correct. When muxed to the I2C peripheral open drain is not option. Only when muxed to GPIO peripheral will that work. You will need to dynamically reconfigure the pin or use another pin to measure it. 

    BR,

    Vince 

  • Hi Vince,

    Thanks for your response. 

    In the mean time, I found some details of open drain, pull-up, pull-down are described in SWRU543A,  Section 16 - I/O Pads and Pin multiplexing (I was looking under GPIO before)

    I did get it to work in the end, but only by re-configuring the pin on the fly, and it took a while to find a way to do that without generating unwanted transitions on the pin.

    The SDK-supplied GPIO_setConfig() is only just fast enough to allow implementation of onewire for my temperature sensor (DS1820).  If I can find some more time on ths project, I may try writing directly to the GPIO_PAD_CONFIG_xx register - there's a lot in GPIO_setConfig which is not needed in my use-case.

    SWRU543A, page 619, shows are four bits of CONFMODE which are not fully explained.  I suspect it would be possible to manipulate these to achieve what I need, if I could find detailed documentation of how those bits are decoded.

    Marking as 'resolved' for now.  I will ask a related question about the CONFMODE bits.