Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ender 3 v2 with BTT SKR Mini E3 V2 #19858

Closed
Stalkeros000 opened this issue Oct 18, 2020 · 11 comments
Closed

Ender 3 v2 with BTT SKR Mini E3 V2 #19858

Stalkeros000 opened this issue Oct 18, 2020 · 11 comments

Comments

@Stalkeros000
Copy link

Hi all. I am trying to connect the board to this printer, used different configs for Marlin (Bigtreetech and Marlin), but everywhere I run into a problem.
If I specify board "default_envs = STM32F103RC" in the file platformio.ini (I also tried boards STM32F103RC_btt; STM32F103RC_BTT_512K), and in the file Configuration.h specify:
#ifndef MOTHERBOARD
define MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V2_0,

then an error occurs during compilation:

*** [.pio\build\STM32F103RC_btt\src\src\lcd\dwin\e3v2\dwin.cpp.o] Error 1
*** [.pio\build\STM32F103RC_btt\src\src\lcd\dwin\e3v2\rotary_encoder.cpp.o] Error 1

123
https://ibb.co/ydSn2Hx
Please give advice. Thanks.

Log Output
. . .
Marlin\src\lcd\dwin\e3v2\dwin.cpp:2263:5: error: 'buzzer' was not declared in this scope
     buzzer.tone(100, 659);
     ^~~~~~
Marlin\src\lcd\dwin\e3v2\dwin.cpp:2263:5: note: suggested alternative: 'bzero'
     buzzer.tone(100, 659);
     ^~~~~~
     bzero
Marlin\src\lcd\dwin\e3v2\dwin.cpp:2268:5: error: 'buzzer' was not declared in this scope
     buzzer.tone(40, 440);
     ^~~~~~
Marlin\src\lcd\dwin\e3v2\dwin.cpp:2268:5: note: suggested alternative: 'bzero'
     buzzer.tone(40, 440);
     ^~~~~~
     bzero
Compiling .pio\build\STM32F103RC_btt\src\src\lcd\fontutils.cpp.o
In file included from Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/./STM32F1/HAL.h:36:0,
                 from Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/HAL.h:26,
                 from Marlin\src\lcd\dwin\e3v2\../../../inc/MarlinConfig.h:31,
                 from Marlin\src\lcd\dwin\e3v2\rotary_encoder.h:32,
                 from Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp:35:
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp: In function 'void Encoder_tick()':
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp:50:9: error: 'BEEPER_PIN' was not declared in this scope
   WRITE(BEEPER_PIN, 1);
         ^
Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/./STM32F1/fastio.h:33:42: note: in definition of macro 'WRITE'
 #define WRITE(IO,V)             (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
                                          ^~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp:50:9: note: suggested alternative: 'TEMP_7_PIN'
   WRITE(BEEPER_PIN, 1);
         ^
Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/./STM32F1/fastio.h:33:42: note: in definition of macro 'WRITE'
 #define WRITE(IO,V)             (PIN_MAP[IO].gpio_device->regs->BSRR = (1U << PIN_MAP[IO].gpio_bit) << ((V) ? 0 : 16))
                                          ^~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp: In function 'ENCODER_DiffState Encoder_ReceiveAnalyze()':
Marlin\src\lcd\dwin\e3v2\rotary_encoder.h:44:34: error: 'BTN_EN1' was not declared in this scope
 #define BUTTON_PRESSED(BN) !READ(BTN_## BN)
                                  ^
Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/./STM32F1/fastio.h:32:42: note: in definition of macro 'READ'
 #define READ(IO)                (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
                                          ^~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp:79:7: note: in expansion of macro 'BUTTON_PRESSED'
   if (BUTTON_PRESSED(EN1)) newbutton |= 0x01;
       ^~~~~~~~~~~~~~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.h:44:34: error: 'BTN_EN2' was not declared in this scope
 #define BUTTON_PRESSED(BN) !READ(BTN_## BN)
                                  ^
Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/./STM32F1/fastio.h:32:42: note: in definition of macro 'READ'
 #define READ(IO)                (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
                                          ^~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp:80:7: note: in expansion of macro 'BUTTON_PRESSED'
   if (BUTTON_PRESSED(EN2)) newbutton |= 0x02;
       ^~~~~~~~~~~~~~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.h:44:34: error: 'BTN_ENC' was not declared in this scope
 #define BUTTON_PRESSED(BN) !READ(BTN_## BN)
                                  ^
