Advanced Search

Search Results (Searched for: raspberry pi 3)

  • Zayoo
  • Zayoo
09 Dec 2024 22:34

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Regarding rpi5 I swap to riocore so there is some changes.
For old rio follow instructions on rio page 11

Here is changes for riocore:

I have a raspberry pi5 and this is the code of how I started the SPI communication of the RPI5 - TangNano9K. (Not yet machine tested)

OS:  In /boot/broadcom/config.txt check is SPI is enabled (reboot if not)

# uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

In /dev/
Check do you have listed spidev0.0, should be!

Generate output files as for raspberry pi4. When you have generated them, find the file 'riocomp.c' and open it. In general, you need to find and replace the code responsible for rpi4 SPI communication. You need to swap approximately 4200 lines of code with around 60 lines, swap FROM:
/*
    interface: SPI
*/

INSERT CODE:
#include <linux/spi/spidev.h>
#include <sys/ioctl.h>  
int spifd;
static uint8_t mode = SPI_MODE_0;
static uint8_t bits = 8;
static uint32_t speed = 1500000;
int spi_init(void) {
   
    rtapi_print("Info: Initialize SPI5 connection\n");
    spifd = open("/dev/spidev0.0", O_RDWR);
    if (spifd < 0) {
        rtapi_print_msg(RTAPI_MSG_ERR,"Failed to open SPI device\n");
        return -1;
    }
    // Set SPI mode
    if (ioctl(spifd, SPI_IOC_WR_MODE, &mode) == -1) {
        rtapi_print_msg(RTAPI_MSG_ERR,"Failed to set SPI mode\n");
        close(spifd);
        return -1;
    }
    // Set bits per word
    if (ioctl(spifd, SPI_IOC_WR_BITS_PER_WORD, &bits) == -1) {
        rtapi_print_msg(RTAPI_MSG_ERR,"Failed to set bits per word\n");
        close(spifd);
        return -1;
    }
    // Set max speed
    if (ioctl(spifd, SPI_IOC_WR_MAX_SPEED_HZ, &speed) == -1) {
        rtapi_print_msg(RTAPI_MSG_ERR,"Failed to set max speed\n");
        close(spifd);
        return -1;
    }
}
int spi_trx(uint8_t *txBuffer, uint8_t *rxBuffer, uint16_t size) {
        struct spi_ioc_transfer tr = {
        .tx_buf = (uint64_t)txBuffer,
        .rx_buf = (uint64_t)rxBuffer,
        .len = size,
        .speed_hz = speed,
        .delay_usecs = 0,
        .bits_per_word = bits,
    };
    // Perform SPI transfer
    if (ioctl(spifd, SPI_IOC_MESSAGE(1), &tr) == -1) {
rtapi_print_msg(RTAPI_MSG_ERR,"Failed to perform SPI transfer\n");
    }
    return 1;
}
 
TO:
int interface_init(void)  {
     spi_init();
}

/*
   hal functions
*/


Find and add:
//ADD to rtapi_app_exit ->> close(spifd);
void rtapi_app_exit(void) {
    close(spifd);
    hal_exit(comp_id);
}
 

And that's all. This procedure with 'riocomp.c' must be repeated every time the output files are regenerated.
 
  • ChriRas
  • ChriRas
09 Dec 2024 12:59
Replied by ChriRas on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

So I just downloaded:

rpi-5-debian-bookworm-6.6.54-rt39-arm64-ext4-2024-11-06-2037_qtpyvcp_stable_networkmanager.img.xz

I tried to burn it with the Raspberry image burner and it gives me an error:

Input file is not a valid disk image.
File size 6700000000 bytes is not a multiple of 512.



Hello Richard,

I have the same issue with this image. I used the Raspberry Pi Imager 1.8.5 on the latest MacOS. I think it's not your setup. 
 
Regards
Christoph
  • resmond
  • resmond
09 Dec 2024 00:10
Replied by resmond on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Hi everyone

I'm new but I've been reading every scrap of info on this forum, raspberrypi.org, raspian.org and youtube on getting my Pi 5/Mesa 7i95T setup working.

I'm a bit rusty on Linux but it's coming back.

I ran though the full install a few times with the RPI5 download from the download page and got most things working - screen, network, apt updates, etc.

But I had trouble getting my 52PI m.2 NVME hat working with my drive (which is not a SATA)

I started looking through the journalctl boot files and saw quite a few bcm2835 and bcm2708 entries, so my first question shouldn't the drivers in question be bcm2712?

I see a few bcm2712 along with the others but I began to worry that I may have 'updated' my system to some older drivers for pi0/3/4 etc.

So I just downloaded:

rpi-5-debian-bookworm-6.6.54-rt39-arm64-ext4-2024-11-06-2037_qtpyvcp_stable_networkmanager.img.xz

I tried to burn it with the Raspberry image burner and it gives me an error:

Input file is not a valid disk image.
File size 6700000000 bytes is not a multiple of 512.

Did I download it incorrectly from Google Drive?
Is my 32Gb eNVME drive to small or an off brand?

Having read hundreds of posts on this WIKI over the last six weeks I'm blown away by time and effort everyone has put into this project.

