Raspberry Pi 4

More
6 years 10 months ago #153578 by Bertho
Replied by Bertho on topic Raspberry Pi 4
Please do not enable any kernel drivers. The hm2_rpspi driver addresses the hardware directly and configures all the necessary internal registers. Having multiple drivers competing over the hardware results in unpredictable behaviour.

At the moment, the hm2_rpspi driver ignores most kernel information about the hardware from the device-tree (that is work in progress) and mostly assumes it knows where to find all the peripherals in the memory map. This could potentially be a problem for port SPI1, but the hardware is supposed to be compatible. The only change was the base-address, which was fixed in the last hm2_rpspi update.

Please Log in to join the conversation.

More
6 years 10 months ago #153580 by gtt38
Replied by gtt38 on topic Raspberry Pi 4
SPI 0 and 1 have the kernel driver enabled and it's working good on SPI0. I should try to disable both of them.
Thanks

Please Log in to join the conversation.

More
6 years 10 months ago #153594 by gtt38
Replied by gtt38 on topic Raspberry Pi 4
When i'm on SPI0 i have this :
Code:
pi@raspberrypi:~ $ halrun halcmd: loadrt hostmot2 Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 halcmd: loadrt hm2_rpspi spi_probe=1 spiclk_rate=5000 hm2/hm2_7i90.0: 72 I/O Pins used: hm2/hm2_7i90.0: IO Pin 000 (P1-01): PWMGen #0, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 001 (P1-03): PWMGen #0, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 002 (P1-05): PWMGen #1, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 003 (P1-07): PWMGen #1, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 004 (P1-09): PWMGen #2, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 005 (P1-11): PWMGen #2, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 006 (P1-13): PWMGen #3, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 007 (P1-15): PWMGen #3, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 008 (P1-17): IOPort hm2/hm2_7i90.0: IO Pin 009 (P1-19): IOPort hm2/hm2_7i90.0: IO Pin 010 (P1-21): IOPort hm2/hm2_7i90.0: IO Pin 011 (P1-23): IOPort hm2/hm2_7i90.0: IO Pin 012 (P1-25): IOPort hm2/hm2_7i90.0: IO Pin 013 (P1-27): IOPort hm2/hm2_7i90.0: IO Pin 014 (P1-29): IOPort hm2/hm2_7i90.0: IO Pin 015 (P1-31): IOPort hm2/hm2_7i90.0: IO Pin 016 (P1-33): IOPort hm2/hm2_7i90.0: IO Pin 017 (P1-35): IOPort hm2/hm2_7i90.0: IO Pin 018 (P1-37): IOPort hm2/hm2_7i90.0: IO Pin 019 (P1-39): IOPort hm2/hm2_7i90.0: IO Pin 020 (P1-41): IOPort hm2/hm2_7i90.0: IO Pin 021 (P1-43): IOPort hm2/hm2_7i90.0: IO Pin 022 (P1-45): IOPort hm2/hm2_7i90.0: IO Pin 023 (P1-47): IOPort hm2/hm2_7i90.0: IO Pin 024 (P2-01): PWMGen #4, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 025 (P2-03): PWMGen #4, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 026 (P2-05): PWMGen #5, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 027 (P2-07): PWMGen #5, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 028 (P2-09): PWMGen #6, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 029 (P2-11): PWMGen #6, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 030 (P2-13): PWMGen #7, pin Out0 (PWM or Up) (Output) hm2/hm2_7i90.0: IO Pin 031 (P2-15): PWMGen #7, pin Out1 (Dir or Down) (Outpu t) hm2/hm2_7i90.0: IO Pin 032 (P2-17): IOPort hm2/hm2_7i90.0: IO Pin 033 (P2-19): IOPort hm2/hm2_7i90.0: IO Pin 034 (P2-21): IOPort hm2/hm2_7i90.0: IO Pin 035 (P2-23): IOPort hm2/hm2_7i90.0: IO Pin 036 (P2-25): IOPort hm2/hm2_7i90.0: IO Pin 037 (P2-27): IOPort hm2/hm2_7i90.0: IO Pin 038 (P2-29): IOPort hm2/hm2_7i90.0: IO Pin 039 (P2-31): IOPort hm2/hm2_7i90.0: IO Pin 040 (P2-33): IOPort hm2/hm2_7i90.0: IO Pin 041 (P2-35): IOPort hm2/hm2_7i90.0: IO Pin 042 (P2-37): IOPort hm2/hm2_7i90.0: IO Pin 043 (P2-39): IOPort hm2/hm2_7i90.0: IO Pin 044 (P2-41): IOPort hm2/hm2_7i90.0: IO Pin 045 (P2-43): IOPort hm2/hm2_7i90.0: IO Pin 046 (P2-45): IOPort hm2/hm2_7i90.0: IO Pin 047 (P2-47): IOPort hm2/hm2_7i90.0: IO Pin 048 (P3-01): IOPort hm2/hm2_7i90.0: IO Pin 049 (P3-03): IOPort hm2/hm2_7i90.0: IO Pin 050 (P3-05): IOPort hm2/hm2_7i90.0: IO Pin 051 (P3-07): IOPort hm2/hm2_7i90.0: IO Pin 052 (P3-09): IOPort hm2/hm2_7i90.0: IO Pin 053 (P3-11): IOPort hm2/hm2_7i90.0: IO Pin 054 (P3-13): IOPort hm2/hm2_7i90.0: IO Pin 055 (P3-15): IOPort hm2/hm2_7i90.0: IO Pin 056 (P3-17): IOPort hm2/hm2_7i90.0: IO Pin 057 (P3-19): IOPort hm2/hm2_7i90.0: IO Pin 058 (P3-21): IOPort hm2/hm2_7i90.0: IO Pin 059 (P3-23): IOPort hm2/hm2_7i90.0: IO Pin 060 (P3-25): IOPort hm2/hm2_7i90.0: IO Pin 061 (P3-27): IOPort hm2/hm2_7i90.0: IO Pin 062 (P3-29): IOPort hm2/hm2_7i90.0: IO Pin 063 (P3-31): IOPort hm2/hm2_7i90.0: IO Pin 064 (P3-33): IOPort hm2/hm2_7i90.0: IO Pin 065 (P3-35): IOPort hm2/hm2_7i90.0: IO Pin 066 (P3-37): IOPort hm2/hm2_7i90.0: IO Pin 067 (P3-39): IOPort hm2/hm2_7i90.0: IO Pin 068 (P3-41): IOPort hm2/hm2_7i90.0: IO Pin 069 (P3-43): IOPort hm2/hm2_7i90.0: IO Pin 070 (P3-45): IOPort hm2/hm2_7i90.0: IO Pin 071 (P3-47): IOPort hm2/hm2_7i90.0: registered


