Remora - Rpi Software Stepping Using External Microcontroller via SPI

More
17 Oct 2021 00:08 #223347 by Bari
JT just came up with this for the Rpi4, a driver mask calculator for the hal_pi_gpio driver.

forum.linuxcnc.org/27-driver-boards/43907-rpi-4-gpio-calculator

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

More
17 Oct 2021 01:43 #223356 by cakeslob

Example config.txt below:

{
    "Board": "BIGTREETECH SKR v2",
    "Modules":[
    {
    "Thread": "Servo",
    "Type": "Reset Pin",
        "Comment":            "Reset pin",
        "Pin":                "PC_4"
    },
   


thats what i was looking for, i kept thinking it was on the RESET pin, but its the pin beside reset

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

More
18 Oct 2021 07:20 #223437 by Bari

A little more work on the STM32F4 version of Remora.

Any thoughts on getting this to work over Ethernet UDP vs SPI on the STM32's?

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

More
18 Oct 2021 14:32 - 18 Oct 2021 14:48 #223457 by Aaroncnc
Not many 3d printer boards have populated ethernet besides duet
But at the same time one could add a LAN8720 ETH Board to older boards.

It would be interesting as if it were to be supported it would take the project away from just SBC with spi and move it to many platforms.

Potently able to be a direct competitor to some of the MESA boards.
Last edit: 18 Oct 2021 14:48 by Aaroncnc.

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

More
18 Oct 2021 15:09 #223464 by Bari
I'm not really a fan of Broadcom or TI and the OrangePi's are made so poorly. There are other ARM boards that don't use closed BLOBS for firmware and are made a bit better. Using Ethernet also lets you break up the motor drivers from each other for use on larger machines. It's low cost and easy to put Ethernet and motor driver right on the back of the motor.

www.st.com/en/motor-drivers/powerstep01.html

github.com/rene-dev/stmbl/blob/master/do...tting%20Started.adoc

forum.linuxcnc.org/18-computer/42414-lin...-using-esp32?start=0 uses ESP32's

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

More
18 Oct 2021 21:01 #223495 by scotta
Hi Bari,

This has definitely been on my radar. I've got a W5500 module currently hooked up to a SKRv1.3 and have simple UDP talking to the board as a "Hello world" test and eco back to the PC.

There is a STM32 driver for the W5500 that uses DMA so we could get some good speed with low overhead. I just need to think on the best approach.. polling in the main loop is probably the easiest way to get started. But I do love event driven code. I'll need to see if the W5500 has some form of hardware packet received notification.

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

More
18 Oct 2021 22:12 #223501 by Bari
wizwiki.net/wiki/doku.php/products:w5500...ication:udp_function

Receiving process

Process the received UDP data in Internal RX memory.
The structure of received UDP data is as below.



The Received UDP data format

The received UDP data consists of 8bytes PACKET-INFO, and DATA packet. The PACKETINFO contains transmitter’s information (IP address, Port number) and the length of DATA packet. The UDP can receive UDP data from many others. User can classify the transmitter by transmitter’s information of PACKET-INFO. It also receives broadcast SOCKET by using “255.255.255.255” IP address. So the host should ignore unwanted reception by analysis of transmitter’s information. If the DATA size of Socket n is larger than Internal RX memory free size, user cannot receive that DATA and also cannot receive fragmented DATA.

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

More
18 Oct 2021 22:20 - 18 Oct 2021 22:55 #223502 by Bari
Looks like the W5500 generates an interrupt. Still have to read more of the docs on IR, IMR
Sn_IMR and Sn_IR.

First method :
{
if (Sn_IR(RECV) == ‘1’) Sn_IR(RECV) = ‘1’; goto Receiving Process stage;
/* In this case, if the interrupt of Socket n is activated, interrupt occurs. Refer to IR, IMR
Sn_IMR and Sn_IR. */
}


This is a working UDP code both by polling and interrupt , tested on STM32F100RB 

File Attachment:

File Name: udp00.c
File Size:18 KB

forum.wiznet.io/t/topic/3156/4
Attachments:
Last edit: 18 Oct 2021 22:55 by Bari. Reason: more UDP info

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

More
18 Oct 2021 22:35 - 21 Oct 2021 04:35 #223507 by Bari
Here is a listing of the STM32F407/417 with integrated Ethernet:

www.st.com/content/st_com/en/products/mi...uctId=LN11*#products

STM32 ETHERNET #2. UDP SERVER, even easier as a device, slave or peer


I have no problem with designing and building simple devices like these so that they may be copied by low cost manufacturers in order to keep board costs down.
Last edit: 21 Oct 2021 04:35 by Bari. Reason: typo

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

More
19 Oct 2021 04:57 - 19 Oct 2021 04:59 #223519 by Bari
More on the Teensy4.1 just no git repo  :(
forum.linuxcnc.org/24-hal-components/39813-teensy-4-1-linuxcnc

I wrote realtime HAL component for communication with Teensy from LinuxCNC. Run from LinuxCNC, I am able to achieve 60us roundtrips with 40byte payload. I have written a simple HAL example for a simple servo loop, and have tested the servo loop on a single axis kinematic stage, equipped with high-precision encoder and a DC motor run by a small H-bridge driver.
I did some serious testing at 1ms servo-threads over several hours with no problems whatsoever.
I was also able to run servo-thread with 150us (6600Hz) without any problems, but I haven't spent much time testing it and don't know how stable it really is at this speeds.

Last edit: 19 Oct 2021 04:59 by Bari.

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

Time to create page: 0.167 seconds
Powered by Kunena Forum