dresco / STM32H7xx

grblHAL driver for STM32H7xx processors
Other
11 stars 12 forks source link

H723 ZET6 compatibility? #18

Closed JoeCorelli closed 1 month ago

JoeCorelli commented 5 months ago

Hi,

Looking to incorporate a Bigtreetech Octopus MAX EZ with an H723 ZET6 chip into my CNC project. Wondering if simply remapping pins would allow use of the board with grblHAL and if not how could I request implementation. Apologies if this is not the correct place for the question. edit: I have already completed the map.h file.

JoeCorelli commented 5 months ago

Does manually forcing it with Ctrl-Shift-P -> Rebuild IntelliSense index make any difference? No same result.

I decided the best way to see if something was tying spi.c to reference_map.h was to delete the reference map. After deleting, the SPI reference switched to the Octopus map.h, but after flashing it still did nothing. Once I enable software SPI with no other changes everything works 100%. Is there any reason why using software SPI is a bad idea?

Looking at the schematic. The SPI signal goes through U18 and U19 Is that still considered hardwired to the MCU or are they actually software controlled? image

Just throwing out ideas at this point. I'm not sure where to go next.

dresco commented 5 months ago

Hi Joe,

Think I have finally worked it out..

I'd overlooked that SPI4 has a different clock source to SPI1/2/3, and was running faster than expected (and too fast for the Trinamic modules).

Can you try this test firmware before I push any changes please? Thanks!!

firmware.zip

Is built for 5160 drivers, hardware SPI, 5 axis + ganged y (and has the M5 enable fix).

JoeCorelli commented 5 months ago

Jon,

That was it. Firmware worked great!

I will get parts tomorrow for RS485 and then I can incorporate the controller onto the bigger machine to test spindle, laser and configure for NEMA23 steppers.

Joe

dresco commented 5 months ago

That was it. Firmware worked great!

Cool, thanks for testing. Will finish testing & push the update tomorrow..

terjeio commented 5 months ago

Strange thing is that M122 shows B2 instead of Y2. The B2 motor still moves for the Y Axis though.

Can you try with replacing this code with:

#ifdef X_DOUBLED
#define X2_MOTOR (X_DOUBLED + 2)
#endif
#ifdef Y_DOUBLED
#define Y2_MOTOR (Y_DOUBLED + 2)
#endif
#ifdef Z_DOUBLED
#define Z2_MOTOR (Z_DOUBLED + 2)
#endif

Is it possible to just add the sense resistance value to the driver settings with a default of 0.1ohms and user can change the value as you would for driver current? I think it would make it easier in the end. That way you don't have to keep adding variants to the webbuilder or make changes to my_machine.h if someone uses a driver from a different manufacturer or variant from the same manufacturer. Lately it seems like a new variant comes out every few months.

It is but I'll go for the symbol first as a default value has to come from somewhere and that should be overridable anyway. And I may have to change axis setting number allocations for the S-curve acceleration profile since this belongs to the core.

JoeCorelli commented 5 months ago

Terje, That fixed it. I configured for 4 and 5 Axis and it shows Y2 now. image image

Jon, Cool, thanks for testing. Will finish testing & push the update tomorrow..

Sounds good!

Thanks Joe

JoeCorelli commented 5 months ago

Jon,

Any luck integrating those changes?

Joe

dresco commented 5 months ago

Apologies, bit slow in testing. Master branch has been updated with the latest fixes now..

JoeCorelli commented 5 months ago

Thanks Jon.

I'm getting the controller wired up and getting everything ready to test next week. There will probably be some changes to the pin map for the spindle configuration as I don't think I can use the fan pin for enabling the spindle.

Also would like to use the fans plugin, but not sure what to define in the board map to accomplish that.

dresco commented 5 months ago

Also would like to use the fans plugin, but not sure what to define in the board map to accomplish that.

I've not used that plugin before, but I think it's going to be looking for at least one AUX output port (see reference_map.h for examples)?

tfali2679 commented 2 months ago

Hi,

I recently picked up a BTT Octopus Max EZ with hopes of getting grblhal to run on it. The issue i'm facing is that no matter what i do, ie use the web builder or compile in STMIDE, I'm unable to get windows to recognize my board after uploading the firmware. I've tried uploading with and without BL using the respective versions of the FW. The only firmware file that seems to allow me to connect to windows and subsequently UGS is the one you provided here:

https://github.com/dresco/STM32H7xx/issues/18#issuecomment-1895831854

I would have no issues using it, however its configured for 5 axis and does not have the fixes made since you created it.

I would be grateful for any help you could provide.

Some information about my intended build:

3 axis (5 axis planned in future) on/off spindle cartesian kinematics I was also hoping to use external stepper drivers, I don't know if that would be a problem.

Thanks,

Riq

Edit: Looks like I've made some progress on getting the board recognized. I should have added earlier that I'm connecting the board without anything attached at this point. After trying numerous iterations of different settings using the web builder, I was finally able to find that when I select Spindle 1 setting to be "On/Off", I'm able to generate a firmware file that flashes and subsequently allows the board to be recognized by windows on boot. Could this be because when using "PWM" spindle, I have no spindle attached and that causes some error? This is my first time embarking on a project like this so I really have no clue. I should add that all other settings were left at default using the webbuilder, so I'm fairly certain it is the spindle setting. I have not yet tried building using cubeide because frankly I have no clue what im doing.

dresco commented 2 months ago

Hi Riq,

Edit: Looks like I've made some progress on getting the board recognized.... Could this be because when using "PWM" spindle, I have no spindle attached and that causes some error?

Won't make any difference that a spindle isn't connected, but could be a bug in the code or configuration. I don't have an Octopus Max board here, but do have other H723 boards, so will try and troubleshoot the Octopus build on one of those this week..

I was also hoping to use external stepper drivers, I don't know if that would be a problem.

No, shouldn't be a problem. Looks like the step/direction/enable signals are brought out on 0.1" headers next to the EZ sockets..

Thanks for the testing/input. Cheers, Jon.

dresco commented 1 month ago

For info - the Spindle PWM fix for the Octopus board is now available in the Web Builder

Closing this issue as I think that was the last outstanding issue for the currently supported H723 boards.