if i'm trying on SPI1/CE2 the same board :
Code:
pi@raspberrypi:~ $ halrun halcmd: loadrt hostmot2 Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 halcmd: loadrt hm2_rpspi spi_probe=16 spiclk_rate=5000 hm2_rpspi: SPI1/CE2 Invalid cookie, read: 00000000 00000000 00000000, expected: 55aacafe 54534f48 32544f4d hm2_rpspi: SPI1/CE2 No drive seen on MISO line (kept at pull-down level). No board connected or bad connection? hm2_rpspi: rtapi_app_main: No such device (-19) <stdin>:2: waitpid failed /usr/bin/rtapi_app hm2_rpspi <stdin>:2: /usr/bin/rtapi_app exited without becoming ready <stdin>:2: insmod for hm2_rpspi failed, returned -1 halcmd:
same for CE0 or CE1 with 5 Mhz

with SPI debug :
Code:
pi@raspberrypi:~ $ halrun halcmd: loadrt hostmot2 Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 halcmd: loadrt hm2_rpspi spi_probe=16 spi_debug=5 spiclk_rate=5000 hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1 hm2_rpspi: Base address 0xfe000000 size 0x01800000 hm2_rpspi: Mapped peripherals from 0xfe000000 (size 0x01800000) to gpio:0x0xb4c97000, spi:0x0xb4c9b000, aux:0x0xb4cac000 hm2_rpspi: SPI1/CE2 clock rate: 5000000/5000000 Hz, VPU clock rate: 500000000 Hz hm2_rpspi: SPI1/CE2 write clock rate calculated: 5000000 Hz (clkdiv=100) hm2_rpspi: SPI1/CE2 read clock rate calculated: 5000000 Hz (clkdiv=100) hm2_rpspi: SPI1/CE2 Invalid cookie, read: 00000000 00000000 00000000, expected: 55aacafe 54534f48 32544f4d hm2_rpspi: SPI1/CE2 No drive seen on MISO line (kept at pull-down level). No board connected or bad connection? hm2_rpspi: rtapi_app_main: No such device (-19) <stdin>:2: waitpid failed /usr/bin/rtapi_app hm2_rpspi <stdin>:2: /usr/bin/rtapi_app exited without becoming ready <stdin>:2: insmod for hm2_rpspi failed, returned -1
Code:

Please Log in to join the conversation.

More
6 years 10 months ago #153597 by gtt38
Replied by gtt38 on topic Raspberry Pi 4
i tested CE0 or CE1 on SPI1 with 5Mhz, i hope it could help you to debug :
CE0 :
Code:
pi@raspberrypi:~ $ halrun halcmd: loadrt hostmot2 Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 halcmd: loadrt hm2_rpspi spi_probe=4 spi_debug=5 spiclk_rate=5000 hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1 hm2_rpspi: Base address 0xfe000000 size 0x01800000 hm2_rpspi: Mapped peripherals from 0xfe000000 (size 0x01800000) to gpio:0x0xb4c86000, spi:0x0xb4c8a000, aux:0x0xb4c9b000 hm2_rpspi: SPI1/CE0 clock rate: 5000000/5000000 Hz, VPU clock rate: 500000000 Hz hm2_rpspi: SPI1/CE0 write clock rate calculated: 5000000 Hz (clkdiv=100) hm2_rpspi: SPI1/CE0 read clock rate calculated: 5000000 Hz (clkdiv=100) hm2_rpspi: SPI1/CE0 Invalid cookie, read: 00000000 00000000 00000000, expected: 55aacafe 54534f48 32544f4d hm2_rpspi: SPI1/CE0 No drive seen on MISO line (kept at pull-down level). No board connected or bad connection? hm2_rpspi: rtapi_app_main: No such device (-19) <stdin>:2: waitpid failed /usr/bin/rtapi_app hm2_rpspi <stdin>:2: /usr/bin/rtapi_app exited without becoming ready <stdin>:2: insmod for hm2_rpspi failed, returned -1 halcmd:

