LitexCNC: firmware and driver for 5A-75B and 5A-75E

More
17 Jan 2024 21:49 #290976 by TOLP2
Congratulations! From here you can start building your config and machine.

The command "loadrt litexcnc_eth" is no longer supported, everything is done by the loadrt litexcnc connections="eth:10.0.0.10" command. In the documentation this has been modified, but here on the forum there are indeed old messages with the old commands. But keep pushing forward, will try to answer the questions as fast as I can.

Please Log in or Create an account to join the conversation.

More
19 Jan 2024 15:08 #291124 by uba100
This means that the example here in the instructions is no longer correct, right?

litex-cnc.readthedocs.io/en/latest/modules/pwm.html

Please Log in or Create an account to join the conversation.

More
19 Jan 2024 16:03 #291128 by TOLP2
All examples have been updated and should work. There have not been any changes to PWM the last few months.

If you find things not working or errors, please let me know.

Please Log in or Create an account to join the conversation.

More
19 Jan 2024 17:15 #291134 by uba100
The examples in the Modules section all still have the command at the beginning:
"loadrt litexcnc_eth..."
at the beginning.
Hence my question.
The following user(s) said Thank You: TOLP2

Please Log in or Create an account to join the conversation.

More
19 Jan 2024 19:28 #291140 by TOLP2
Thanks for spotting that one. I checked all modules and pages and corrected them.

Please Log in or Create an account to join the conversation.

More
22 Jan 2024 10:47 #291332 by deroj
When you rewrite it could you please give an example for an inverted PWM Output?
Thanks

Please Log in or Create an account to join the conversation.

More
22 Jan 2024 22:17 #291373 by TOLP2
I'm afraid that the inverted PWM output is not supported yet, without doing some tricks. I think I will make an issue for this and add it to the firmware and driver.

Two possibilities:
  • inverting the output when compiling the firmware. Easiest to implement, however not very flexible
  • inverting the output using a HAL parameter, similar to GPIO which can also be inverted from the HAL. One can choose to:
    • either invert the duty-cycle (thus a duty-cycle of 5% will be send out as 95%, which is effectively the same as inversing the signal, however the start of the signal shifts) NOTE: this is the trick to 'invert' the signal in the current situation, by choosing scale and offset smart;
    • send an extra WORD to the FPGA with the config of the PWM. This case, the start of the PWM (and thus the frequency)  is always fixed.
If you have preferences, please let me know.

Please Log in or Create an account to join the conversation.

More
23 Jan 2024 07:21 #291396 by deroj
For me both are ok.
But then please explain the Trick 
I did not get it to work and therefore I changed Firmware.

Please Log in or Create an account to join the conversation.

More
23 Jan 2024 20:37 - 23 Jan 2024 21:24 #291463 by TOLP2
I made an issue / feature request on my GitHub for this:
github.com/Peter-van-Tol/LiteX-CNC/issues/76

I have chosen to add the extra WORD and add the param invert-output to the PWM modules.

@deroj: are you willing to test this branch?

The following steps can be taken to test the changes to LitexCNC:
pip3 install git+https://github.com/Peter-van-Tol/LiteX-CNC@76-add-option-invert-pwm-output

Re-install the driver and recompile the firmware:
sudo env "PATH=$PATH" litexcnc install_driver
litexcnc build_firmware ...
litexcnc flash_firmware ...

And try the new parameter invert-output for the PWM modules.
 
Last edit: 23 Jan 2024 21:24 by TOLP2. Reason: Work finished

Please Log in or Create an account to join the conversation.

More
24 Jan 2024 08:28 #291504 by deroj
I really would like to test it, but I am back home in two weeks... 

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.092 seconds
Powered by Kunena Forum