I've got the STMBL code flashed on an STM32F407G Discovery eval board, and running with the Servoterm control software (which I am very delighted to have achieved).
I seem to be missing something in setting up sserial in Linuxcnc though. Axis loads without error, but shows only gpio for the pins that are supposed to be sserial. Here is what I've done: 1. Vhdl file has sserial module tag defined. (SSerialTag, x"00", ClockLowTag, x"01", SSerialCommandAddr&PadT,SSerialNumRegs, x"10", SSerialMPBitMask), 2. Vhdl file has sserial pins defined. IOPortTag & x"00" & SSerialTag & SSerialRX0Pin, -- I/O 48 IOPortTag & x"00" & SSerialTag & SSerialTX0Pin, -- I/O 49 IOPortTag & x"00" & SSerialTag & SSerialTXEn0Pin,-- I/O 50 3. HAL file has config including sserial_port_0 defined. Linuxcnc version is 2.8.1 running on Raspberry Pi 3b+ buster. loadrt hostmot2 debug_idrom=1 loadrt hm2_rpspi config="num_encoders=2 num_pwmgens=2 num_stepgens=4 sserial_port_0=0XXXXXXX" spiclk_rate=12500 4. The STMBL sserial rx pin (PA10) is connected to the 7i90 pin P3-01 and sserial tx pin (PA8) is connected to 7i90 P3-03. 5. When I run linuxcnc, those pins show up as gpio. hm2/hm2_7i90.0: Smart Serial Firmware Version 43 .... hm2/hm2_7i90.0: IO Pin 048 (P3-01): IOPort hm2/hm2_7i90.0: IO Pin 049 (P3-03): IOPort 6. A scope watching PA8/P3-03 and PA10/P3-01 shows a series of 10us active low pulses on PA8/P3-03. PA10/P3-01 has short glitches. To minimize signal integrity issues, I stacked some connectors to join the STMBL board and the 7I90. Signals were the same using 6" jumper wires though. (see photos at https://gab.wallawalla.edu/~ralph.stirling/projects/linuxcnc/stmbl) 7. On the STMBL board, I have a config of: load sserial load adc sserial0.pos_fb = adc0.cos0 I'm hoping there is just some simple step I'm missing. I don't know if the problem lies at the STMBL or 7I90 end. Thanks again. -- Ralph ________________________________________ From: andy pugh [bodge...@gmail.com] Sent: Monday, January 18, 2021 10:24 AM To: Enhanced Machine Controller (EMC) Subject: Re: [Emc-users] Another Mesa vhdl question CAUTION: This email originated from outside the Walla Walla University email system. On Mon, 18 Jan 2021 at 16:42, Ralph Stirling <ralph.stirl...@wallawalla.edu> wrote: > > The AD7740 v-to-f converters don't work as well > as I'd like, and I'm thinking about just using a > little microcontroller, like the STM32G031 to do > my A/D conversion. One option there might be to use the STMBL source, that converts the STM32 into a smart-serial device, that could pass the voltage as an all-digital number straight to HAL. (STMBL does far more than that too, but you wouldn't need all of it) -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users