Geeetech3D / Diagram

Circuit diagram for 3D printers
11 stars 3 forks source link

Marlin 2.x Support for the GTM32 mini and pro boards #1

Open redangel1984 opened 6 years ago

redangel1984 commented 6 years ago

It would be great if these two open source boards could support Marlin 2.x 32bit version. I have no idea of coding. But this would be awesome if Geeetech or users who can code would make Marlin 2.x to be compatible with the GTM32 boards. So much possibilities and features would open up for the users and also for Marlin. I’ve seen this issue posted on the Smartto firmware repository which in my opinion would belong here, it is not a firmware issue/feature but more like a hardware issue.

InnerBushman commented 5 years ago

InnerBushman do you have Facebook or Discord or any way to communicate ?

My discord handle: InnerBushman#4784

thpparent commented 5 years ago

Hi thpparent, As you can see in my config file i also use the code for REPRAP_DISCOUNT_SMART_CONTROLLER. I have the stock LCD/encoder/SD reader from Geeetech that seems to be based on the Discount Smart Controller, only with different ribbon cable. The SD card seems to work ok with this config. I can start a print from the SD (haven't actually printed anything tho) and get no errors, the printer homes and starts to heat up. What exactly isn't working? And how are you testing?

Hi,

Thanks for your answer.

I have the feeling that something is wrong in the SD pins definition referenced above. Card inserted / removed is detected, but result is always the same "no media". It fail in the three case : power ON with card, Card inserted and Remotly reading card from repetier.

If you take a look to the Hardware_GTM32_PRO_VB. pdf, the connector seems to connect SPI2 (which could be the SD Interface), in the published as part of Marlin2.0, matched PIN with SD interface doesn't seem to be logic and are not following the same logic that the onboard SD interface PAx.

Coud you confirm that your working configuration is based on the following PIN definition ?

Thank you so much

My Facebook Account is Radagast Stufly

Thierry

Avatarsia commented 5 years ago

to my last doument it should be like this

SDIO+DMA2 control/SPI2 D0/M1SO | D1/D1 | PC9 D2/D2 | PC10 D3/CS | PC11 CLK/CLK | PC12 CMD/MOSI | PD2 CD/CD | PC7

thpparent commented 5 years ago

to my last doument it should be like this

SDIO+DMA2 control/SPI2 D0/M1SO | D1/D1 | PC9 D2/D2 | PC10 D3/CS | PC11 CLK/CLK | PC12 CMD/MOSI | PD2 CD/CD | PC7

Thanks, is it not specific to the GTM32 mini s ?

Avatarsia commented 5 years ago

regarding my infos it will also be the same for the new a30M in the future, so no all the same

Avatarsia commented 5 years ago

oh there get somethink lost D0/M1SO | P8

thpparent commented 5 years ago

To be honest, I don't recognize the format/nomenclature. Is it Marlin or RepRap ?

Thanks

Avatarsia commented 5 years ago

copy and paste from an excel sheet ^^ name| pin

InnerBushman commented 5 years ago

I have the feeling that something is wrong in the SD pins definition referenced above. Coud you confirm that your working configuration is based on the following PIN definition ? Thierry

I've just confirmed, my pinout is exactly as yours. You can look into my files I provided with my initial post. https://github.com/Geeetech3D/Diagram/files/3496221/GTM32PRO_VB.zip To be clear: I use the SD reader on the LCD controller and not the one on the board itself but they seem to be sharing pins. The SPI2 pins you've mentioned are NOT used by the SD card reader. I think those are used for serial LCDs. Technically if you are able to compile using my files it should work at least as good (bad) as mine does. Meaning the SD should work. I can't really explain why it would work here but not there other than maybe missing some libraries or something has changed in the code base since I've build it.

thpparent commented 5 years ago

Agree. Something should have changed since your successful setup. Could be :

After several attempts, I confirm that refering SPI2 pin out for the external SD reader solved my issue (it works now). pins_GTM32_PRO_VB becomes :

if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)

// // SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector //

define SS_PIN PB12 / PC11

define SCK_PIN PB13 // PC12 // PC1

define MOSI_PIN PB15 // PD2 // PD2

define MISO_PIN PB14 // PC8

define SD_DETECT_PIN PC7

else

// // Use the on-board card socket labeled TF_CARD_SOCKET //

define SS_PIN PA4

define SCK_PIN PA5

define MOSI_PIN PA7

define MISO_PIN PA6 // PA6

define SD_DETECT_PIN -1 // Card detect is not connected

endif

All files / lib and used in my config are available at : https://drive.google.com/open?id=1X8TSI6Q8rexqwbTk_WlKb63fYAuQSrKh

