1 year, 3 months ago.

No ack from bootloader after sending 0x7F over USART (L476RG)

I'm trying to access the bootloader on my Nucleo L476RG from an Nucleo L496ZG.

I have a DigitalOut on the master board attached to the BOOT0 and NRST pins on the slave. I set BOOT0 high and assert NRST low for a brief moment. Then I use a Serial instance on USART2 slave board and send a 0x7F to it. Nothing seems to happen and I do not receive the 0x79 ACK from the bootloader. What am I doing wrong here?

Here's the relevant code:

DigitalOut extBoot0(D7);
DigitalOut extBoot1(D6);
DigitalOut extReset(D5);

Serial usart(/* tx, rx */ D1, D0);

uint8_t rxBuffer[1];
event_callback_t serialEventCb;

void serialCb(int events) {
    printf("something happened!\n");

void initBootloader() {
    wait(5); // just in case?
    // Once initialized the USART1 configuration is: 8-bits, even parity and 1 Stop bit
    usart.format(8, SerialBase::Even, 1);
    uint8_t buffer[1024];

    // write 0x7F
    buffer[0] = 0x7F;
    usart.write(buffer, 1, 0, 0);
    printf("sending cmd\n");
    // should ack 0x79
    usart.read(rxBuffer, 1, serialEventCb, SERIAL_EVENT_RX_ALL, 0x79);

Be the first to answer this question.