Watchdog reset on high speed baud rate

Hi all,
I use ArduPlane v 4.1.5 with pixhawk (fmuv3) and I add a serial external AHRS.
when the serial is set in low baud rate speed (<=115200), the code runs fine.
however when I set the baud rate to 460800 the plane code resets and hangs .
if I disconnect the RX pin only ,every thing runs fine and “internal error 0x800” rises
with this msg:

WDG:T49 SL0 FL129 FT3 FAD7 50C22FTP181 FLR80C7667

if I connect the RX pin after awhile, the sensor works correctly
is there any description to this behavior ? and how can I solve this problem?
best regard.

Please provide a dataflash log. And a telemetry log if you ahve one.

This is the data flash log +telemetry log +serial output
add this is my library witch I added (Orientus AHRS)

Please don’t provide links I then need to ask permission to use.

Also, something you could try is to remove all processing of the input in your new ExtrernalAHRS backend - just to make sure the problem isn’t in there.

I am sorry I forget to change permission, I have modified. :sweat_smile:
I have tried to remove the processing of the input “_port->read()” and the system doesn’t hang
also,I have tried the code with cube black and the same result.

… isn’t this a strong indication that you’re doing way too much in your
data-handling code in the main thread?

Try limiting the number of bytes you process in each loop - our idiom is
something like “const uint16_t nbytes = MIN(_uart->available(), 1024);”

I’m receiving only 10 Hz each packet 35 byte, in the a their side if I have disconnecting received pin in start and connecting later the system didn’t hang,
I think there is some bug in HAL, isn’t it?