Did you find a way to address the 3.3V used for the temp ? (new tables ?)

Thank you for your help/support

Thierry

InnerBushman commented 5 years ago

All files / lib and used in my config are available at : https://drive.google.com/open?id=1X8TSI6Q8rexqwbTk_WlKb63fYAuQSrKh

Please attach the files to your post. After you remove it from your google drive the link will be dead but attachment will remain.

Did you find a way to address the 3.3V used for the temp ? (new tables ?)

What do you mean? Is there some problem with temperature reading?

Vertabreak commented 4 years ago

just to note i did basically get marlin running on the A30 E180 & M201 it needs some work but it does run on the board.

cad435 commented 4 years ago

Different Problem(s) here for a Stock-Rostock 301 (GTM32 Pro VB Mainboard, LCD2004 Controller):

Compiled with files and ini-settings provided from @InnerBushman in latest PIO with ststm32@5.6.0 (BTW: InnerBushman's 'gtm_32_pro_vb.py' script uses the 'mks_robin.ld' Script, wich may or may not be intended, given that he provides a seperate 'gtm_32_pro_vb.ld' script)

I also changed build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags_script.py to build_flags = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py because the first one could not be found and it seemed like it is the right one...

First: with Geetech Bootloader + Marlin FW flashed to 0x08002000 --> Marlin won't start, I'll only get the bootloaders output "JumpToApp0/JumpToApp1"...

I then compiled it normally, removed the "Relocate firmware" Section from 'gtm_32_pro_vb.py' and flashed it to 0x08000000 -->Sucessfull Marlin Boot! I can home the Printer via a M28 command over a Terminal. Screen and button rotation also works, SD-Card initialized (checked again via serial output), BUT as soon as i PRESS the button on the LCD2004 panel Marlin crashes (no LCD updates anymore, no response via Serial)...

And at this point i have no clue on how to approach this...

I tried also flashing it to 0x08000000 via BlackMagicProbe (JTAG/SWD), uploading works, but I get the same "button press" crash.

Tried to debug over PIO with a Blackmagic probe, but it won't ever get out of the "Pre-Debugging" mode and actually attach to the MCU (Blackmagic probe works, I flashed the FW to the board and use it regularily on other STM32 based projects)

Do you guys have any suggestions what could it be?

PS: with stock firmware everything works fine... PPS: I'll keep updating this post as I went trough bringing back to life this machine in case anyone else stumbles across this... Access Sourcecode here: https://github.com/cad435/Marlin/tree/GeeetechRostock301-bugfix2.0.x

UPDATE: I got it to work, Flashed to 0x08000000. It seems that something inside the beeper-Code is faulty... after disabling the beeper code (aka. commenting out) it runs fine.

For others wich may run into this problem: comment (or delete) the "quick_feedback()" call in "src/lcd/ultralcd.cpp" Line 820&827 You may want to disable more code because when thermistors are failing the speaker gets active too, mich may lead to a crash, but I'll have to investigate that further.

UPDATE2: As I got this machine as a gift from someone (e.g. "You can have it, I don't need it, but don't bother me with it"), I do not know if the thermistor is stock. I couldn't get any correct readings with different TempTables or generated TempTables, so I went ahead and did a full manual calibration with a thermometer and some edited gcode, made a new temptable_1001.h. It now gives me accurate readings. Consider this new TempTable if you are using my sourcecode! It may or may not work!

I noticed that although the STM32 has a 12-Bit ADC, somehow only 10-Bits were generated (e.g. max possible value = 1023).

UPDATE3: Turns out beeper works if you undefine (e.g. comment out) #define GTM32_PRO_VB_USE_LCD_BEEPER in pins/stm32/pins_GTM32_PRO_VB.h

Also the LCD freezes when printing and pushing the button (as well as randomly freezes) while printer is still printing fine.

I fixed this after quite some debugging by changing Line 997 in lcd/ultralcd.cpp to if ((should_draw() || drawing_screen)/* && (!bbr2 || bbr2 > max_display_update_time)*/)

my thoughts are that the line above uint16_t bbr2 = planner.block_buffer_runtime() >> 1; may somehow not get a correct value in an Interrupt-context while printing, but that is only a wild guess and I didn't look further...

kevin230 commented 4 years ago

Hello guys, Is it possible to use marlin on my gtm32 mini s (A30)?

Thanks

InnerBushman commented 4 years ago

Hi everyone. I tested the current version 2.0.5.3 and my machine works great. There's only one bug I've noticed so far. If the temperature for any given thermistor is below BED_MINTEMP or HEATER_n_MINTEMP the firmware crashes with a constant beep. The error message is never sent and it no longer takes inputs from neither the encoder/button nor serial line. Did any one of you experienced such thing? Is is a bug related to this board/setup? or is it something that went wrong for Martin in general? Cheers, Bushman

deennoo commented 4 years ago

Hi everyone. I tested the current version 2.0.5.3 and my machine works great. There's only one bug I've noticed so far. If the temperature for any given thermistor is below BED_MINTEMP or HEATER_n_MINTEMP the firmware crashes with a constant beep. The error message is never sent and it no longer takes inputs from neither the encoder/button nor serial line. Did any one of you experienced such thing? Is is a bug related to this board/setup? or is it something that went wrong for Martin in general? Cheers, Bushman

looks like you use a Rostock 301 only or did you try it with other ?

deennoo commented 4 years ago

just to note i did basically get marlin running on the A30 E180 & M201 it needs some work but it does run on the board. https://github.com/Vertabreak/Marlin/tree/bugfix-2.0.x

i'm trying to get marlin on my E180.

looks like you have one (i saw it on your youtube)

i try your work on mine : xyz are ok, but hotend value is wrong (temp around -4°c when room is 20)

i send you a mail, can you help ?

chepo92 commented 4 years ago

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

https://www.instagram.com/p/B_i8UxnjQwQ/?utm_source=ig_web_copy_link

InnerBushman commented 4 years ago

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

chepo92 commented 4 years ago

@InnerBushman the temps are corrected in marlin, my branch https://github.com/chepo92/Marlin/tree/GTM32-2020, you have to add and use thermistor 22 It's pending of PRed to marlin, testers are needed

InnerBushman commented 4 years ago

@chepo92 I have an aftermarket no-name hot-end with an unidentified thermistor. I plotted it's characteristics and it is under 8°C difference on the hot side of the plot and fairly co-linear with type 5. So no worries there, I can mentally adjust for that when setting up the print. What I AM worried about tho is the low temp. alarm crashing the firmware. I tried both, the beeper pin on the main board and the pin on the controller board. No difference, so I'm assuming there's nothing wrong with the beepers as they both DO beep on key press. Something's broken in temperature alarm and i don't know how to track it.

PS: how do you upload the firmware right now? i still use the external tool from ST.

chepo92 commented 4 years ago

@chepo92 I have an aftermarket no-name hot-end with an unidentified thermistor. I plotted it's characteristics and it is under 8°C difference on the hot side of the plot and fairly co-linear with type 5. So no worries there, I can mentally adjust for that when setting up the print. What I AM worried about tho is the low temp. alarm crashing the firmware. I tried both, the beeper pin on the main board and the pin on the controller board. No difference, so I'm assuming there's nothing wrong with the beepers as they both DO beep on key press. Something's broken in temperature alarm and i don't know how to track it.

PS: how do you upload the firmware right now? i still use the external tool from ST.

By default Min temps error triggers with the defined min temp in configuration.h (I think default is 5ºC) when I was debugging and creating the termistor table I disabled thermal runaways protection and defined the min temp as -25 (or any lower than the reported by your printer, mine was -15ºC and room was at 20º )

I still use ST link to upload, no problem with that, because I hate when Arduino / PIO uploads it erases the hex/bin every time (and takes a bunch of time to make checks, just to output the same file), even if there where no changes in code. So I make a copy of the output bin and put it in safe place.

deennoo commented 4 years ago

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

Did you manage to get fan / extruder working ?

I i get a working marlin from Verta but fan and extruder doesn't working

InnerBushman commented 4 years ago

@chepo92 I have an aftermarket no-name hot-end with an unidentified thermistor. I plotted it's characteristics and it is under 8°C difference on the hot side of the plot and fairly co-linear with type 5. So no worries there, I can mentally adjust for that when setting up the print. What I AM worried about tho is the low temp. alarm crashing the firmware. I tried both, the beeper pin on the main board and the pin on the controller board. No difference, so I'm assuming there's nothing wrong with the beepers as they both DO beep on key press. Something's broken in temperature alarm and i don't know how to track it.

PS: how do you upload the firmware right now? i still use the external tool from ST.

chepo92 commented 4 years ago

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

Did you manage to get fan / extruder working ?

I i get a working marlin from Verta but fan and extruder doesn't working

I have the three extruders motor working (even in mixing mode, 1 2 and 3 at same time).

Just tested fans, weird behaviour. I only see in the menu Fan2 and Fan3, when I push to select Fan2, LCD says Fan3, and I can set it, fan spins (but I think not the suposed one), If I click Fan3, LCD says Fan3, and set speed, the same fan as before spins, so there must be an LCD problem added to pin definition problem or something in the midle. I'll bring some gcode and pin debugging enabled to squash some bugs.

deennoo commented 4 years ago

looks like you use a Rostock 301 only or did you try it with other ?

@deennoo Yes, I only tested it with my Delta Rostock 301. I think if it compiles and runs in delta mode, there shouldn't be any problems in Cartesian?

GTM32 Pro VB is currently working in bugfix 2.0 branch (at least for Rostock 301)

@chepo92 I used trunk, not bugfix branch.

Did you manage to get fan / extruder working ? I i get a working marlin from Verta but fan and extruder doesn't working

I have the three extruders motor working (even in mixing mode, 1 2 and 3 at same time).

Just tested fans, weird behaviour. I only see in the menu Fan2 and Fan3, when I push to select Fan2, LCD says Fan3, and I can set it, fan spins (but I think not the suposed one), If I click Fan3, LCD says Fan3, and set speed, the same fan as before spins, so there must be an LCD problem added to pin definition problem or something in the midle. I'll bring some gcode and pin debugging enabled to squash some bugs.

On m'y borad i have 4 fan : 1 fan case plug to fan0 (and fan1 they are drive the same way) 1 under extuder motor 1 on hot end 1 for cooling

Will test later which on Can be drive by Geeetech Fw.

For those who want try marlin and getback to Geeetech Fw :

Put board on boot0

Plug USB and start STM Flash Loader Demonstrator.

Then select : write to file, put a name and .bon ext and choose all memory adresse then next.

It will dump all the board memory and your able to restore it.

Tapchicoma commented 4 years ago

Tried to flash marlin on my E180 using configuration from https://github.com/MarlinFirmware/Configurations/tree/release-2.0.5/config/examples/Geeetech/E180 via:

$ platformio run --target upload -e STM32F103VE_GTM32

So far fans are not working, lcd/sd card also not working, hotend room temperature is reported incorrectly (room ~23C, reported 3C).

I also noticed that according https://github.com/MarlinFirmware/Marlin/blob/015c4e6fbdd28f5c4cb5fc987d4f4ae513b1c13d/Marlin/src/pins/pins.h#L482 I need to select STM32F103RE environment, though then uploaded Marlin will not work.

Did anyone manage to run Marlin on E180?

Tapchicoma commented 4 years ago

Working Klipper config for E180: printer.cfg.zip

Vertabreak commented 3 years ago

marlin is running on my E180/A30/GTM32 pro VD board i have laying around.

Geeetech3D commented 3 years ago

Hi, That's great, you know how to modify the firmware. Just, we wouldn't recommend others modify our printer, including the firmware. So, sorry!😂

Best regards

Vert @.***> 于2021年4月24日周六 上午1:35写道:

marlin is running on my E180 has issues but it runs.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Geeetech3D/Diagram/issues/1#issuecomment-825810782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJSAKUDRNIJ5VPNZERUQI3TKGVU7ANCNFSM4FJFNPJA .

-- Tom.yuan Technical Support B&D TEL: 0755-26584110-801 Do you want to find more fun things about 3d print? You can join our official facebook group http://www.facebook.com/groups/315127105604393/

ldiegos commented 3 years ago

Good morning, Someone kind who can explain the steps to update marlin into the GMT32_mini_s? never mind if is with arduino ide or vscode with platformio.

With vsCode/platformio and marlin 2.0.8.1 for example, after compiling correctly -Upload directly from VsCode with "Auto build marlin" fail. -Upload directly from VsCode with "Autobuild marlin" and jumper on BootOn(board) fail. -Save the .bin to a sd card formatted on fat fail. -Save the .bin to a sd card formatted on fat fail with jumper on BootOn(Board) fail. -Using the flash firmware program from geeetech fail(the program hangs with the .bin)

The usb cable works, because if i use the smartto program to connect to the E180 i can change the parameters.

InnerBushman commented 3 years ago

Hi @ldiegos, I believe what you are looking for is here: https://www.geeetech.com/forum/viewtopic.php?f=20&t=60425#p81311 I'm using the ST Flash demo tool myself to program my printer ;) There's only one catch: you need to know the entry point of your firmware and upload it accordingly. I suggest you try 8002000h like in the tutorial. If that doesn't work, you'll need to figure out your compilation's entry address. Please remember that flashing your firmware anywhere higher than 8002000h WILL overwrite Geeetech's boot-loader code and you won't be able to use factory flashing method until you restore it with ST flash tool. If you have any additional questions, don't hesitate to ask :)

EDIT

I might have jumped the guns. Your board is GMT32_mini_s. I do not know if the procedure is 100% compatible. Please use your best judgment before attempting any of the steps in the tutorial posted above.

ldiegos commented 3 years ago

@InnerBushman thank you so much, yes this is a GMT32_mini_s , i will use your tutorial and if i brick it, don't worry. The fact is that i hate the smartto, so i rather prefer to brick it trying to install marlin than continue with it as is. Again, thank you so much in advance Luis.

peakpwr commented 3 years ago

Good morning, Someone kind who can explain the steps to update marlin into the GMT32_mini_s? never mind if is with arduino ide or vscode with platformio.

With vsCode/platformio and marlin 2.0.8.1 for example, after compiling correctly -Upload directly from VsCode with "Auto build marlin" fail. -Upload directly from VsCode with "Autobuild marlin" and jumper on BootOn(board) fail. -Save the .bin to a sd card formatted on fat fail. -Save the .bin to a sd card formatted on fat fail with jumper on BootOn(Board) fail. -Using the flash firmware program from geeetech fail(the program hangs with the .bin)

The usb cable works, because if i use the smartto program to connect to the E180 i can change the parameters.

Funny I tried flashing Marlin on my A30 with GMT32_mini_s board as well today. For me your described attempts didn't work either. So I thought I should try flashing the firmware generated by platform io with my stlink v2. Well it did flash from platformios interface. But after that nothing worked anymore. I'm not sure to which addresses platform io wrote so I can't tell if the boot loader is gone.

From reading the geeetech forum the bootloader should be located At 8000000 and the firmware At 8002000 for the pro boards. As they seem to use the same stm32 I guess this should work for the mini boards aswell.

could you please backup your current firmware with bootloader so we can compare it?

My next try will be flashing the bootloader and the marlin at the given addresses of the pro board and see if that works.

peakpwr commented 3 years ago

So some news concerning the GTM 32 Mini S Board: Flashing the Marlin 2.0.8.1 at 8000000 works now. I don't know why it didn't yesterday. Marlin boots and the following apears in the Terminal of Octorprint when it's trying to connect:

Changing monitoring state from "Offline" to "Detecting serial connection" Performing autodetection with 1 port/baudrate candidates: /dev/ttyUSB0@115200 Trying port /dev/ttyUSB0, baudrate 115200 Connecting to port /dev/ttyUSB0, baudrate 115200 Handshake attempt #1 with timeout 2.0s Connected to: Serial(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=2.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor Send: N0 M110 N0125 Recv: start Changing monitoring state from "Detecting serial connection" to "Operational" Recv: PowerUp Recv: Marlin 2.0.8.1 Recv: Recv: echo: Last Updated: 2021-05-15 | Author: (none, default config) Send: N0 M110 N0125 Communication timeout while idle, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves. Send: N1 M11539 Communication timeout while idle, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves. Send: N2 M2118 No response from printer after 3 consecutive communication timeouts, considering it dead. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves. Changing monitoring state from "Operational" to "Offline after error" Connection closed, closing down monitor

After 3 connection attempts it closes the connection. Also nothing can be controlled. I think it could be a problem with Octoprint, but pronterface or similar don't show any information either. Maybe the compiled binary includes faults? I used the pin_GTM32_MINI.h and the pin_GTM32_MINI_A30.h. What else could be a problem?

Conclusion:

TheThomasD commented 3 years ago

I had the same problem with my A30T (same board?). Flashing worked, got some output from Marlin, but then connection is lost (Repetier Server). I guess something in the config is not right, but I haven’t found the time to investigate, yet.

peakpwr commented 3 years ago

What config could lead to this reproducible connection loss? I thought die custom configs in the config repos A30 folder should have all settings (except the motor driver) preset?

I feel like we are very close to finding the issue and make the GTM32 Mini work but at the moment I don't have an idea.

Offtopic concerning going back to stock firmware as a quick fix until marlin works for the GTM32 Mini: I managed to flash back the original firmware (adress 8002000) and bootloader (adress 8000000) and update it via the Smartto Upgrador. This works at least but I haven't fully tested the Firmware 1.39.62 during a print.

ldiegos commented 3 years ago

I give up, i threw it to the trash and bought a bigtreetech Skr1.4Turbo with a TFT35 v3 and them are working since the beginning. Not to mention that everything inside the E180 is fully geeetech custom and nothing works as any other standard printers, so i had to redo all the cableling.

Don't waste your time... buy another board.

peakpwr commented 3 years ago

I was close to giving up but I tried it one more time. This time with a freshly compiled version 2.0.9.1 of marlin. I don't know what changed but it works. The connection is stable and I can control X and Z Axis without problems. Only the Y Axis and the extruder are not working. I checked for misconfigured pins in the gtm32 mini a30 config but everything seems to be ok. I even checked if pins on the microcontroller are broken but everything works with a test program, but as soon as marlin is flashed the Step/Dir pins of the stepper driver seem not to work (600mV constantly, no matter if step command is executed or not, by the way I use TMC2008 drivers but should be the same with others.

Now I'm even more confused and motivated. It can't be much but where should I keep on searching. My problem is that the GTM32 Mini is a normal STM32 based mainboard. There is no reason it shouldn't work so I can't accept that. Would be great if we could discuss on this topic and some feedback is given. I'll keep on posting my results as I think a lot of A30 owners would like to use marlin ...

Geeetech3D commented 3 years ago

Hi, I am so sorry, we wouldn't recommend others modify the printer, including the firmware. Actually, I don't know how to do that.

Best regards

peakpwr @.***> 于2021年9月20日周一 上午4:29写道:

I was close to giving up but I tried it one more time. This time with a freshly compiled version 2.0.9.1 of marlin. I don't know what changed but it works. The connection is stable and I can control X and Z Axis without problems. Only the Y Axis and the extruder are not working. I checked for misconfigured pins in the gtm32 mini a30 config but everything seems to be ok. Now I'm even more confused and motivated. It can't be much but where should I keep on searching.

My problem is that the GTM32 Mini is a normal STM32 based mainboard. There is no reason it shouldn't work so I can't accept that. Would be great if we could discuss on this topic and some feedback is given. I'll keep on posting my results as I think a lot of A30 owners would like to use marlin ...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Geeetech3D/Diagram/issues/1#issuecomment-922532440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJJSAKX3MQQ3TWZWZUCPNKLUCZB3JANCNFSM4FJFNPJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Tom.yuan Technical Support B&D TEL: 0755-26584110-801 Do you want to find more fun things about 3d print? You can join our official facebook group http://www.facebook.com/groups/315127105604393/

krabbs commented 3 years ago

I was close to giving up but I tried it one more time. This time with a freshly compiled version 2.0.9.1 of marlin. I don't know what changed but it works. The connection is stable and I can control X and Z Axis without problems. Only the Y Axis and the extruder are not working. I checked for misconfigured pins in the gtm32 mini a30 config but everything seems to be ok. I even checked if pins on the microcontroller are broken but everything works with a test program, but as soon as marlin is flashed the Step/Dir pins of the stepper driver seem not to work (600mV constantly, no matter if step command is executed or not, by the way I use TMC2008 drivers but should be the same with others.

Now I'm even more confused and motivated. It can't be much but where should I keep on searching. My problem is that the GTM32 Mini is a normal STM32 based mainboard. There is no reason it shouldn't work so I can't accept that. Would be great if we could discuss on this topic and some feedback is given. I'll keep on posting my results as I think a lot of A30 owners would like to use marlin ...

Hello,

i am running an A30 with the "GTM32 Pro VD" Board with bugfix tree . i got almost all things to working but i need more testing: -BLtouch is working -Beeper is working -x,y,z and extruder axis is working -SD Card is not working -Serial Connection is limited because of following hotfix for y-axis -fans are working but are buged (maybe a hardware problem of my a30)

According the y-Axis i run in the same problem but i could resolve it:

MarlinCore.cpp needs one modification at the end of the setup(). Add a line with: Serial.end();

I dont think its a good idea to do this here but its working. The point is that my boad is using PA12 for some serial stuff. i dont know why. But this pin is in use for the y-axis

EDIT:

And yes i had the same problem with the extruder. There are couple of things wrong in the pinmapping for my board. the EXTRUDER E0 E1 E2 are party mixed up. And the z_min_pin and z_max_pin was swapped for me too:

here is my mapping for my board GTM32 Pro VD:


#pragma once

#include "env_validate.h"

#ifndef BOARD_INFO_NAME
  #define BOARD_INFO_NAME    "GTM32 Pro VB"
#endif
#define DEFAULT_MACHINE_NAME "STM32F103VET6"

#define BOARD_NO_NATIVE_USB

#define DISABLE_DEBUG

//
// It is required to disable JTAG function because its pins are
// used as GPIO to drive the Y axis stepper.
// DO NOT ENABLE!
//
#define DISABLE_JTAG

//
// If you don't need the SWDIO functionality (any more), you may
// disable SWD here to regain PA13/PA14 pins for other use.
//
#define DISABLE_JTAGSWD

// Ignore temp readings during development.
#define BOGUS_TEMPERATURE_GRACE_PERIOD    2000

// Enable EEPROM Emulation for this board as it doesn't have EEPROM
#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION)
  #define FLASH_EEPROM_EMULATION
  #define MARLIN_EEPROM_SIZE              0x1000  // 4KB
#endif

//
// Limit Switches
//
#define X_MIN_PIN                           PE5   // ENDSTOPS 15,17
#define X_MAX_PIN                           PE4   // ENDSTOPS 16,18
#define Y_MIN_PIN                           PE3   // ENDSTOPS 9,11
#define Y_MAX_PIN                           PE2   // ENDSTOPS 10,12
#define Z_MIN_PIN                           PE0   // ENDSTOPS 3,5
#define Z_MAX_PIN                           PE1   // ENDSTOPS 4,6                          

//
// Steppers
//
#define X_STEP_PIN                          PC6
#define X_DIR_PIN                           PD13
#define X_ENABLE_PIN                        PA8

#define Y_STEP_PIN                          PA12
#define Y_DIR_PIN                           PA11
#define Y_ENABLE_PIN                        PA15

#define Z_STEP_PIN                          PD6
#define Z_DIR_PIN                           PD3
#define Z_ENABLE_PIN                        PB3

// Extruder stepper pins
// NOTE: Numbering here is made according to EXT connector numbers,
//       the FANx_PWM line numbering in the schematics is reverse.
//       That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
//       stick that drives the EXT0 output on the board.
//
#define Z2_STEP_PIN                         PC14
#define Z2_DIR_PIN                          PC13
#define Z2_ENABLE_PIN                       PC15

// #define E0_STEP_PIN                         PA0
// #define E0_DIR_PIN                          PB6
// #define E0_ENABLE_PIN                       PA1

#define E0_STEP_PIN                         PB2
#define E0_DIR_PIN                          PB11
#define E0_ENABLE_PIN                       PC4

//
// Heaters / Fans
//
#define SERVO0_PIN                          PA0

#define HEATER_0_PIN                        PB0   // EXT0 port
// #define HEATER_1_PIN                        PB5   // EXT1 port
// #define HEATER_2_PIN                        PB4   // EXT2 port
#define HEATER_BED_PIN                      PB1   // CON2X3 hotbed port

//
// These are FAN PWM pins on EXT0..EXT2 connectors.
//
//#define FAN_PIN                           PB9   // EXT0 port
#define FAN1_PIN                            PB8   // EXT1 port
#define FAN2_PIN                            PB7   // EXT2 port

#ifndef E0_AUTO_FAN_PIN
  #define E0_AUTO_FAN_PIN                   PB9   // EXT0 port, used as main extruder fan
#endif

//
// Temperature Sensors
//
#define TEMP_0_PIN                          PC2   // EXT0 port
#define TEMP_1_PIN                          PC1   // EXT1 port
#define TEMP_2_PIN                          PC0   // EXT2 port
#define TEMP_BED_PIN                        PC3   // CON2X3 hotbed port

//
// Misc. Functions
//
#define LED_PWM                             PD12  // External LED, pin 2 on LED labeled connector

//
// LCD / Controller
//
#if HAS_WIRED_LCD

  #if IS_RRD_SC
    //
    // LCD display on J2 FFC40
    // Geeetech's LCD2004A Control Panel is very much like
    // RepRapDiscount Smart Controller, but adds an FFC40 connector
    //
    #define LCD_PINS_RS                     PE6   // CS chip select /SS chip slave select
    #define LCD_PINS_ENABLE                 PE14  // SID (MOSI)
    #define LCD_PINS_D4                     PD8   // SCK (CLK) clock
    #define LCD_PINS_D5                     PD9
    #define LCD_PINS_D6                     PD10
    #define LCD_PINS_D7                     PE15

  #else
    //
    // Serial LCDs can be implemented in ExtUI
    //
    //#define LCD_UART_TX                   PD8
    //#define LCD_UART_RX                   PD9
  #endif

  // Alter timing for graphical display
  #if ENABLED(U8GLIB_ST7920)
    #define BOARD_ST7920_DELAY_1   DELAY_NS( 96)
    #define BOARD_ST7920_DELAY_2   DELAY_NS( 48)
    #define BOARD_ST7920_DELAY_3   DELAY_NS(715)
  #endif

#endif // HAS_WIRED_LCD

#if IS_RRD_SC
  //
  // Geeetech's LCD2004A Control Panel is very much like
  // RepRapDiscount Smart Controller, but adds an FFC40 connector
  // connected with a flat wire to J2 connector on the board.
  //
  #define BTN_EN1                           PE8
  #define BTN_EN2                           PE9
  #define BTN_ENC                           PE13

  // #define GTM32_PRO_VB_USE_LCD_BEEPER
  #define GTM32_PRO_VB_USE_EXT_SDCARD
#endif

//
// Beeper
//
#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
  // This is pin 32 on J2 FFC40 and pin, goes to the beeper
  // on Geeetech's version of RepRapDiscount Smart Controller
  // (e.g. on Rostock 301)
  #define BEEPER_PIN                        PE12
#else
  // This is the beeper on the board itself
  #define BEEPER_PIN                        PB10
#endif

/**
 * The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
 *
 * The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
 * connector, which usually go to the SD Card slot on the Geeetech version of the
 * RepRapDiscount Smart Controller. Both connectors have the card detect signal.
 *
 * The on-board SD card and the external card (on either SD_CARD or J2) are two
 * separate devices and can work simultaneously. Unfortunately, Marlin only supports
 * a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
 */
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
  //
  // SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
  //

// #define SS_PIN PB12 // PC<<<11
// #define SCK_PIN PB13 // PC12 // PC1
// #define MOSI_PIN PB15 // PD2 // PD2
// #define MISO_PIN PB14 // PC8
// #define SD_DETECT_PIN PC7

  #define SD_SS_PIN                         PC11
  #define SD_SCK_PIN                        PC12
  #define SD_MOSI_PIN                       PD2
  #define SD_MISO_PIN                       PC8
  #define SD_DETECT_PIN                     PC7
#else
  //
  // Use the on-board card socket labeled TF_CARD_SOCKET
  //
  #define SD_SS_PIN                         PA4
  #define SD_SCK_PIN                        PA5
  #define SD_MOSI_PIN                       PA7
  #define SD_MISO_PIN                       PA6
  #define SD_DETECT_PIN                     -1    // Card detect is not connected
#endif

#define SDSS                           SD_SS_PIN

//
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
// Must define WIFISUPPORT in Configuration.h for the printer.
//
#define ESP_WIFI_MODULE_COM                    2
#define ESP_WIFI_MODULE_BAUDRATE          115200
#define ESP_WIFI_MODULE_RESET_PIN           -1
peakpwr commented 3 years ago

That sounds very interesting. I will try the hotfix and will check the pin mapping again. I think we can make this work :)

