LinuxCNC + Orange Pi (allwincnc)
- wzor
- Offline
- New Member
-
Less
More
- Posts: 19
- Thank you received: 1
04 Jun 2023 16:08 #272885
by wzor
Replied by wzor on topic LinuxCNC + Orange Pi (allwincnc)
Please Log in or Create an account to join the conversation.
- virencq
- Offline
- Premium Member
-
Less
More
- Posts: 89
- Thank you received: 5
16 Aug 2023 13:35 #278167
by virencq
Replied by virencq on topic LinuxCNC + Orange Pi (allwincnc)
Help is needed for the Spindle encoder.
I have a Lathe setup running with X-Z axis.
Spindle working for commanded speed.
The shared home switch also working.
But I have phase-A on pin 8.
Index on pin 10.
in hal show nothing to show for encoder related.
Please look at my spindle.hal for modifications.
I have a Lathe setup running with X-Z axis.
Spindle working for commanded speed.
The shared home switch also working.
But I have phase-A on pin 8.
Index on pin 10.
in hal show nothing to show for encoder related.
Please look at my spindle.hal for modifications.
Attachments:
Please Log in or Create an account to join the conversation.
- virencq
- Offline
- Premium Member
-
Less
More
- Posts: 89
- Thank you received: 5
07 Sep 2023 07:05 #280174
by virencq
Replied by virencq on topic LinuxCNC + Orange Pi (allwincnc)
Small progress, now phase A working. but hal hal show encode.0.velocity do not match with commanded S300 M03 in MDI.
Tried to run G76.ngc do not run.
Tried to run G76.ngc do not run.
Attachments:
Please Log in or Create an account to join the conversation.
- MakerYang
-
- Offline
- Senior Member
-
Less
More
- Posts: 62
- Thank you received: 17
10 Oct 2023 10:27 - 10 Oct 2023 13:09 #282680
by MakerYang
Replied by MakerYang on topic LinuxCNC + Orange Pi (allwincnc)
[code]I hope to get some guidance on the issue regarding the ARISC driver.
I am currently adapting a new development board, which is similar to the Raspberry Pi and Orange Pi. I am not quite sure how to configure some of the settings in the `api.h` file. Where should I obtain these configuration details from in the chip's manual?
[code][code][code]#ifndef _API_H
#define _API_H
...
#define ARISC_CPU_FREQ 450000000 // Hz
#define ARISC_FW_BASE (0x00040000) // for ARM CPU it's 0x00040000
#define ARISC_FW_SIZE ((8+8+32)*1024)
#define ARISC_SHM_SIZE (4096)
#define ARISC_SHM_BASE (ARISC_FW_BASE + ARISC_FW_SIZE - ARISC_SHM_SIZE)
#define GPIO_BASE 0x01c20800
#define GPIO_R_BASE 0x01f02c00
#define GPIO_BANK_SIZE 0x24
#define GPIO_PORTS_MAX_CNT 8
#define GPIO_PINS_MAX_CNT 24
#define PWM_CH_MAX_CNT 16
#define PWM_WASTED_TICKS (160/2) // number of ARISC ticks wasted for calculations
...
static inline
void shmem_deinit(void)
{
munmap(_shm_vrt_addr, ARISC_SHM_SIZE);
munmap(_gpio_vrt_addr, 4096);
munmap(_r_gpio_vrt_addr, 4096);
}
#endif
Are there any additional configuration changes needed apart from the ones mentioned above?
Thank you for your help.
I am currently adapting a new development board, which is similar to the Raspberry Pi and Orange Pi. I am not quite sure how to configure some of the settings in the `api.h` file. Where should I obtain these configuration details from in the chip's manual?
[code][code][code]#ifndef _API_H
#define _API_H
...
#define ARISC_CPU_FREQ 450000000 // Hz
#define ARISC_FW_BASE (0x00040000) // for ARM CPU it's 0x00040000
#define ARISC_FW_SIZE ((8+8+32)*1024)
#define ARISC_SHM_SIZE (4096)
#define ARISC_SHM_BASE (ARISC_FW_BASE + ARISC_FW_SIZE - ARISC_SHM_SIZE)
#define GPIO_BASE 0x01c20800
#define GPIO_R_BASE 0x01f02c00
#define GPIO_BANK_SIZE 0x24
#define GPIO_PORTS_MAX_CNT 8
#define GPIO_PINS_MAX_CNT 24
#define PWM_CH_MAX_CNT 16
#define PWM_WASTED_TICKS (160/2) // number of ARISC ticks wasted for calculations
...
static inline
void shmem_deinit(void)
{
munmap(_shm_vrt_addr, ARISC_SHM_SIZE);
munmap(_gpio_vrt_addr, 4096);
munmap(_r_gpio_vrt_addr, 4096);
}
#endif
Are there any additional configuration changes needed apart from the ones mentioned above?
Thank you for your help.
Attachments:
Last edit: 10 Oct 2023 13:09 by MakerYang.
Please Log in or Create an account to join the conversation.
- ultrasmurf
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 2
17 Apr 2024 02:02 #298409
by ultrasmurf
Replied by ultrasmurf on topic LinuxCNC + Orange Pi (allwincnc)
Quick question on this.
Is there a way to configure the arisc module to control a cw and ccw pulse rather than step/dir ?
I got it running just fine with step/dir, but i have a rather old and somewhat difficult to change servo/amp that can only be run using cw and ccw pulse mode.
Thanks in advance.
Is there a way to configure the arisc module to control a cw and ccw pulse rather than step/dir ?
I got it running just fine with step/dir, but i have a rather old and somewhat difficult to change servo/amp that can only be run using cw and ccw pulse mode.
Thanks in advance.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20097
- Thank you received: 6841
17 Apr 2024 09:12 #298423
by tommylight
Replied by tommylight on topic LinuxCNC + Orange Pi (allwincnc)
Normally yes, very easy, just change the stepgen_type from 0 to 1 in the hal file for the axis/joint you want.
Or might be 2, not sure, it was a long time ago, but a quick search for stepgen type linuxcnc should get the results.
Or might be 2, not sure, it was a long time ago, but a quick search for stepgen type linuxcnc should get the results.
Please Log in or Create an account to join the conversation.
- langdons
- Offline
- Elite Member
-
Less
More
- Posts: 253
- Thank you received: 24
16 Apr 2025 13:55 #326458
by langdons
Love the "Use at your own RISC"!!
Replied by langdons on topic LinuxCNC + Orange Pi (allwincnc)
Hi, guys. Let me introduce a tiny project of mine..
My first single board PC was the Orange Pi One. And it's really fun to use such boards for a hobby projectsBut we also can use them as a small CNC controllers too. It's really sad there are no armhf packages in the LinuCNC dists repo. So my first try was the Machinekit with RT-PREEMPT kernel built using Armbian. And it works. But without a GPIO driver it was just a simulator. After a few weeks of learning I made a GPIO driver by myself. And it works just fine
My next step of researching was a "big latency" issue (50-70 us). Many ARM boards has a worst latency values using the RT-PREEMPT kernel. A steps rate with such latency values was terrible. A few months later I found an info about additional built-in RISC CPU core. Using this core for the fast pins toggling was a good idea
At this moment I have a working pair of HAL driver and the RISC core firmware. Steps rate now very high (up to 1 MHz). Also I made a quick installer script. You need one of the Armbian images to install it. Supported boards are Nano/Banana/Orange Pi with Allwinner H3 SoCs installed.
Attention! Project support is ended. Use it on your own risc.
allwincnc.github.io
Love the "Use at your own RISC"!!
Please Log in or Create an account to join the conversation.
Time to create page: 0.301 seconds