BOOT_FLASH attached to a pin?

It is connected to PORTG pin3, accessible via libdaisy as dsy_gpio_pin boot_pin = {DSY_GPIOG, 3};

You should be able to pull that pin high in software, and then do a software reset. The cap in the schematic is there to hold the voltage high during that reset so that it will boot into the bootloader.

pseudocode:

void RebootToBootloader()
{
    // Initialize Boot Pin
    dsy_gpio_pin bootpin = {DSY_GPIOG, 3};
    dsy_gpio pin;
    pin.mode = DSY_GPIO_MODE_OUTPUT_PP;
    pin.pin = bootpin;
    dsy_gpio_init(&pin);

    // Pull Pin HIGH
    dsy_gpio_write(&pin, 1);
    // Software Reset
    NVIC_SystemReset();
}

The NVIC_SystemReset comes from the CMSIS libraries not from libdaisy, but we’ll add the above function to the libdaisy library at some point as well.

3 Likes