0
\$\begingroup\$

I am attempting to use a board that performs level shifting from a 5V GPIO pin to a 3.3V RSTn pin on a Decawave DWM1000 Module via a SN74LVC2G17DBVR.

The problem is, as discussed in Section 5.6.3 of the datasheet, the external source of the RSTn pin must be open-drained as soon as the chip has been reset. If it were directly connected to the GPIO pin, then it would simply require that the pin be configured as a high-impedance input after driving low. However, I suspect that the trigger is complicating things.

In order to initiate a reset, the GPIO pin is configured as an output with a low value. It then holds this value for 2 milliseconds and then is configured to a high-impedance input. I think that the trigger cannot allow an output to float, and so the reset can only be driven high or low.

So I guess my question is this: Is there a modification that I can make to the existing board that can address this issue? If not, what component should I use instead?

\$\endgroup\$
  • \$\begingroup\$ (a) "Is there a modification [...] that can address this issue?" - What exact "issue" do you have? The behaviour in the datasheet for the RSTn pin is similar to that for several MCUs, and there is no issue there. || You said "I think that the trigger cannot allow an output to float [...]" (b) What is the "trigger"? I don't think you said so, but is it your ext PCB? (c) A floating output is exactly what an un-driven open-drain output is - so how is that not "allowed"? (d) Schematic for your PCB, available where? || So far, I don't see why a 5V GPIO configured as open-drain o/p, can't be used. \$\endgroup\$ – SamGibson Nov 30 '16 at 23:52
  • 1
    \$\begingroup\$ Why is the Schmitt trigger needed here? It sounds like you should be able to drive it directly from an open drain output pin... \$\endgroup\$ – ThreePhaseEel Dec 1 '16 at 0:57
  • \$\begingroup\$ this is a really good point about direct driving the pin. I'll try it out. \$\endgroup\$ – Mephistopheles Dec 1 '16 at 1:49
3
\$\begingroup\$

I didn't see answers to any of my questions yet, but I think I might have worked-out (at least one of) the problem(s) you were asking about:

Using a 5V GPIO correctly as an open-drain output, won't be a problem to an input limited to 3.3V, which is expecting to be driven by an open-drain output. That's because the open-drain output either provides a low-resistance path to 0V, or else is effectively not there (apart from tiny leakage current). As an open-drain output, it doesn't output 5V (unlike a push-pull output), which seems to be a part of your concern.

It is clear from the Decawave DW1000 transceiver datasheet that its RSTn signal expects to be driven by an open-drain output:

An external source should open-drain the RSTn pin once the DW1000 has been reset.

Or it could be driven by a 3.3V (or 5V) GPIO output in push-pull mode, but only for driving the RSTn signal low, and then that MCU pin must be changed to become an input (in other words, it must not drive the signal high) as explained here:

If RSTn is controlled by a GPIO of an external micro-controller care should be taken to ensure that the GPIO is configured as high-impedance as soon as it is released from the LOW state.

However, the IC you mentioned you were using as a level converter (TI SN74LVC2G17 Dual Schmitt-Trigger Buffer) is not an open-drain output device!

Since driving RSTn low resets the Decawave IC, when you stop driving that signal low to the buffer (to end the reset), you are then driving that signal high (since that TI Schmitt-trigger is not an open drain output device). However the Decawave IC datasheet says:

RSTn should never be driven high by an external source.

Therefore you should not be driving the Decawave IC RSTn signal using that TI Schmitt-trigger buffer IC.

Options include:

  • drive the Decawave 3.3V RSTn signal input directly from the 5V GPIO which you mentioned, in open-drain mode, if you can be sure you will never drive the output high in push-pull mode, e.g. due to programming error or other causes outside your control;

or

  • use a suitable open-drain buffer IC between the 5V GPIO (this time configured in push-pull mode) and the 3.3V RSTn signal input.

Update: It's difficult to advice on a suitable open-drain buffer IC, without knowing the design constraints, and the reasons why the current 74LVC2G17 was chosen originally.

That 74LVC2G17 has two (non-open-drain) buffer gates per package. I found that NXP produce a 74LVC2G06 which has two open-drain, Schmitt-trigger, inverters. They seem to have the same pinout as your current 74LVC2G17 (but do double-check).

As the 74LVC2G06 gates are inverters, you would need to invert the logic of the GPIO pins driving them, in order to have equivalent behaviour to the 74LVC2G17 (and, of course, the 74LVC2G06 gates don't drive their outputs high), as shown here from the NXP datasheet.

74LVC2G06 logic table from the datasheet Source NXP datasheet

At least that is a starting point in your search for a more-suitable alternative device.

If you need more open-drain gates, then the (relatively common) 74LVC06 devices may be worth investigating.

\$\endgroup\$
  • \$\begingroup\$ Thanks a bunch! I ended up directly connecting the input pin and the RSTn pin, and just cutting the corresponding legs on the trigger, and it seems to work. \$\endgroup\$ – Mephistopheles Dec 1 '16 at 16:26
  • \$\begingroup\$ @Mephistopheles - You're welcome! As I said in my earlier comment, I still don't know what the "trigger" which you mention actually is, and without a schematic, I can't comment about the effects of cutting the legs on it. Also, please note my warning about directly connecting the MCU GPIO and the RSTn pin, if that is what you have done. But anyway, as long as you have extracted what you need from the answer and don't have any supplementary questions, then it doesn't matter that I don't understand how you have made your circuit work :-) Good luck! \$\endgroup\$ – SamGibson Dec 1 '16 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.