Changing the update rate has also had no affect on the overrun errors. What can I do to eliminate this error and read all the data? Thanks for the help.
PS - An old MFC application we have this is what I'm trying to replace is capable of reading the data at this rate without dropping a single byte, so I know it is possible to read all the data. Ask a question. Quick access. Search related threads. Remove From My Forums. This issue is still with us on 5-different systems.
In analyzing the serial data stream which I will attach; note the items in Bold , I see two bytes are lost in the middle of the third series of port writes. Again, this issue appears to be magnified with the last update to BIT.
Comment Post Cancel. Ian PassMark. CPU load and interrupt priorities. One for transmit and one for receive. The COM port interrupt trigger level is a Windows setting, this is typically defaulted to 14 - ie. Improve this question. Jonathan Moreton. Jonathan Moreton Jonathan Moreton 91 1 1 gold badge 1 1 silver badge 4 4 bronze badges.
You haven't provided enough information for someone to say why you, specifically, are getting overruns. Obvious candidates: Disabling interrupts somewhere else? Higher priority interrupt handler too slow? Bug in your code? Not enough information to figure out which. Your theoretical calculation is already off by a factor of two. Add higher priority interrupts whose ISR take too much time or interrupts getting disabled in code you don't know about and an overrun gets to be easy to explain.
Thanks for the comments I've added some more information to the question, I'm not sure what other information I can provide. Early versions for Cortex-M3 had bugs and did not fully support interrupt priority grouping. The question is perhaps unanswerable without code. I am not one to give up on an unexplained problem since symptoms may show up elsewhere later. Actual hardware the DMA controller just doesn't miss deadlines unless it too is overloaded, but unless you're using it for something else, 2 USARTs at that rate should be a piece of cake.
I am attempting to replace a C library used for communications to a device over RS However, on other serial devices, it fails to correctly receive packets that are longer than about 28 bytes. After about that many bytes, it receives some garbage characters and times out as it never receives enough characters.
On the same hardware, I can receive data through the C library without issue. So, the hardware is clearly capable. Initially, I was calling SerialPort. BaseStream to get a stream and then Stream. ReadByte on the stream to receive the data. I found an offhand reference in the documentation indicating that BaseStream is not buffered. So, I switched to calling SerialPort.
ReadByte - which made no difference.
0コメント