DBGMCU->IDCODE

This commit is contained in:
rusefillc 2021-01-14 23:19:54 -05:00
parent cb3a4c9742
commit c6528313fc
1 changed files with 4 additions and 1 deletions

View File

@ -18,7 +18,10 @@ static uint8_t bootloaderVirtualPageBuffer[BOOTLOADER_SIZE];
// needed by DFU protocol (DFU_DEVICE_ID_CMD)
static uint32_t getMcuRevision() {
return DBGMCU->IDCODE & MCU_REVISION_MASK; // =0x413 for F407, =0x434 for F469.
// =0x413 for F407
// =0x419 for F42xxx and F43xxx
// =0x434 for F469
return DBGMCU->IDCODE & MCU_REVISION_MASK;
}
static bool getByte(uint8_t *b) {