Welcome! Log In Create A New Profile

Advanced

MKS Robin e3d with MKS_MINI_12864

Posted by beigenmann 
MKS Robin e3d with MKS_MINI_12864
December 05, 2021 01:24AM
Since I upgrade my e3d from 2.0.7.2 to 2.0.9.2 my LCD 12864 stops my Firmware from running. When I uncomment MKS_MINI_12864 it works.
I see aswell a large change in memory footprint Flash: [======= ] 65.1% (used 170668 bytes from 262144 bytes) compair to Flash: [========= ] 87.9% (used 230380 bytes from 262144 bytes)
I checkt the pinout that seems to be Ok
I have notice that 2.0.7.2 uses FreeRTOS
Does anyone have a clue
When I remove in ./ini/stm32f1.ini DDEFAULT_SPI it work but I have no idee what i am doing.

[env:mks_robin_e3]
platform = ${common_stm32.platform}
extends = common_STM32F103RC_variant
board_build.encrypt = Robin_e3.bin
board_build.offset = 0x5000
board_upload.offset_address = 0x08005000
build_flags = ${common_STM32F103RC_variant.build_flags}
-DTIMER_SERVO=TIM5 #-DDEFAULT_SPI=3
build_unflags = ${common_STM32F103RC_variant.build_unflags}
-DUSBCON -DUSBD_USE_CDC
monitor_speed = 115200
debug_tool = stlink

in

Edited 1 time(s). Last edit at 12/05/2021 03:30AM by beigenmann.
Re: MKS Robin e3d with MKS_MINI_12864
December 05, 2021 04:36AM
becase hardware SPI uses these pins

// SPI Definitions
#if DEFAULT_SPI == 3
  #define PIN_SPI_SS            PA15
  #define PIN_SPI_MOSI          PB3
  #define PIN_SPI_MISO          PB4
  #define PIN_SPI_SCK           PB5

But your LCD is expecting these SPI pins

#if ENABLED(MKS_MINI_12864)
    #define DOGLCD_A0                EXP1_04_PIN      #define EXP1_04_PIN                         PC4
    #define DOGLCD_CS                EXP1_05_PIN      #define EXP1_05_PIN                         PA7
    #define DOGLCD_SCK               EXP2_09_PIN      #define EXP2_09_PIN                         PB13
    #define DOGLCD_MOSI              EXP2_05_PIN      #define EXP2_05_PIN                         PB15

This cannot be done using hardwae SPI

Try adding these after #if ENABLED(MKS_MINI_12864) in Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h to force marlin to to use software SPI with your LCD
#define FORCE_SOFT_SPI
#define SOFTWARE_SPI

Edited 1 time(s). Last edit at 12/05/2021 04:37AM by Dust.
Re: MKS Robin e3d with MKS_MINI_12864
December 06, 2021 08:30AM
Let me sum it up again. The darkes of all darkes art. When I comment out #-DDEFAULT_SPI=3 every things works fine except the bootscreen is not showing on startup. When I revert the DDEFAULT_SPI=3 change and add the #define FORCE_SOFT_SPI #define SOFTWARE_SPI part it seams to work aswell but this time with the bootscreen. SD Card Reader is not working but this might have an other reason.

I am pondering what I am doing because it makes no sence to me. Any way thanks alot
Sorry, only registered users may post in this forum.

Click here to login