krabbs commented 3 years ago

That sounds very interesting. I will try the hotfix and will check the pin mapping again. I think we can make this work :)

In Addition: i think i have a misstake in my mapping according the names of the FAN (or FAN0)

EDIT:1 I have some wiring problems (loose contact). I think my setup is working from the software side EDIT:2 Got it working now. The crashes had nothing to do with the software. Last thing missing now is the sdcard

peakpwr commented 3 years ago

Is your connection to octoprint stable? I think this would be enough as printing would be fully possible at that stage.

krabbs commented 3 years ago

Is your connection to octoprint stable? I think this would be enough as printing would be fully possible at that stage.

I could not test very much yet but yes. it looks very very good to me. i forked marlin into an new branch (if you interested for more informations) Marlin GTM32ProVD

furthermore i have switched to Marlin 2.0.9.2

peakpwr commented 3 years ago

It works on my GTM32 Mini as well. Only the fans don't spin ... I need to recheck the pins on that. But Y Axis and extruder are working fine after inverting the directions. Heating, limit switches work too.

So only fans left if I didn't miss something. Octoprint is also stable. No problems so far.

krabbs commented 3 years ago

It works on my GTM32 Mini as well. Only the fans don't spin ... I need to recheck the pins on that. But Y Axis and extruder are working fine after inverting the directions. Heating, limit switches work too.