Thanks for everything,

Richard
  • Deje63
  • Deje63
08 Dec 2024 19:24
Replied by Deje63 on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Yes, this image looks much better.

As of now I did not dig deeper than display and did a short latency tests (which looks good). May be I'll try this week.
Need to adapt Byte2Bot Hat and get the Breakout board to work.
  • rodw
  • rodw's Avatar
07 Dec 2024 17:58
Replied by rodw on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I did give them a new IMG, maybe they did not deploy it.
Can you try this version? It should fix the screen issue
drive.google.com/file/d/103AY24a8eZ18pRH...ge2/view?usp=sharing
  • MirkoCNC
  • MirkoCNC
07 Dec 2024 08:40

LinuxCNC-RIO - RealtimeIO for LinuxCNC based on FPGA (ICE40 / ECP5)

Category: Computers and Hardware

Thanks for pointing out. I will keep this in mind.

Though, I am still having a problem with the toolchain on the Raspberry Pi5 running Linux on it:.

Pressing the compile button:

rm -rf rio.fs rio.json rio_pnr.json rio.tcl abc.history impl gw_sh rio.tcl

Gives me following error:

/home/cnc-winder/opt/gowin/IDE/bin/gw_sh: 2: Syntax error: Unterminated quoted string
make: *** [Makefile:34: impl/pnr/project.fs] Error 2

Any idea what could cause this?
  • Deje63
  • Deje63
07 Dec 2024 08:30
Replied by Deje63 on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I do not see Images for LinuxCNC 2.9.3 on the Download page, am I blind?
With the ones provided I ended up in 640x480 display resolution, no idea why. But I could not use it.

To me, this is a big difference. ;)

btw. build time is no issue on the RPI5.
  • rodw
  • rodw's Avatar
07 Dec 2024 02:35

Raspberrypi 5 linuxcnc Image' screen resolution and color depth

Category: General LinuxCNC Questions

thanks a lot! can that image used on an raspi 5?

Yes, its made for the Pi 5. I did notice the file name  may not say this.
  • rodw
  • rodw's Avatar
07 Dec 2024 02:32
Replied by rodw on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I would say in general it is not hard to setup, you need to know how. wink
I got it finally working very well with very low latency on my RPI 5

short description:
- take Raspberry OS 64bit Lite
- install Xfce4
- build the RT kernel the usual way
- install it
- install linuxcnc
 

How is that any different to the Linuxcnc image on the downloads page?
The builder that made it It gets the official Pi kernel code, applies the RT patch
Builds the lernel
Installs Debian and XFCE4
Install Linuxcnc from the repo at Linuxcnc.org
It should be quicker because it runs on a desktop PC and cross compiles for the Pi.
  • Deje63
  • Deje63
06 Dec 2024 12:54
Replied by Deje63 on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

I would say in general it is not hard to setup, you need to know how. wink
I got it finally working very well with very low latency on my RPI 5

short description:
- take Raspberry OS 64bit Lite
- install Xfce4
- build the RT kernel the usual way
- install it
- install linuxcnc
It takes some time on the RPI.

As I am writing this in Firefox on this machine, latency-histogram (was started befor starting Firefox!) is running and 17 glxgears.
To be honest, so far I am very happy with. :D

 

Attached please also find a somewhat "script" to build from scratch.
  • lblabr
  • lblabr
06 Dec 2024 09:26
  • Cant do this anymore bye all
  • Cant do this anymore bye all's Avatar
05 Dec 2024 19:17
Replied by Cant do this anymore bye all on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Ex corporate pc is cheaper, more powerful, easier to setup than either the 4 or 5.
  • slowpoke
  • slowpoke
05 Dec 2024 17:43

Touch Screen recognized in Settings | Mouse and Touchpad but touches do nothing

Category: General LinuxCNC Questions

I'm trying out a new touchscreen with LinuxCNC 2.91 on RaspberryPi today. 

The Touch Screen is recognized in Settings | Mouse and Touchpad; two instances of wch.cn TouchScreen, however touching the screen has no effect either on the desktop or from within Axis.

Do I need to enable a driver, or do something special to get this to work?
The keyboard, mouse etc are also recognized and they both seem to work just fine.
 
  • Salame
  • Salame
05 Dec 2024 10:09
Replied by Salame on topic LinuxCNC on Raspberry Pi 5

LinuxCNC on Raspberry Pi 5

Category: Installing LinuxCNC

Was looking for info about raspberry, do you suggest to make a new buil on pi 4 because it's more stable? Or it's worth go with the 5?
  • 4ashishkr
  • 4ashishkr
02 Dec 2024 10:59

Issue with Attaching BME280 Sensor to Raspberry Pi 4B on LinuxCNC

Category: General LinuxCNC Questions

Thank you cakeslob for the response,

I was checking in Linuxcnc system, and the observation was there is no /dev/i2c-1 even if i create it couldn't be read and shows "no such devices or address".

Is it possible to get it ?

What are all the process ?

What am i doing wrong ?
Displaying 601 - 615 out of 910 results.
Time to create page: 5.038 seconds
Powered by Kunena Forum