Marlin\src\lcd\dwin\e3v2\../../../inc/../HAL/./STM32F1/fastio.h:32:42: note: in definition of macro 'READ'
 #define READ(IO)                (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
                                          ^~
Marlin\src\lcd\dwin\e3v2\rotary_encoder.cpp:81:7: note: in expansion of macro 'BUTTON_PRESSED'
   if (BUTTON_PRESSED(ENC)) {
       ^~~~~~~~~~~~~~
*** [.pio\build\STM32F103RC_btt\src\src\lcd\dwin\e3v2\dwin.cpp.o] Error 1
*** [.pio\build\STM32F103RC_btt\src\src\lcd\dwin\e3v2\rotary_encoder.cpp.o] Error 1
======================================================= [FAILED] Took 88.27 seconds =======================================================

Environment      Status    Duration
---------------  --------  ------------
STM32F103RC_btt  FAILED    00:01:28.271
================================================== 1 failed, 0 succeeded in 00:01:28.271 ==================================================
The terminal process "C:\Users\Stalker\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.
@Stalkeros000
Copy link
Author

HIDE or SPOILER not working, sorry, its my first message.

@thisiskeithb
Copy link
Member

The Ender-3 V2's LCD is not supported on other boards at this time.

@jernejp21
Copy link

The Ender-3 V2's LCD is not supported on other boards at this time.

Yes it is. You have to modify LCD connection yourself and add a bit of code. See #424.

See this issue where I have explained what code you have to add to pins_BTT_SKR_MINI_E3_common.h to define all the pins for display, like BEEPER_PIN. That's why you get compiler errors. You didn't define BEEPER_PIN.

@thisiskeithb
Copy link
Member

Most hardware can be compatible when modded or code is added. I just said it’s not supported on other boards at this time.

...until code is added

The Ender-3 V2's LCD is not supported on other boards at this time.

@thinkyhead
Copy link
Member

We shall continue to work on the DWIN LCD for Ender 3 V2 as time allows. We expect to have the full menu system implemented on this display Real Soon Now.

@thinkyhead thinkyhead transferred this issue from MarlinFirmware/Configurations Oct 23, 2020
@jernejp21
Copy link

@thinkyhead I am using this configuration on my printer. I have changed some code in pins_BTT_SKR_MINI_E3_common.h to compensate for different pinout. Will you except update if I make a pull request that only adds code for DWIN display and different pinout? User will have to make an adapter or new ribbon cable.

@sjasonsmith
Copy link
Contributor

@thinkyhead I am using this configuration on my printer. I have changed some code in pins_BTT_SKR_MINI_E3_common.h to compensate for different pinout. Will you except update if I make a pull request that only adds code for DWIN display and different pinout? User will have to make an adapter or new ribbon cable.

Personally, I do not think that displays should be added to pins files if they cannot be used without custom cabling. Can you not implement this purely through pin mapping? I assume you don't have serial pins where you need them?

@sjasonsmith
Copy link
Contributor

I suppose E3 V2 displays on E3-specific boards is kind of a special case. Maybe add the code, but comment it out and include an #error? Comments nearby provide a description of the hacks needed to make it work?

@jernejp21
Copy link

TX, RX and reset pins are on different positions. Serial communication can be done in SW, but you cannot disable reset pin on STM32 like you can on AVRs.

@sjasonsmith
Copy link
Contributor

Serial communication can be done in SW

SoftwareSerial is inadequate to control an LCD or to print over. It needs real serial pins.

@github-actions
Copy link

github-actions bot commented Jan 3, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants