#flex-dev Logs

Aug 01 2025

#flex-dev Calendar

04:25 AM Tom_L: morning
04:42 AM JT-Cave: morning
07:27 AM Tom_L: mesact needs an entry point to add a spi address for mesaflash
07:28 AM JT-Cave: where does the spi address go in hal?
07:28 AM Tom_L: i'd have to boot the pi to see
07:29 AM Tom_L: rpi4 has one iirc but rpi5 has 3 but i think both use /dev/spidev0.0
07:29 AM JT-Cave: ok, we are heading to collinsville today
07:29 AM Tom_L: i can check on that later today
07:29 AM Tom_L: have a good time
07:29 AM JT-Cave: ok
07:30 AM JT-Cave: I just finished and tested the 7i76 spindle code for mesact
07:32 AM JT-Cave: oh I have one more thing to do to mesact
07:34 AM Tom_rpi5: [HOSTMOT2]
07:34 AM Tom_rpi5: ## for spi on rpi5:
07:34 AM Tom_rpi5: DRIVER=hm2_spix
07:34 AM Tom_rpi5: BOARD=7i90
07:34 AM Tom_rpi5: SPICLK_RATE=25000
07:34 AM Tom_rpi5: SPICLK_RATE_RD=25000
07:35 AM Tom_rpi5: loadrt [HOSTMOT2](DRIVER) config=[HOSTMOT2](CONFIG) spiclk_rate=[HOSTMOT2](SPICLK_RATE) spiclk_rate_rd=[HOSTMOT2](SPICLK_RATE_RD)
07:35 AM Tom_L: first is ini, last line is hal
07:37 AM Tom_rpi5: missed one in the ini:
07:37 AM Tom_rpi5: SPI_ADDR = /dev/spidev0.0
07:37 AM Tom_rpi5: same section
07:38 AM Tom_L: mesaflash would use the SPI_ADDR
07:39 AM Tom_L: rather /dev/spidev0.0
07:41 AM JT-Cave: ok and I'm done with mesact for the day
07:42 AM Tom_rpi5: sudo mesaflash --device 7i90HD --spi --addr /dev/spidev0.0 --readhmid
07:43 AM JT-Cave: would the 7c80 and 7c81 be the same as the 7i90HD?
07:43 AM Tom_L: you want a build for it?
07:43 AM Tom_L: yessir
07:43 AM JT-Cave: yup, I fixed a few things for the 7i76 spindle
07:43 AM Tom_L: the address comes from the rpi
07:44 AM JT-Cave: is there a way to get the address with a terminal command?
07:44 AM Tom_L: stole the kbd from the dev machine...
07:44 AM JT-Cave: shower time
07:44 AM Tom_L: rdtsc may have showed that in the logs here yesterday
07:45 AM Tom_L: i'll see if i can find out later on
07:47 AM Tom_L: PR #155 mesact debs
07:52 AM Tom_rpi5: ls -l /dev/spi*
07:52 AM Tom_rpi5: crw-rw---- 1 root spi 153, 0 Aug 1 07:32 /dev/spidev0.0
07:52 AM Tom_rpi5: crw-rw---- 1 root spi 153, 1 Aug 1 07:32 /dev/spidev10.0
07:53 AM Tom_rpi5: or the short version:
07:53 AM Tom_rpi5: ls /dev/spi*
07:54 AM Tom_rpi5: /dev/spidev0.0 /dev/spidev10.0
07:56 AM Tom_L: on rpi5 you will always want the 0.0 one
07:57 AM Tom_L: they would have to jumper the cs pin otherwise
07:59 AM Tom_L: well it did something right for a change
08:14 AM Tom_L: spi must be enabled in the rpi config too
11:19 AM rdtsc: in the latest rpi5 .xz iso, yes SPI is enabled in /boot/broadcom/config.txt by default
11:20 AM Tom_L: what about the rpi4?
11:20 AM rdtsc: i think they'll all have to be /dev/spidev0.0 - to use any of the other SPI ports would require rewiring the host cable, which kinda defeats the whole purpose of the 7c80/7c81 - unsure about the 7i90
11:21 AM Tom_L: pretty sure of it
11:21 AM Tom_L: same on the 7i90
11:21 AM Tom_L: it's just not a straight thru cable
11:21 AM rdtsc: the rpi4 iso, tried several, and SPI was hit-or-miss default... mostly miss
11:22 AM rdtsc: could check if /dev/spidev0.0 exists at start, and warn 7c8x and 7i90 users
11:42 AM lcnc-relay: <ccatlett1984@> I have that check in my install guide for the rpi5
12:33 PM Tom_shop: on the rpi4, ls /dev/spi* returned:
12:33 PM Tom_shop: /dev/spidev0.0 /dev/spidev0.1
12:40 PM Tom_rpi5: in the /boot/firmware/config.txt set dtparam=spi=on and i also have dtoverlay=spi0-1cs,cs0_pin=8
12:41 PM Tom_rpi5: since there are multiple spi ports it might be a good idea to include that line
12:41 PM Tom_rpi5: it will specify what pin to use for the chip select
01:50 PM JT-Mobile: Yo
01:52 PM JT-Mobile: Made it to Mary Jane's in Perryville
03:04 PM Tom_L: tell her hi
04:40 PM Tom_L: i left you some rpi notes
04:40 PM JT-Mobile: ok
04:41 PM Tom_L: both boards use /dev/spidev0.0
04:41 PM Tom_L: ls /dev/spi* gets the list from a terminal
04:48 PM JT-Mobile: hmm I can log into github but don't have the ssh keys setup on this pc so can't do anything
04:50 PM JT-Mobile: hmm looks like the ssh keys are on this pc...
04:51 PM JT-Mobile: copy and paste error
04:56 PM Tom_L: both* actually all 3 do
05:07 PM JT-Mobile: ok I was able to update my spi notes on the mesact repo
05:15 PM Tom_L: ok
05:20 PM Tom_L: i should have something to test with aside from the 7i90 next week sometime
05:20 PM JT-Mobile: cool
05:20 PM Tom_L: i think one of each
05:24 PM Tom_L: do you stock those?
05:24 PM JT-Mobile: spi boards?
05:25 PM Tom_L: yeah
05:25 PM JT-Mobile: no, I don't stock any, I do have a 7c80 or 81 I forget
05:25 PM Tom_L: i don't see any
05:25 PM Tom_L: not near as common as some of the others
05:26 PM Tom_L: the spi will be the same on all 3
05:26 PM JT-Mobile: ah I have a 7c81
05:26 PM JT-Mobile: somewhere...
05:26 PM JT-Mobile: not sure if I have any idc40 connectors or not
05:27 PM Tom_L: i ordered a bunch if you need a couple i can just send a cable
05:27 PM Tom_L: needs to be real short
05:27 PM Tom_L: 1.5 - 2" max
05:28 PM JT-Mobile: too bad it doesn't plug in like a top mounted board
05:30 PM Tom_L: the rpi mounts to the bigger one i think
05:31 PM JT-Mobile: the 7c81 has 2 25 pin and 1 40 pin connector
05:31 PM Tom_L: i got like 15 ea plugs to make the min order.. i'll never use em all
05:31 PM Tom_L: the 40 is the spi
05:31 PM Tom_L: not nearly all used
05:35 PM Tom_L: only 4-5 pins used aside from gnd
05:36 PM Tom_L: miso, mosi, sck, cs, gnd
05:37 PM JT-Mobile: https://www.amazon.com/Antrader-2-54mm-Female-Socket-Connector/dp/B07RXKC987
05:37 PM Tom_L: i got some from jameco
05:38 PM Tom_L: also got some 26 pin
05:38 PM JT-Mobile: I have 50 flat cable so I just strip it down to 25 usually
05:38 PM Tom_L: same her
05:38 PM Tom_L: e
05:39 PM Tom_L: i had 2 spools of 10 cond i stripped down for my programmers
05:39 PM Tom_L: since i couldn't get 6 cond
05:40 PM JT-Mobile: I found an annoying thing with auto load in mesact, you have no way to cancel the auto load
05:44 PM Tom_L: what does autoload do?
05:44 PM Tom_L: loads the config you were working on?
05:46 PM JT-Mobile: if you have that checkbox checked it saves the path to the config file
05:48 PM JT-Mobile: on startup if that item is in the config file it opens it
05:48 PM Tom_L: on startup ask if you want to load the previous config
05:49 PM Tom_L: unless there is no path saved
05:56 PM JT-Mobile: I have a checkbox to open the last saved config
05:57 PM Tom_L: so if you don't want it loaded, uncheck it before you quit?
05:58 PM Tom_L: trying to get to the 'annoying' part...
06:26 PM JT-Mobile: if the mesact version in the configuration ini file is older than the mesact version mesact gives you two choices
06:26 PM JT-Mobile: save the config to a zip file and delete it or cancel
06:27 PM JT-Mobile: it doesn't give you the option to not auto load that file
06:32 PM Tom_L: hmm
06:36 PM JT-Mobile: and looking at the code I don't think it does what it says it's going to do
06:37 PM Tom_L: i haven't saved enough configs to know
06:45 PM JT-Mobile: I save and load them a lot when testing code saves me a few mouse clicks