BV HiZ: fix self-test for unreadable ID CODE

This commit is contained in:
King Kévin 2018-02-13 16:10:31 +01:00
parent a0b5e2059f
commit 400df7c392
1 changed files with 2 additions and 2 deletions

View File

@ -83,8 +83,8 @@ static bool busvoodoo_hiz_test_self(void)
// 0x414: high-density, 256-512 kB flash
// 0x430: XL-density, 768-1024 kB flash
// 0x418: connectivity
if (0==(DBGMCU_IDCODE&DBGMCU_IDCODE_DEV_ID_MASK)) {
printf("device identifier not set: this is probably a defective micro-controller\n");
if (0==(DBGMCU_IDCODE&DBGMCU_IDCODE_DEV_ID_MASK)) { // can't read IDCODE for verification
// this is a known issue document in STM32F10xxC/D/E Errata sheet, without workaround
} else if (0x414!=(DBGMCU_IDCODE&DBGMCU_IDCODE_DEV_ID_MASK)) {
printf("this (DEV_ID=%03x) is not a high-density device: a wrong micro-controller might have been used\n", (DBGMCU_IDCODE&DBGMCU_IDCODE_DEV_ID_MASK));
}