Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: CReese on April 16, 2014, 05:16:37 PM

Title: Serial stops reading until power cycle.
Post by: CReese on April 16, 2014, 05:16:37 PM
Hello,

I'm using a CAN/serial converter: http://www.adfweb.com/download/filefold/CANbus_from_to_RS232_MN67290_ENG.pdf

I've got it set up to read messages happily using STREAMIN @IntSerial, but after a minute or two it just stops reading. No activity light on the CPU. The program is still cycling as it's logging failed read operations, and CAN device is still transmitting, as if I power down the CPU and then power it back up, I'm again receiving messages. Taking it out of run or stopping the PLC also doesn't do the trick. Any idea what could be happening here?

Thanks,
Colin
Title: Re: Serial stops reading until power cycle.
Post by: BobO on April 16, 2014, 05:19:44 PM
That sounds familiar. What version of firmware are you running?
Title: Re: Serial stops reading until power cycle.
Post by: CReese on April 16, 2014, 05:24:13 PM
1.1.0. No asterisk here on NetEdit.

C
Title: Re: Serial stops reading until power cycle.
Post by: BobO on April 16, 2014, 05:29:56 PM
NetEdit doesn't know how to update Do-more. Not sure what version fixed that, but it sounds like something that was fixed. Not in office, but I'll check later.
Title: Re: Serial stops reading until power cycle.
Post by: CReese on April 16, 2014, 05:45:49 PM
I updated ALL the things. No love.

Colin
Title: Re: Serial stops reading until power cycle.
Post by: BobO on April 16, 2014, 05:49:40 PM
What version? The bug was a condition that would cause the receive interrupt to get shut off in the internal serial port. It would run for a few seconds to a few minutes, stop receiving, and required a power cycle to fix. I'm pretty sure it was introduced in 1.1.0, and fixed shortly after.
Title: Re: Serial stops reading until power cycle.
Post by: CReese on April 16, 2014, 05:55:45 PM
DM: 1.3.0
OS: 1.2.0
Booter: 3.0.5
FPGA: 3.5
Hardware: 7B

I forgot I happen to have a serial module plugged into this guy, so I went ahead and switched over and it's working great. Happy to test and fix the internal serial though, as I don't really NEED an additional three serial ports in this applications.

Colin
Title: Re: Serial stops reading until power cycle.
Post by: BobO on April 16, 2014, 06:00:13 PM
So 1.2.0, huh? Poo.


What are your port settings, your PLC scan time, and what is the input data typically?
Title: Re: Serial stops reading until power cycle.
Post by: CReese on April 16, 2014, 06:11:47 PM
I've tried about every port setting there is.

For the CAN protocol converter, I need to use 115200 no parity. I've used 8/1 data/stop, and every combination under the sun for the other two settings. Data comes through fine, just very shortly. Interestingly, changing the serial settings does result in reads working shortly thereafter as well.
Title: Re: Serial stops reading until power cycle.
Post by: BobO on April 16, 2014, 09:30:22 PM
That is exactly the bug I fixed. After an update it works again because the port is reinitialized. I wonder if the fix got removed somehow...
Title: Re: Serial stops reading until power cycle.
Post by: BobO on April 17, 2014, 10:04:29 AM
After studying it, I think this is a different issue. It looks like if the port FIFO gets full, I'm shutting off the interrupt and not re-enabling when the data is read. I'll pursue that, but out of curiosity, when you do a DEVCLEAR on the serial port, does it start receiving again?
Title: Re: Serial stops reading until power cycle.
Post by: CReese on April 22, 2014, 04:37:26 PM
I will definitely check when I get over there. Thanks.
Title: Re: Serial stops reading until power cycle.
Post by: CReese on May 14, 2014, 06:26:47 PM
I'll test this when I'm back to the test bench, but do you have any more ideas? An uprev on design has eliminated my serial card.
Title: Re: Serial stops reading until power cycle.
Post by: BobO on May 14, 2014, 07:35:25 PM
It's been fixed in the latest firmware.
Title: Re: Serial stops reading until power cycle.
Post by: CReese on May 15, 2014, 01:34:57 PM
Great. Thanks.
Title: Re: Serial stops reading until power cycle.
Post by: CReese on June 10, 2014, 12:33:50 PM
Confirmed fixed for me.