Greetings,
I have the RP23U5XBB board I started configuring here from #157 and here grblHAL/core#836 .
I started first without mpg, controlling the modbus spindle via UART0, it worked ok. Now that I want to use mpg I need the additional port.
I have created file my_machine_map.h from RP2350B_5X_map.h .
I have done those changes :
On my_machine.h :
#define BOARD_MY_MACHINE // Add my_machine_map.h before enabling this!
#define SPINDLE0_ENABLE SPINDLE_MODVFD
#define MODBUS_ENABLE 1 // Set to 1 for auto direction, 2 for direction signal on auxiliary output pin.
#define MPG_ENABLE 1 // Enable MPG interface. Requires a serial stream and means to switch between normal and MPG mode.
On my_machine_map.h (differences from RP2350B_5X_map.h)
#define SERIAL1_PORT 1
#ifndef SERIAL1_PORT
#define AUXOUTPUT0_PORT GPIO_OUTPUT
#define AUXOUTPUT0_PIN 36
#endif
#if MPG_ENABLE == 1
#define MPG_MODE_PIN AUXINPUT0_PIN
#endif
I tried first with #define MPG_ENABLE 2 but I got compilation issues.
As I understood from code, without explicit configuration, or with MODBUS_RTU_STREAM = 0 set on my_machine_map.h, modbus default to uart0, then mpg would use uart1. And if I set MODBUS_RTU_STREAM = 1, modbus would go to uart1 and mpg would take uart0.
So I tried compiling with MODBUS_RTU_STREAM = 0 then 1.
With MODBUS_RTU_STREAM = 0 :
I see communication leds blinking on uart0
I can control the spindle correctly
I see not communication leds blinking on uart1, tx is at 0, rx is at 1.
With MODBUS_RTU_STREAM = 1 :
I see communication leds blinking on uart0
I cannot control the spindle on uart0 (as expected)
I cannot control the spindle on uart1, in gsender I have the alarm 19 : modbus exception, timeout or message error
I still see no communication leds blinking on uart1, tx is at 0, rx is at 1.
My rs485 adapter accept both 3.3v and 5v. The RP23U5XBB board share the same pin for rx1 and di3 but I kept it as defaulted to rx1.
So something seems blocking the uart1 to be activated. As "#define SERIAL1_PORT 1" was initially commented on RP2350B_5X_map.h I wonder if this has been tested.
Any clue ?
Greetings,
I have the RP23U5XBB board I started configuring here from #157 and here grblHAL/core#836 .
I started first without mpg, controlling the modbus spindle via UART0, it worked ok. Now that I want to use mpg I need the additional port.
I have created file my_machine_map.h from RP2350B_5X_map.h .
I have done those changes :
On my_machine.h :
#define BOARD_MY_MACHINE // Add my_machine_map.h before enabling this!
#define SPINDLE0_ENABLE SPINDLE_MODVFD
#define MODBUS_ENABLE 1 // Set to 1 for auto direction, 2 for direction signal on auxiliary output pin.
#define MPG_ENABLE 1 // Enable MPG interface. Requires a serial stream and means to switch between normal and MPG mode.
On my_machine_map.h (differences from RP2350B_5X_map.h)
#define SERIAL1_PORT 1
#ifndef SERIAL1_PORT
#define AUXOUTPUT0_PORT GPIO_OUTPUT
#define AUXOUTPUT0_PIN 36
#endif
#if MPG_ENABLE == 1
#define MPG_MODE_PIN AUXINPUT0_PIN
#endif
I tried first with #define MPG_ENABLE 2 but I got compilation issues.
As I understood from code, without explicit configuration, or with MODBUS_RTU_STREAM = 0 set on my_machine_map.h, modbus default to uart0, then mpg would use uart1. And if I set MODBUS_RTU_STREAM = 1, modbus would go to uart1 and mpg would take uart0.
So I tried compiling with MODBUS_RTU_STREAM = 0 then 1.
With MODBUS_RTU_STREAM = 0 :
I see communication leds blinking on uart0
I can control the spindle correctly
I see not communication leds blinking on uart1, tx is at 0, rx is at 1.
With MODBUS_RTU_STREAM = 1 :
I see communication leds blinking on uart0
I cannot control the spindle on uart0 (as expected)
I cannot control the spindle on uart1, in gsender I have the alarm 19 : modbus exception, timeout or message error
I still see no communication leds blinking on uart1, tx is at 0, rx is at 1.
My rs485 adapter accept both 3.3v and 5v. The RP23U5XBB board share the same pin for rx1 and di3 but I kept it as defaulted to rx1.
So something seems blocking the uart1 to be activated. As "#define SERIAL1_PORT 1" was initially commented on RP2350B_5X_map.h I wonder if this has been tested.
Any clue ?