this post was submitted on 12 Nov 2023
9 points (100.0% liked)

Mechanical Keyboards

8705 readers
13 users here now

Are you addicted to the clicking sounds of your beautiful and impressive mechanical keyboard?
If so, this community is for you!

Here you can discuss everything about mechanical keyboards (and only mechanical keyboards).

Banner by Jay Zhang on Unsplash

founded 4 years ago
 

Hi all,

I'm hoping for some troubleshooting tips. I have a self-build split keyboard using Blackpills.

If I flash either side with 'SPLIT_KEYBOARD = no' in my rules.mk, then both sides work fine (but both working as the left side). If however I set 'SPLIT_KEYBOARD = yes', then both sides stop working.

It's driving me insane!

These are the relevant details of rules.mk:

MCU = STM32F401
BOOTLOADER = stm32-dfu
SPLIT_KEYBOARD = yes
SERIAL_DRIVER = usart

And config.h:

#pragma once
#define HAL_USE_SERIAL TRUE
#define SOFT_SERIAL_PIN A12
#define MASTER_LEFT
#define MATRIX_ROWS 6
#define MATRIX_COLS 6
#define SERIAL_USART_DRIVER SD1
#define SERIAL_USART_TX_PAL_MODE 7

And halconf.h:

#pragma once
#define SERIAL_USB_BUFFERS_SIZE 256
#include_next 

And mcuconf.h:

#pragma once
#include_next 
#undef STM32_SERIAL_USE_USART1
#define STM32_SERIAL_USE_USART1 TRUE

Please help! I've been at this for two days.

top 6 comments
sorted by: hot top controversial new old
[–] idaida87@lemmy.world 1 points 10 months ago (1 children)

Never worked with keyboard firmware but done my share of editing config files before maybe you should remove the # In front of define left / right.

[–] nydas@lemmy.world 3 points 10 months ago* (last edited 10 months ago) (1 children)

Are you referring to the #define MASTER_LEFT?

This is just defining whether the USB is plugged into the left board or right board.

All defines start with a hash as standard. It’s not commenting the line out. For that, you’d use //.

[–] idaida87@lemmy.world 2 points 10 months ago (1 children)

Wasted your time there, didn't mean to. Noticed this in the QMK docs Some controllers (e.g. Blackpill with DFU compatible bootloader) will need to be flashed with handedness bootloader parameter every time because it is not retained between flashes. I understand that you define it by MASTER_LEFT because you have connected the USB on the left half, and that "notice" text is relevant to another way of defining the handedness. But maybe it's a specific Blackpill thing.

[–] nydas@lemmy.world 2 points 10 months ago

Ah, thank you. I’ll have a go at that then.

[–] Nibodhika@lemmy.world 1 points 10 months ago

I have a crkbd but never heard of Blackpill, is that one of the ones that's already defined in qmk? If not you need to create the mapping from layout to pins, I have no idea how that is done though.

If it's defined have you flashed both halves? Before using it? I imagine so otherwise the right side wouldn't work at all, but just in case.

At least for crkbd the keymap is defined as if it was a single thing, so you don't need to specify split keyboard, the mapping of pins to keys should take care of that, but the crkbd is always split so that might be the reason you need to define that in your keyboard.

I know it's a bit inconvenient, but have you tried setting it to not split and flash the right hand size with a MASTER_RIGHT config defined?

[–] infinitevalence@discuss.online 1 points 10 months ago

flash just the right side with YES?