Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 4 months ago.
Avoid high level at RxD-2 after startup
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:
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.