rene-dev / stmio

GNU General Public License v3.0
5 stars 1 forks source link

Using a STM chip as IO expander ? #1

Open youprint opened 6 years ago

youprint commented 6 years ago

Hi There is nothing on the read me file but i'm looking for a starting point. I'm looking to use a STMF1 or F4 with a raspberry pi 3 using SPI com in LinuxCNC or MachineKit. I'm looking create a really cheap solution to drive a 3D printer. I tried the BeagleBone with his PRU and it's not to bad, but i was disappointed by the poor graphics performance. Raspberry don't have fast I/O but it's cheap and very fast, the graphic chip is good and it boot linux very quickly. A lot of people are using a Mesa 7i90 (spartan 6) in SPI with the Raspberry and they are really satisfied with it. I'm looking to do the same but with a STM32F103RE VE or ZE. It run at 72Mhz and SPI can run at 36Mhz. giving access to the raspberry to analog and fast i/O from the STM chip. If your are working on something like i could help you Regards

rene-dev commented 6 years ago

This is code for a smart serial port expander, like the mesa 7i84. It does not help you at all. the 7i90 can connect to a pi like you said, via spi. you could then connect this to the smart serial channels of a 7i90. the 7i90 runs hostmot firmware to talk to linuxcnc. I started rewriting hostmot firmware in c, to run on stm32, however, I use the ethernet as transport layer. you could easily add a spi transport, and reuse all the rest, the communication is in a completely separate layer. currently my hostmot firmware only has support for smart serial master, IOs, stepgen and the watchdog. Im working on PWM and encoders. you cant use ethernet on the pi for this, because its connected via usb, that doesnt work with realtime stuff.

let me know if you are interested in working on this.

youprint commented 6 years ago

So i have to buy a 7i90 to help you, I already own a spartan 6 dev board (same chip as 7i90 ) with the same 16Mb eeprom, so maybe i couls transform this board in 7i90 with the same firmware. I own this dev board : https://fr.aliexpress.com/item/New-Xilinx-FPGA-development-board-Xilinx-spartan-6-core-board-free-ship/32692200648.html?src=google&albslr=228338622&isdl=y&aff_short_key=UneMJZVf&source=%7Bifdyn:dyn%7D%7Bifpla:pla%7D%7Bifdbm:DBM&albch=DID%7D&src=google&albch=shopping&acnt=494-037-6276&isdl=y&albcp=653151748&albag=36672819047&slnk=&trgt=61865531738&plac=&crea=fr32692200648&netw=g&device=c&mtctp=&gclid=CjwKCAiA5OrTBRBlEiwAXXhT6OzssMZ3Cp9NSLRgpUgvZHt-ErnGTJV5TNizJKItnvBkNAjXG3vMRhoC1FwQAvD_BwE

Rewriting Hostmot in C is the greatest idea to start. I really want to help you. I just recently succefully compiled the new marlin firmware (3D printing firmware) with a STM32F103 HAL with a specific bootloader (STM32duino) and with Arduino libs. So i finished my work looking for a new project...

oh i forgot I own a Xillinx programmer tool too if it's helpful...

rene-dev commented 6 years ago

yes, you could make that board into a 7i90. for what Im making you dont need a fpga dev board, you need a stm32 dev board. Im using stm32f4, because of the FPU. that would also make sense for your marlin port. is that available somewhere? would like to see that.

youprint commented 6 years ago

I own a lot of STM32F1xx and F4 dev board, almost all the family. In F4 I own a F4 disco, A 407VGT minimal, a 407 VET6 minimal, a 407 ZGT6 and Nucleo 401 and 411....

youprint commented 6 years ago

Just tell me where is your repo and i’m going to help you.

rene-dev commented 6 years ago

can you join the stmbl irc, so we can talk?

Slayer1000 commented 3 years ago

Hallo ich suche eine Möglichkeit an den Smart Serial Port einer Mesa 7i76e einen I/O Expander zu hängen. Dieser soll für eine Matrix Tastatur einer Haas Fräsmaschine dienen. Ich benötige min 24 Eingänge, schöner wären 48 oder mehr für einige Zusatzknöpfe und Potis für Vorschub Eilgang etc. . Wäre ein STM32 dafür geeignet? Welcher? Hast du zufällig schon eine Firmware für so was? Ich nutzte LinuxCNC mit den Mesakarten 7i76e und 7i77. Ich bin leider kein Programmierer, versuche mich jedoch gerne einzuarbeiten. LG

Hello I am looking for a possibility to connect an I/O expander to the Smart Serial port of a Mesa 7i76e. This should be used for a matrix keyboard of a Haas milling machine. I need at least 24 inputs, it would be nicer to have 48 or more for some additional buttons and potentiometers for rapid speed etc. . Would a STM32 be suitable? Which one?Do you already have a firmware for this use? I use LinuxCNC with the mesa cards 7i76e and 7i77.I am not a programmer unfortunately, but I am trying to learn the ropes. Regards