On Saturday 15 February 2020 05:55:18 Thomas J Powderly wrote: > Hello > I have a raspberry pi 4, 4G > /proc/cpuinfo shows > > Hardware : BCM2835 > Revision : c03112 << THIS IS A PROBLEM > Serial : 100000007ef4bf9c > Model : Raspberry Pi 4 Model B Rev 1.2 > and those values will fail trying to load the hal_pi_gpio module. > > When I tried to use hal_pi_gpio, > I got this error. > > pi@raspberrypi:~ $ linuxcnc > LINUXCNC - 2.8.0~pre1 > Machine configuration directory is > '/home/pi/linuxcnc/configs/NEW-rpi4-2250vel-nohome' > Machine configuration file is 'rpi4-2250vel-nohome.ini' > Starting LinuxCNC... > Found file(REL): ./rpi4-2250vel-nohome.hal > Note: Using POSIX realtime > > HAL_PI_GPIO: ERROR: board revision 6 not supported > hal_pi_gpio: rtapi_app_main: Invalid argument (-22) > ... > > so i looked why rev 6 is not allowed > > in hal_pi_gpio.c I read... > > int rtapi_app_main(void) > { > int n, retval = 0; > int rev, ncores, pinno; > char *endptr; > > if ((rev = get_rpi_revision()) < 0) { > rtapi_print_msg(RTAPI_MSG_ERR, > "unrecognized Raspberry revision, see > /proc/cpuinfo\n"); > return -EINVAL; > } > ncores = number_of_cores(); > rtapi_print_msg(RTAPI_MSG_INFO, "%d cores rev %d", ncores, rev); > > switch (rev) { > case 5: > rtapi_print_msg(RTAPI_MSG_INFO, "Raspberry4\n"); > pins = rpi2_pins; > gpios = rpi2_gpios; > npins = sizeof(rpi2_pins); > break; > > ... NOTE 6 IS NOT A VALID CASE > > default: > > rtapi_print_msg(RTAPI_MSG_ERR, > "HAL_PI_GPIO: ERROR: board revision %d not > supported\n", rev); > return -EINVAL; > ... > } > > well, I think the value 'rev' will return 6 for my hdwr > because > cpuinfo.c has > > int get_revision(void){ > ... > else if ((strcmp(revision, "a03111") == 0) || > (strcmp(revision, "b03111") == 0) || > (strcmp(revision, "c03111") == 0)) // tjp note NOT > "c031112" return 5; > else // assume rev 5 > return 6; //tjp 6 is what mine > returns > } > > now my /proc/cpuinfo shows > Hardware : BCM2835 > Revision : c03112 > Serial : 100000007ef4bf9c > Model : Raspberry Pi 4 Model B Rev 1.2 > > so my board falls into default '6' > and 6 fails > > If i am correct , > then the fix seems to be in the detection by cpuinfo ( reurning 6 ) > or > in the action taken by hal_pi_gpio.c rtapi_app_main where it has no > rev 6 case > > what to do? > > thanks tomp > Quit trying to use it. For normal operation its not needed as far as I know. I am not. I think you'll find warning in the docs about it being unusable. IMO it should be removed just to prevent scenes like this.
But you didn't say what interface card you were using. If a 7i90HD then: rpspi.ko will drive it. or the newer 7c80/81's are supposed to work with that driver. But I've not seen confirmation of the latter actually moving iron on the LCNC forum. I am moving iron in the form of a 75 yo 11x54 Sheldon lathe I've converted to run by linuxcnc, and have been for around 3 years. But beware the 7i90, while it a heck of a card and you will never run out of i/o, as it has 72 gpio if no firmware is loaded its also totally exposed to any injected noise, Meaning not more than 50 millivolts below ground or over nominally 3.4 volts is allowed at any output else that gate in the fpga will be blown. its outputs are connected directly to the fpga and the 50 pin times 3 are very difficult to get a reliable connection to as the available jumpers to plug onto the pin of one of the 50 pinners are all crap and fall off if a bug lands on the jumper wire. So spend the sheckles and get 3 of the 7i42TA's and make 3 50 pin jumpers 4 or so inches long to connect them to the 7i90. They contain the noise protector circuitry and voltage limiters that make the 7i90 100% 5 volt compatible AND also gives you screw terminals for hooking it all up. The screw terminals alone were well worth the cost to me. So what interface card are you going to use? Having long time experience with the 7i90+3-7i42TA's I'd recommend it. It can drive up 8 axises of steppers or pwm+dir servo's and can handle the quadrature encoders for all 8 of those servos. But if you want to rigid tap, you'll be limited to 7 axises in order to be able to use the spindle tach and the rigid tapping that goes with it. Whatever you want to do, the 7i90 can, within these limits, do. I have no pid's in my config, but if using servo's they will be needed. I'm running steppers with a pi4 running at 800 MHz, but that might have to be stepped up some if useing PID's. Cool the pi accordingly I'm a poor boy only 85 yo so steppers are my movers. It Just Works very well. 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) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers