Skip to content

RP23U5XBB MPG+Modbus Issue. #173

@wormley

Description

@wormley

I'm running into an odd bug on the RP23U5XBB.
RP2040 Commit: 5287f46
(And previous)

Basically if I have SERIAL1_PORT 1 and MPG on stream 0 and Modbus for a SPINDLE_HUANYANG1 on stream 1 after about 6 '?' the USB serial stream hangs.
my_machine.h.txt
It appears to be only in exactly this configuration. If I remove modbus or mpg or swap the streams around then I don't get the hang. I don't yet have the MPG connected to check functionality.

[VER:1.1f.20260126:]
[OPT:VNMDSL,100,1024,3,0]
[AXS:3:XYZ]
[NEWOPT:ENUMS,RT+,HOME,ES,MPG,EXPR,TC,SED]
[FIRMWARE:grblHAL]
[SIGNALS:HSEP]
[NVS STORAGE:*FRAM 32K]
[FREE MEMORY:462K]
[DRIVER:RP2350]
[DRIVER VERSION:260122]
[DRIVER OPTIONS:SDK_2.1.1]
[BOARD:RP23U5XBB]
[AUX IO:5,3,0,0]
[PLUGIN:Bootloader Entry v0.01]
[PLUGIN:MODBUS v0.21]
[PLUGIN:HUANYANG VFD v0.16]
[SPINDLE:PWM]
ok
$ports
[PORT:0|MPG|1,RX|0,TX|115200,8,N,1|C]
[PORT:1|Modbus|27,RX|38,TX|19200,8,N,1|C]
ok
?<Idle|MPos:0.000,0.000,0.000|Bf:100,1023|FS:0,0>
?<Idle|MPos:0.000,0.000,0.000|Bf:100,1023|FS:0,0>
?<Idle|MPos:0.000,0.000,0.000|Bf:100,1023|FS:0,0>
?<Idle|MPos:0.000,0.000,0.000|Bf:100,1023|FS:0,0>
?<Idle|MPos:0.000,0.000,0.000|Bf:100,1023|FS:0,0>
?<Idle|MPos:0.000,0.000,0.000|Bf:100,1023|FS:0,0>
???????
^X
<Idle|MPos:0.000,0.000,0.000|Bf:100,1022|FS:0,0>

GrblHAL 1.1f ['$' or '$HELP' for help]
???????
^X
GrblHAL 1.1f ['$' or '$HELP' for help]

Control-X as you can see, outputs the GrblHAL header but not the usual ? report that comes after it.
Large output, before the hang, like $$ or $esg works fine.
Most testing was done with the VFD Spindle disabled by $395=0, but testing with the spindle enabled the Modbus works fine until you crash it by hitting ? too many times.

My best guess is the MPG which always gets the reports(?) is trying to send to UART1 but because it's Modbus it's failing, filling up the buffer and hanging the stream entirely. I'm not having a lot of luck with GDB though due to the complexity.
And I would have tried to replicate it on the Web Builder, but it can't do SERIAL1_PORT and this configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions