makerbase-mks / MKS-SGEN_L-V2

MKS SGEN_L V2.0 is powerful 32-bit 3D printer control board. The CPU is LPC1769 120MHZ, SGEN_L V2 hardware Integrated 4KB EEPROM, 5AXIS and dual Z interface, has 2 way FANs and Dc12/24V out interface, support TMC UART and SPI mode...
https://www.aliexpress.com/item/4001283346331.html?spm=a2g0o.store_home.slider_165457030.0
GNU General Public License v3.0
70 stars 28 forks source link

No respondes to M500, M501 and M502 #52

Closed Haschi0 closed 3 years ago

Haschi0 commented 3 years ago

Hi guys,

This is my first ever post on Github and I hope I'm reasonably correct here. To be polite, I would like to introduce myself briefly. I live in Germany and with my early 50s I certainly no longer belong to the classic clientele of 3D printer operators, I think. ;-) My printer is a JG Aurora A5, about 3 years old, with various modifications. I am an electronics engineer.

I recently bought a new MKS SGEN L V2.0 and built a firmware with Marlin bugfix-2.0.x and PlatformIO. I have copied the settings line by line from my previous configuration.h and configuartion_adv.h from Marlin 1.1.8. worked on a MKS GEN L 1.0 For now, I have left the new settings in their default settings.

I have also added the:

define EEPROM_SETTINGS // Persistent storage with M500 and M501

//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!

define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.

When I try to perform mesh bed leveling with G29 S1, it appears to work. However, when I try to save the data to the EEPROM with M500, I get no response. (xxx bytes written, CRC xxxx) and when I query the data with G29 S0, I get the error message: Failed to enable Bed Leveling. The same with M420.

Since I could not save the leveling data with M500 before, I tried an M502 reset with M500 save. Both failed to return a response, but an M503 generates a printout of all values (my compiled base values).

Does anyone have an idea for me where to look for. Auntie Google couldn't really help me so far.

Thank you very much for your efforts.

mks-viva commented 3 years ago

Hi! Can you provide your firmware to me?

Haschi0 commented 3 years ago

What exactly you would like to have? The two configuration files or the whole source or really the firmware.bin?

Haschi0 commented 3 years ago

I think you want to test my firmware on another HW. Okay, here is my firmware.bin as a zip file and also my two configuration files

firmware.zip Marlin Configuration.zip

mks-viva commented 3 years ago

I think you need enable "EEPROM_AUTO_INIT", like this image

Haschi0 commented 3 years ago

I have activated the "EEPROM_AUTO_INIT" but I still don't get a response on M500.

So I looked at Marlin's source code and found something that might explain why I'm not getting a response:

In short, I would have to enable the "DEBUG_LEVELING_FEATURE" in Confoguration.cpp to get a confirmation response on M500.

After a test by an M603 with setting of length filament load and unload and a restart of the board, I see after M503 that the changed values were stored in the EEPROM. Without having to call the M500 explicitly. It seems to me that the differences between Marlin 1.x and 2.x are greater than I've expected.

Many thanks for your help, MKS-viva. Now I just have to find out why the Mesh Bed Leveling does not work. But that is another story.