SaidAlvarado / Key-B-hardware

ZMK based wireless half keyboard
MIT License
0 stars 0 forks source link

Modify Adafruit UF2 bootloader #9

Open SaidAlvarado opened 10 months ago

SaidAlvarado commented 10 months ago

And use it to be able to flash ZMK to your keyboard via USB.

This project: https://github.com/adafruit/Adafruit_nRF52_Bootloader or ~this project: https://github.com/adafruit/tinyuf2~

SaidAlvarado commented 10 months ago

By complete, it seems that my schematic is compatible with the port made for the nice!nano pcb

Here is the nice!nano port

In the pin definition file it request that

/*------------------------------------------------------------------*/
/* BUTTON
 *------------------------------------------------------------------*/
#define BUTTONS_NUMBER    2  // none connected at all
#define BUTTON_1          _PINNUM(0, 18)  // unusable: RESET
#define BUTTON_2          _PINNUM(0, 19)  // no connection
#define BUTTON_PULL       NRF_GPIO_PIN_PULLUP

This matches my PCB, therefore I can most likely just use the binary precompiled for the nice!nano in the releases

SaidAlvarado commented 10 months ago

If I want the boot loader to have access the LED I need to change the pin file definition.

/*------------------------------------------------------------------*/
/* LED
 *------------------------------------------------------------------*/
#define LEDS_NUMBER       1
#define LED_PRIMARY_PIN   _PINNUM(0, 15) // Blue
#define LED_STATE_ON      1

Currently it's set to P0.15, this pin is disconnected. It would have to be changed to P0.02, that's the green LED on the board.