LitexCNC: firmware and driver for 5A-75B and 5A-75E
11 Feb 2024 11:42 #293082
by uba100
Replied by uba100 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
I have now removed all encoders from the JSON and reinserted the PWM generators and can confirm that all 5 axes are now working.
I can perform error-free homing and move the axes manually in both directions.
Here is the output from my test:
cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal
identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A
litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - pwm ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 0000003C, config: 00000040, write: 00000044, read: 000000B8
litexcnc: - Write buffer: 116 bytes
litexcnc: - Read buffer: 88 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)
note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 25.000 units/sec 1500.000 units/min
note: AJOG default: 25.000 units/sec 1500.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.158369 seconds
task: main loop took 0.234904 seconds
task: main loop took 0.142043 seconds
Shutting down and cleaning up LinuxCNC...
task: 4833 cycles, min=0.000033, max=0.234904, avg=0.010225, 3 latency excursions (> 10x expected cycle time of 0.010000s)
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime
Ps: I don't know if this is important. I almost always have to start Linuxcnc twice because the watchdog triggers immediately the first time. This little bug has been there since the beginning of my tests.
I can perform error-free homing and move the axes manually in both directions.
Here is the output from my test:
cnc@raspberrypi:~$ linuxcnc
LINUXCNC - 2.9.2
Machine configuration directory is '/home/cnc/linuxcnc/configs/test1'
Machine configuration file is 'test1.ini'
Starting LinuxCNC...
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Note: Using POSIX realtime
Found file(REL): ./test1.hal
identityKinematicsSetup: coordinates:XYYZA
Joint 0 ==> Axis X
Joint 1 ==> Axis Y
Joint 2 ==> Axis Y
Joint 3 ==> Axis Z
Joint 4 ==> Axis A
litexcnc: Loading Litex CNC driver version 1.1.0
litexcnc: Loading and registering default modules:
litexcnc: Registered module gpio
litexcnc: Registered module pwm
litexcnc: Registered module encoder
litexcnc: Registered module step
litexcnc: Setting up board drivers:
litexcnc: Registered driver eth
LitexCNC-eth: connected to board on '10.0.0.10:1234'
litexcnc: Setting up modules...
litexcnc: Reading 28 bytes
litexcnc: - Watchdog
litexcnc: - Wallclock
litexcnc: - gpio ... done!
litexcnc: - pwm ... done!
litexcnc: - step ... done!
litexcnc: Creating read and write buffers...
litexcnc: Base addresses: init: 00000000, reset: 0000003C, config: 00000040, write: 00000044, read: 000000B8
litexcnc: - Write buffer: 116 bytes
litexcnc: - Read buffer: 88 bytes
litexcnc: Exporting functions...
Found file(REL): ./custom.hal
litexcnc/5A-75B:V8.0: Watchdog timeout (3000000 ns) is dangerously short compared to litexcnc_write() period (2400000 ns)
note: MAXV max: 25.000 units/sec 1500.000 units/min
note: LJOG max: 25.000 units/sec 1500.000 units/min
note: LJOG default: 2.500 units/sec 150.000 units/min
note: AJOG max: 25.000 units/sec 1500.000 units/min
note: AJOG default: 25.000 units/sec 1500.000 units/min
Warning: Forward kinematics must handle duplicate coordinate letters:yy
note: jog_order='XYZA'
note: jog_invert=set()
task: main loop took 0.158369 seconds
task: main loop took 0.234904 seconds
task: main loop took 0.142043 seconds
Shutting down and cleaning up LinuxCNC...
task: 4833 cycles, min=0.000033, max=0.234904, avg=0.010225, 3 latency excursions (> 10x expected cycle time of 0.010000s)
litexcnc: LitexCNC driver unloaded
Note: Using POSIX realtime
Ps: I don't know if this is important. I almost always have to start Linuxcnc twice because the watchdog triggers immediately the first time. This little bug has been there since the beginning of my tests.
The following user(s) said Thank You: TOLP2
Please Log in or Create an account to join the conversation.
11 Feb 2024 12:52 #293086
by TOLP2
Replied by TOLP2 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
The watchdog is a known issue. It annoyed me yesterday during preparation of a demo. It has been resolved yesterday night and will be published in the next version. The next version will be released as soon as the problem with the encoder is solved.
The following user(s) said Thank You: Pro_El
Please Log in or Create an account to join the conversation.
12 Feb 2024 22:18 #293173
by TOLP2
Replied by TOLP2 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
Small update on the progress:
- no encoders: all stepgen work;
- with 4 encoders (or less): the last stepgen does not work;
- with 5 encoders (or more): the last two stepgen do not work anymore.
Please Log in or Create an account to join the conversation.
13 Feb 2024 20:03 - 13 Feb 2024 20:07 #293256
by TOLP2
Replied by TOLP2 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
Just released version 1.2.1 of LitexCNC! This is the bugfix version for stepgen module, which was affected by an error in the encoder module.
Due to an upgrade in the detection / comparison of the version of the firmware this version will show a warning message if older firmware is used (NOTE: the communication has not changed, thus re-compilation is not required). In the next minor release (i.e. version 1.3) this change will correctly enforce recompilation of the firmware. A change in minor version (i.e. the upcoming 1.2 -> 1.3) indicates a modification in communication protocol and thus requires an update of the firmware.
Other changes:
Due to an upgrade in the detection / comparison of the version of the firmware this version will show a warning message if older firmware is used (NOTE: the communication has not changed, thus re-compilation is not required). In the next minor release (i.e. version 1.3) this change will correctly enforce recompilation of the firmware. A change in minor version (i.e. the upcoming 1.2 -> 1.3) indicates a modification in communication protocol and thus requires an update of the firmware.
Other changes:
- driver:
- encoder: counts and position of encoder can be reset (#74)
- encoder: incorrect required read buffer reported has been corrected. This affected the module ``stepgen`` (#79)
- watchdog: the watchdog is reset when the card is reset. Prevents the ``has_bitten`` message when LinuxCNC is restarted without power-cycling the card. (#80)
- Fixed showing the correct version of LitexCNC in HAL.
- Temporary fixed comparison between version of FPGA and driver. When the minor version changes in an upcoming release, the driver will now correctly enforce a recompilation of the firmware.
- cli:
- install_toolchain: Fixed issue with detection of OS on desktop. Also git and openocd are installed on x64-architecture systems (#78).
Last edit: 13 Feb 2024 20:07 by TOLP2.
Please Log in or Create an account to join the conversation.
13 Feb 2024 22:34 #293273
by uba100
Replied by uba100 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
I have already tested it. Runs flawlessly for me. Unfortunately, I don't have any encoders on the stepper motors, so I can't test it now. But I still have a handwheel somewhere in the workshop. If I find it, I'll also test one of the encoder inputs.
Until then, many thanks and respect for your work.
Until then, many thanks and respect for your work.
The following user(s) said Thank You: TOLP2
Please Log in or Create an account to join the conversation.
14 Feb 2024 10:12 - 14 Feb 2024 10:13 #293317
by Mecanix
Replied by Mecanix on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
Last edit: 14 Feb 2024 10:13 by Mecanix.
The following user(s) said Thank You: besriworld, TOLP2
Please Log in or Create an account to join the conversation.
16 Feb 2024 11:38 #293501
by TOLP2
Replied by TOLP2 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
Ehsan_R reported a small bug in the command-line interface, preventing the installation of the toolchain. Fixed the error and released version 1.2.3 on PyPi.
Version 1.2.2. has been yanked (no longer available). However if you have this version, you can keep using it. The error does not affect driver, nor firmware. If you get errors with using the CLI, please upgrade.
Version 1.2.2. has been yanked (no longer available). However if you have this version, you can keep using it. The error does not affect driver, nor firmware. If you get errors with using the CLI, please upgrade.
Please Log in or Create an account to join the conversation.
20 Feb 2024 22:17 #293864
by TOLP2
Replied by TOLP2 on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
Heads up! LitexCNC version 1.3.0 will be released on 1st March 2024. This version will have following improvements:
- stepgen: timings are now per individual stepgen. This makes mixing different drivers with different timing constraints possible. Also solved some issues with roll-overs at high frequencies.
- pwm: possible to invert the output
- new modules:
- shift_out: expand outputs using 74HC595.Up to 32 shift registers can be daisy-chained together, using 4 datalines.
- shift_in: expand inputs using 74HC165. Up to 32 shift registers can be daisy-chained together, using 4 datalines. NOTE: these inputs are not real-time. Great for user panels, pendants, etc. Not to be used for homing inputs and ESTOP for obvious reasons.
- cli: upgraded the toolchain to include Yosys v0.38.
The following user(s) said Thank You: tommylight, unromeo21
Please Log in or Create an account to join the conversation.
24 Feb 2024 11:17 #294187
by vre
Replied by vre on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
what openocd command needed to flash firmware with ft232rl adapter ?
Please Log in or Create an account to join the conversation.
24 Feb 2024 11:53 #294198
by cornholio
Replied by cornholio on topic LitexCNC: firmware and driver for 5A-75B and 5A-75E
Does it support JTAG ?
This may help
jacobncalvert.com/blog-archive/2020/02/0...ith-the-ftdi-ft232r/
This may help
jacobncalvert.com/blog-archive/2020/02/0...ith-the-ftdi-ft232r/
Please Log in or Create an account to join the conversation.
Time to create page: 0.116 seconds