Skip to content

LERDGE K - Pin mappings in platform IO. (Using LergePlusLcd as starting point) #13

@cgapeart

Description

@cgapeart

Description

Lergde K build i2c EEProm not working

I think I found the source of the Lerdge K eeprom issue, but my attempt at fixing it didn't work.
According to the Lerdge K pdf published on the Facebook group, SDA should be PG12 and PG13
The variant.h available for a lerdge board (Lerdge X) puts them at

Steps to Reproduce

  1. Build Lerdge K build based on the LerdgePlusLCD branch
  2. Monitor the serial port on boot
  3. Watch for EEPROM read/write errors

Expected behavior:
On the first run, the I2C EEPROM should be initialized, and defaults stored. Following runs should be able to load/save the EEPROM settings

Actual behavior:

echo:start
External Reset
Marlin bugfix-2.0.x

echo: Last Updated: 2020-07-03 | Author: (Colin Peart, H0tstuff Core XY.)
echo:Compiled: Aug 15 2020
echo: Free Memory: 9211 PlannerBufferBytes: 1408
echo:EEPROM version mismatch (EEPROM=? Marlin=V81)
echo:Hardcoded Default Settings Loaded
echo:Error writing to EEPROM!
echo:Error writing to EEPROM!
...
echo:Error writing to EEPROM!
echo:Settings Stored (2 bytes; crc 0)
Error:EEPROM datasize error.
echo:EEPROM Initialized
echo:Error writing to EEPROM!
echo:Error writing to EEPROM!

Additional Information

Marlin-cgap-config-BR.zip

Assuming the lerdge K schematic is correct, then part one of the problem is setting up a seperate variant file with the correct pin mapping. As best I can tell, the variant.h file must be pulled in with platform io.

I notice that on the lerdge K schematic, there are pin numbers as well - Are those supposed to map to the same pin numbers in the variant.h? If so, PG12 and PG13 don't match. My best guess is that is not the case -- the pin numbers in the platform io variant.h are likely offsets used to find which bit(s) in the various GPIO control and access registers to use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions