Closed macbef closed 1 month ago
I have the same issue on a RP2040
Anything I can do to debug this? I have compiled this for USB or UART, the error occurs for both.
When I revert to build 20230217, everything seems to be fine.
There has been a few changes to the handling of input pins so it is hard for me to tell what is wrong from just looking at the code - I am abroad for a while and do not have a board to debug with.
Maybe related to the EEPROM-emulation? (I'm mot using an external EEPROM)
The emulation is in the core, and I do not have the same issue with the boards I has access to. So most likely the bug is located in the driver.
Anything I can do to debug this?
Do you program with a debug probe and are able to halt execution and/or set breakpoints? If you can halt where does it stop? In the hardfault handler?
@Loewe111 Which board do you have and which version of grblHAL ($I output). FYI I do have a RP2040 with me and that works.
The Board i use is the Seed Xiao RP2040 (https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html) $I is
[VER:1.1f.20240921:grblHAL on Blot]
[OPT:VNCDSL,100,1024,3,0]
[AXS:3:XYZ]
[NEWOPT:ENUMS,RT+,HOME,NOPROBE,ES,SED,RTC]
[FIRMWARE:grblHAL]
[SIGNALS:HSE]
[NVS STORAGE:*FLASH]
[FREE MEMORY:220K]
[DRIVER:RP2040]
[DRIVER VERSION:240907]
[DRIVER OPTIONS:SDK_1.5.1]
[KINEMATICS:CoreXY v2.01]
For both of you: is the setting lost on a power cycle? or is the board still unresponsive so you cannot check?
@Loewe111 I have tested with my dev board and both a local and a Web Builder build and I am not able to replicate the issue.
The settings gets reset to 0 for me Im gonna try to run on a normal pi pico and then debug later
The Normal Pico does the same for me.
I goes into a isr_hardfault
in void ioport_setting_changed (setting_id_t id)
in ioports.c
Callstack:
´´´
isr_hardfault@0x100001c4 (Unknown Source:0)
I goes into a isr_hardfault in void ioport_setting_changed (setting_id_t id) in ioports.c
That may be helpful. If there are no input pins defined it will likely cause a hardfault.
Can you try changing this line to:
if(port) do {
and try again?
or even betterchange this to:
else if(digital.in.ports && digital.in.ports->n_ports) switch(id) {
YES! This solves this issue.
Could you tell me which input pin definition might be missing? I have a probe pin defined in my machine-map.
// Define probe switch input pin.
Some other inputs are undefined (I2C_STROBE and SDCARD stuff that I don't need)
Anyways, always a pleasure to see how fast you are reacting to issues like this one! Thanks a lot
Issue solved
that fixes it for me aswell
This fix was essential for my new board. I always wanted to have a board with opto-isolated USB and opto-isolated RS232 interfaces. When driving bigger motors, soon or later you'll run into ground-loop problems. Now this one is working. @terjeio , let me know if you want one. It only has 3 axes and no drivers on board, though. Just pinheaders for MKS TMC2160-OC and alike.
I'm running into a new issue with my custom board again.
It seems that everything is working fine when I use a version I have built last year. After updating to the most recent commit, my board seems to be working correctly (responding to commands etc) and I can set all parameters without problem.
Except for $14. When I try to change $14 (and even with just sending the active value again, like $14=0), the MCU hangs. And the value is not stored as well.
I guess it's not a hardware issue because the older version is working fine on my board.
Any suggestions? Maybe related to the EEPROM-emulation? (I'm mot using an external EEPROM)
Thanks!