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.
11 years, 1 month ago.
Is there a way to disable soft-reset?
Hi,
I've run into a bizarre problem: I've got two devices connected via serial connection. One is an mbed, the other one a board that controls a bank of relays. To open the relays I send down 0x00, which so happens to also be the break-character to trigger a soft-reset on the mbed.
For some reason, midway through an automated process and for no apparent reason, it seems that 0x00 is sent to BOTH serial connections instead of just the relay bank. I don't know how that happens but it seems to be a rather deep-seated problem within Ubuntu and/or PySerial (which I use to control the serial ports).
The quickest workaround I was thinking is to somehow disable the soft-reset on the mbed to just ignore the incorrectly sent break signals. Is that possible?
any help would be much appreciated!
2 Answers
11 years, 1 month ago.
A break signal should be longer than 0x00, they are something different. If you send 0x00 with a too low baudrate it could end up as a break signal. So that would be the first question, do they run at different baudrates, and is it an option to run them at the same rate. Then you could simply filter the 0x00 received on the mbed side.
I don't think it is possible to disable the soft-reset on the mbed. You can use other serial pins with an USB<>Serial bridge. Or use the USB pins of the mbed to create another USBSerial port.
That said your computer shouldn't be sending random break conditions to the wrong serial port.
11 years, 1 month ago.
yes, they run at different baud-rates (mbed: 912600, relay board: 2400). The rate for the relay board is fixed and I want to keep the mbed one high as I need to send data at a high rate.
How can I filter the break signal on the mbed side? That should work.
And yes, I agree, it shouldn't happen in the first place. And it doesn't happen very often, only sometimes. When it does happen I need to restart the PC and its back to normal
Yeah when a 0x00 will indeed be seen as a break signal. Probably pretty much everything will be seen as a break signal with that difference in baudrates.
I don't think you can disable it, considering it is the interface chip doing it. The only way around it I see is bypassing the interface chip. Either by using USBSerial over the LPC1768s USB pins, or regular Serial and a USB<>Serial adapter in between.
posted by 29 Sep 2013Okay, thanks! I think what I will do is to connect the relay board to the mbed and control it through that so that I only have one serial connection on the PC and its the mbed generating the 0x00 signal. A RS232 shifter should probably do the trick (https://www.sparkfun.com/products/589).
posted by 29 Sep 2013