5 years, 4 months ago.

Avoid high level at RxD-2 after startup

Hello,

I kindly ask for help regarding the OM11043(LPC1768) hardware.

I connect the OM11043 to another device via its RxD2 (only reading). The corresponding Serial-object is declared statically and therefore is defined quite early, especially before main() is called. As during these tests the mbed-USB-connection is not used the device seems to start up quicker (it is just an impression, I can't measure it).

Both devices are powered by the same battery (and on-switch) so power-on is quite common.

The other device MUST NOT see a high level on the line (it's TxD, on which it listens for a short time) during the first 1ms after power up.

I have measured that the LPC1768 immediately after power up outputs about 2 volts on RxD2. The 2 volts let me guess that it is from an internal pull-up resistor.

This lets the other device not start up as needed.

What can I do?

I do not want to solder extra hardware - is there a possibiloity to configure the RxD2 as a "pure" input from beginning on? I would like to avoid to instanciate the Serial-object dynamically after a wait loop, as I want to avoid the useage of the storage management routines (new, malloc etc). Also this would not take the pull-up away from the pin.

Is there a possibility to influence the startup-settings of this pin (pure input instead of pull-up)?

Thank you in advance and kind regards, Helmut

P.S.: Again I would have preferred to start a discussion thread, but this didn't work, I don't know why.

Question relating to:

Rapid Prototyping for general microcontroller applications, Ethernet, USB and 32-bit ARM® Cortex™-M3 based designs

1 Answer

5 years, 4 months ago.

The behaviour of the RXD pin is quite normal for most microcontrollers (ARM or otherwise): at reset all pins are switched to DigitalInput mode with a weak pull-up to high level. This is probably what you see. As soon as you code starts the Serial port instantiation it will change the mode of the RxD to a serial input (probably again with a weak pullup). Without external hardware there is not much you can do to fix your problem. Some solutions are: use a pull-down resistor on the TxD of your external device and also use a pull-down on the RxD of mbed, then add a (Schottky) diode to connect TxD to RxD2 so that it can only drive it to high level. An easier solution may be to let mbed control the reset line of the external device. Keep the device reset until mbed has been initialised or just reset it again when mbed is ready. You could also achieve that by letting mbed control the power to the external device.

Accepted Answer

Hello Wim, thank you for the answer, I was afraid that there is no SW solution. I cannot guarantee that the two devices boot precisely at the same time and any atempt to be "quick enough" for a proper setting (pullup off) in main() will work sometimes and will not work the other times.

Controlling reset or even power is not possible, my hardware is the "guest".

Hardware: I had a CD4007 at hand to build a non-inverting buffer with open drain output, but it doesn't work, I think 3.3V is not enough at least for my sample. Now I try out a voltage follower with an OPA342 which is also at hand (we have weekend... :-).

Again thank you and kind regards, Helmut

posted by Helmut Stettmaier 18 Oct 2015