CE1:
Code:
pi@raspberrypi:~ $ halrun halcmd: loadrt hostmot2 Note: Using POSIX realtime hm2: loading Mesa HostMot2 driver version 0.15 halcmd: loadrt hm2_rpspi spi_probe=8 spi_debug=5 spiclk_rate=5000 hm2_rpspi: Platform: Raspberry Pi 4 Model B Rev 1.1 hm2_rpspi: Base address 0xfe000000 size 0x01800000 hm2_rpspi: Mapped peripherals from 0xfe000000 (size 0x01800000) to gpio:0x0xb4cf4000, spi:0x0xb4cf8000, aux:0x0xb4d09000 hm2_rpspi: SPI1/CE1 clock rate: 5000000/5000000 Hz, VPU clock rate: 500000000 Hz hm2_rpspi: SPI1/CE1 write clock rate calculated: 5000000 Hz (clkdiv=100) hm2_rpspi: SPI1/CE1 read clock rate calculated: 5000000 Hz (clkdiv=100) hm2_rpspi: SPI1/CE1 Invalid cookie, read: 00000000 00000000 00000000, expected: 55aacafe 54534f48 32544f4d hm2_rpspi: SPI1/CE1 No drive seen on MISO line (kept at pull-down level). No board connected or bad connection? hm2_rpspi: rtapi_app_main: No such device (-19) <stdin>:2: waitpid failed /usr/bin/rtapi_app hm2_rpspi <stdin>:2: /usr/bin/rtapi_app exited without becoming ready <stdin>:2: insmod for hm2_rpspi failed, returned -1 halcmd:

@Bertho : I can run some test for you if you need to modify your driver.

Please Log in to join the conversation.

More
6 years 10 months ago #153599 by Bertho
Replied by Bertho on topic Raspberry Pi 4
Hmm, the whole of SPI1 is not working. There is no data at all read back, it seems.
Do you know whether data actually gets sent out? You have your own FPGA setup; maybe you can put an oscilloscope on the lines and see whether this is a read problem or a complete fail on all the SPI1 lines? That may narrow the problem down.

Also, do you have a RPi3? Now I am wondering if the older version actually still works. You should be able to swap the SD card and boot if you have not locked the kernel to the new SoC.

Please Log in to join the conversation.

More
6 years 9 months ago #153631 by gtt38
Replied by gtt38 on topic Raspberry Pi 4
unfortunately I locked the kernel to the new SoC.
But i own a raspberry pi 3 and i found a image on Gene website so i'm gonna try

Please Log in to join the conversation.

More
6 years 9 months ago #153734 by gtt38
Replied by gtt38 on topic Raspberry Pi 4
Just tried with a RPi3 and unfortunatly the only image that i found on Gene website is an old one (dec 2016)
HM2_rpspi seems to be really old ("spi_probe=16" is unreconized same for "spi_debug")
i have a too small oscilloscope (1 mhz max) so it will be difficult to monitor SPI1

Please Log in to join the conversation.

More
6 years 9 months ago #153739 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
You didn't look in the right place. Add /lathe-stf to the link in my sig, which should get you a directory containing linixcnc4rpi4, click on that and you'll find a build but not stripped kernel, and the debs that are running linuxcnc on my rpi4 and have been for a couple months. The debs ae ready to install and supposedly have Bertho's latest rpspi. driver. I couldn't make the read and write speed commands work, and my lashup will not read from a 7i90HD any faster that 25 megabits, so the code is hard built for a 31 megabit write and a 25 megabit read. Untested with the other two cards.

That kernel contains the newer much faster video drivers and will make 60 fps glxgears on a full 1920x1080 screen, which is about 58 fps faster than the older kernel can do.

Sorry the kernel is about 2.5 gigabytes but its fully built, just follow Big Johns instructions to install what you need from it.

I don't have upload bw to spare, so its slow. And I've blocked about 40 of the nets less well trained bots from mirroring my site.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page < geneslinuxbox.net:6309/gene >

Please Log in to join the conversation.

More
6 years 9 months ago #153740 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
And my blocks are /24 wide. So I you can't get it,, send an email to gheskett@shentel.net, containing your outside ipv4 address and I'll clear that block if you are in its /24 reach, meaning the first 3 numbers match.

Be my guest.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page < geneslinuxbox.net:6309/gene >

Please Log in to join the conversation.

More
6 years 9 months ago #153742 by gtt38
Replied by gtt38 on topic Raspberry Pi 4
Thanks Gene
I'm downloading your kernel. Seems really promising.

Please Log in to join the conversation.

Time to create page: 0.167 seconds
Powered by Kunena Forum