So only fans left if I didn't miss something. Octoprint is also stable. No problems so far.

And maybe have a look at the labeling in the mapping. im not sure if its FAN or FAN0. Furthermore and i dont know for what E0_AUTO_FAN PIN ist for. (i am pretty new to marlin settings)

peakpwr commented 3 years ago

Ok fans are working now (for GTM32 Mini S Mainboard).

What I changed:

This way I can be sure the heat break fan is always running (above 50degree) and is not dependent on a gcode config and the part blower can be used if needed.

TheThomasD commented 2 years ago

@krabbs (and sorry for being sligthly offtopic, although the question is about a GTM32 board and Marlin 2.x)

I'm currently working on a GTM32_103_V1 board in my Geeetech A30T to make it work with Marlin. I have a good starting point now (e0-2, x, y, dual-z, endstops, filament sensors, heaters, temp sensors, SD card all running good; display is on my list). I had a similar problem that you had with your Y axis (using pin PA12) but in my case the pin is used for the X axis. Did you overcome the issue that you had to put the "Serial.end()" command in the MarlinCore.cpp#setup() method? If so, how did you manage to do so? Appreciate your help!

krabbs commented 2 years ago

Unfortunately, I haven't even made progress and I don't know where to look for the mistake. I am using still this stupid work around :-(