ColorCNC Colorlight 5A-75E/5A-75B as FPGA controller board

More
3 years 11 months ago #257193 by romanetz
AI, AO (these are just must-have), RS-485 (spindle VFD communication over modbus RTU), CAN, SPI - for DRO LED displays, I2C. for digital communications a kind of FIFO is needed to match network packet exchange interval and throughput of the serial bus .
it's a point to discuss whether include riscv-cpu in firmware or not, but the possibilities with that options are incredible: any kind of user-defined packet-based digital communication, say, modbus rtu onboard processing, or mapping of modbus rtu registers onto etherbone addresses.
I'm exploring the possibility to update the firmware over network and Lattice dual-boot capability.
Regarding PCBs, jlcpcb.com is very popular among countries near China

Please Log in to join the conversation.

More
3 years 11 months ago #257199 by muvideo
I've updated my repository with some new features:
- unified driver
- acceleration limit in stepgen is now working
- FPGA internal clock for peripherals Is 40MHz and Is passing the timing closure.
- some pre coocked firmware are available

Now the board communicates to driver the peripherals configuration and the driver adapts automatically, no need to rebuild the driver for changes in peripherals or board version or revision. The only change that still require a rebuild of the driver Is the change of ip address. I suppose that there a way to pass parameters to the driver at invocation but still didnt try.

Todo:
- pass to the driver the ip and frequency when invoked
- create a configurator utility for speeding up the board configuration
here you can find the driver, firmwares, template for litex and the hal I'm using in my machine: 

github.com/faeboli/Lcnc
if anybody wants to try out my implementation I would be grateful, I was able to test only a pair of boards
Thanks!

Please Log in to join the conversation.

More
3 years 11 months ago #257382 by andypugh
Rather than develop a whole new protocol, why not integrate Smart Serial? It is already well supported by LinuxCNC, it's open-source and at least one non-Mesa project (STMBL) uses it successfully.

Please Log in to join the conversation.

More
3 years 11 months ago #257383 by andypugh
Rather than develop a whole new protocol, why not integrate Smart Serial? It is already well supported by LinuxCNC, it's open-source and at least one non-Mesa project (STMBL) uses it successfully.

Please Log in to join the conversation.

More
3 years 11 months ago #257424 by wuyatom
 

Attachment not found

I used the firmware generated by your firmware lnc_75e_v7_30029i9s9e8p.py. I changed the IP address to test, and I can PING the board, but I can’t connect to the board with the test HAL. I use 5A-75E-V7.1colorlight, which can help Let me see what's wrong, thank you

Please Log in to join the conversation.

More
3 years 11 months ago #257433 by muvideo

 I used the firmware generated by your firmware lnc_75e_v7_30029i9s9e8p.py. I changed the IP address to test, and I can PING the board, but I can’t connect to the board with the test HAL. I use 5A-75E-V7.1colorlight, which can help Let me see what's wrong, thank you
 

Hi @wuyatom
my 75e is a 8.0, so I cannot test directly on a 7.1,
the ping response is a good starting point, at least the fpga firmware is doing something good.
I see you have opened an issue on github, I'll follow up on there
Edit: I forgot to mention in the documentation that in case the ip is changed the driver need to
be updated changing the line 13 in Lcnc.h and then built.
This will be addressed in a future version where the ip will become an argument to insmod.
Maybe this is the issue you are facing?

Thanks.

Please Log in to join the conversation.

More
3 years 11 months ago #257482 by wuyatom
谢谢,我按照你教的改了lcnc.h的IP地址,现在可以和板子通信了,现在出现新问题,不知道是否需要连接硬件测试还是什么,linuxcnc按jog或者运行代码会导致关节跟随错误
 

Attachment not found

Please Log in to join the conversation.

More
3 years 11 months ago #257498 by muvideo

谢谢,我按照你教的改了lcnc.h的IP地址,现在可以和板子通信了,现在出现新问题,不知道是否需要连接硬件测试还是什么,linuxcnc按jog或者运行代码会导致关节跟随错误
 

Attachment not found


 
This can depend on a lot of things,
the first I would check is of the board is enabled.
In halshow check the status of Lcnc.00.enable Lcnc.00.enabled and Lcnc.00.enable-request
My setup for board enable Is here:
Lcnc/support_files/LcncMill/LcncMill.hal lines 13-24

Please Log in to join the conversation.

More
3 years 11 months ago #257547 by TOLP2
Spend last few days on cleaning the repository and create a package which is installable using pip. I've just tested an upload to test.pypi.org  and this looks promising. The package has the following functions:
  • install Litex
  • install the ECP5 toolchain (supported boards: 5A-75B and 5A-75E);
  • build the firmware from the JSON-file
  • install the driver in LinuxCNC
This massively eases the use of the FPGA and the driver.

The process to get the driver and firmware up and running would be:
Code:
pip install chardet pip install --extra-index-url https://test.pypi.org/simple/ litexcnc litexcnc install_litex litexcnc install_toolchain litexcnc install_driver litexcnc build_firmware <path-to-configuration-json> -o ./build --build

The process above will result in both a .svf-file and a .bit-file which can be uploaded to the FPGA.

NOTES:
  • chardet will be included in the next release.
  • As soon as the package is released to the main-server (pypi.org) the switch -i  test.pypi.org/simple/ is no longer necessary
  • Depending on your installation pip might be required to be replaced with pip3.
  • To install Litex and the toolchain elevated acces might be required (sudo ...)
A more elaborated description of the process is given on  test.pypi.org .

Please Log in to join the conversation.

More
3 years 11 months ago #257766 by TOLP2
At this moment working on documenting Litex-CNC. A preview on the documentation is available on  readthedocs .

Please Log in to join the conversation.

Time to create page: 0.834 seconds
Powered by Kunena Forum