-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Progress with STM32H7 #152
Comments
Good. I will try when board arrival. About 1 month. Also, found this board added to Marlin firmware. |
Hi @Demitrius Is that the BTT SKR 3 board you have on order? I had been wondering about getting one for testing. Thanks for the link to the Marlin code, will probably be something useful in there.. |
For info, have ordered a BTT SKR 3 EZ board with 2209 drivers. Will pull some pin definitions out of the Marlin code and get it up & running when it arrives. One thing I've noticed from the Marlin code already, for some reason the I2C EEPROM has been put on the SWD pins, so looks like no proper debug on this board :( Am hoping to make my own board for the H743, but will realistically be a (northern hemisphere) winter project, so a while away.. |
Hi @dresco Ordered a BTT SKR 3 EZ board with EZ5160 PRO drivers. |
My board arrived today (that was quick). |
Great! My still on the road. |
Hello. Board arrived. Can I do something for you? |
Cool. I've been updating issue #158 - I have my board up and running with the 2209 drivers using software UART. I plan to pick up a 5160 breakout for testing when they come back into stock. In terms of porting the code to the H7, I think the F4 repo is the best place to start - as it has Trinamic SPI code for SKR 1.1, SKR 2, and Nucleo boards. @terjeio I've just noticed that the SKR 2 board driver has a s/w SPI implementation already - I'd missed that previously. What do you think the best approach is, to try and refactor both h/w and s/w SPI implementations out of the board drivers into a tmc_spi.c or similar? |
@dresco - refactoring into a tmc_spi.c sounds like a good idea. I can backport to the F4 if you do it for the H7. |
@terjeio Am making progress with this - but something in the trinamic driver is puzzling me... Within I can't see how this would work for the existing drivers, or am I missing something? Thanks! |
This is where and how all outputs pins are configured in |
From what I see here, the issue is that function is called before In the link I posted above, the HAL driver setup is called first (configuring the pins), and then the trinamic driver setup is called (adding the chip select pins as outputs).. |
I am not sure what you mean by this - they are configured as outputs and set high in |
Ahh - I've just realised my mistake. I was assuming the enumeration had to happen before driver_setup() was run in order to configure them, but I now see that is not the case at all. I had tripped myself up by (a) initially forgetting to add the PinGroup_Motor handling to driver_setup(), and then (b) forgetting to change DIGITAL_OUT to suit the F7/H7 implementation (shifting by the pin number instead of using it directly). Had convinced myself it wasn't working for all the wrong reasons, apologies! ;) |
I've pushed my work so far to a new tmc_spi branch on my repo. I don't have the hardware to test yet, but both software and hardware SPI implementations appear to be starting okay. One thing of note, I've not been able to change the prescaler after the SPI peripheral has been initialised. The writes to the config register don't have any effect (possibly locked if in use?), will look into that... |
Fixed in latest commit I think, the SPI peripheral just needed to be disabled before writing to the register. |
If you have time you may want to try WebUI v3, it stresses the networking code (http and websocket daemons) as well as the SD card so great for testing. I have added a new API call to enet.c that is required, you'll have to add that as well as update to the latest core. |
Cool, will do.. |
@Demitrius I've just pushed the TMC5160 support to my master branch if you want to test? I don't have the 5160 modules to test on my SKR3, but have successfully verified communication with a TMC5160-BOB on my WeAct dev board. |
@dresco Good news! Could you provide me list of task I can do? 1 - Connect TMC5160 (EZ my case) to board |
From my testing with the 5160 breakout, it does need motor power to be supplied before it will respond, so you will need the 24v power supply. Is probably easiest to build and program with PlatformIO (STMCubeIDE needs another tool for DFU uploads), or I can provide a binary for testing if easier. Please note however, there is currently something odd with the PlatformIO builds - for instance SD Card access issues that I don't see on my STMCubeIDE builds. (I haven't spent much effort investigating this yet, as their H7 library is out of date anyway - so am unable to make any PlatformIO Ethernet builds, and was waiting for that to be updated first).. |
Yep, I've added an entry to my "External Tools" menu to call a command line DFU uploader, that seems to work well enough. (Incidentally, the ST32CubeProgrammer CLI also accepts .elf files for DFU upload, but I expect most people would use something like dfu-util instead).. I think the issues I was seeing with PlatformIO builds are resolved also. I may eventually try to set up a GitHub action to build the PlatformIO firmwares automatically. |
This turned out to be easier than I expected - is now building automatically on each push to master, and the resulting firmware files are archived in the artifacts for each run. Am currently building the following, in standard 3-axis configurations;
|
@dresco did you find any specific documentation to set up the automatic builds? This is something I would like to do on the F4xx driver. |
@andrewmarles Only from the platformio docs, and looking at other examples online. My config is here, and I think it should work as-is in the F4 repo. The workflow file(s) just need to go into a .github/workflows folder in the main/master branch. Am archiving any generated firmware files into the artifact for each run - however these are only stored for 90days from the build. Possibly a good next step could be to create a more permanent release action. Perhaps creating tags & releases based off the |
@dresco early we made successfull test TMC2209 and 5160 drivers with STM32H7. Will you merge changes to master branch? |
Hello Terje Io and All.
Same question like in #88
I want to use BTT motherboard with STM32H743VIT6 cpu.
How about progress with STM32H7 ?
May I help you some how?
The text was updated successfully, but these errors were encountered: