stm32f7/h7: Use the DPv2 provided idcode for MCU identification.
This commit is contained in:
parent
525b90d4e5
commit
8575d3e7a6
|
@ -185,7 +185,12 @@ char *stm32f4_get_chip_name(uint32_t idcode)
|
|||
|
||||
bool stm32f4_probe(target *t)
|
||||
{
|
||||
uint32_t idcode = target_mem_read32(t, DBGMCU_IDCODE) & 0xFFF;
|
||||
ADIv5_AP_t *ap = cortexm_ap(t);
|
||||
uint32_t idcode;
|
||||
|
||||
idcode = (ap->dp->targetid >> 16) & 0xfff;
|
||||
if (!idcode)
|
||||
idcode = target_mem_read32(t, DBGMCU_IDCODE) & 0xFFF;
|
||||
|
||||
if (idcode == ID_STM32F20X) {
|
||||
/* F405 revision A have a wrong IDCODE, use ARM_CPUID to make the
|
||||
|
|
|
@ -174,7 +174,8 @@ static void stm32h7_add_flash(target *t,
|
|||
|
||||
bool stm32h7_probe(target *t)
|
||||
{
|
||||
uint32_t idcode = target_mem_read32(t, DBGMCU_IDCODE) & 0xFFF;
|
||||
ADIv5_AP_t *ap = cortexm_ap(t);
|
||||
uint32_t idcode = (ap->dp->targetid >> 16) & 0xfff;
|
||||
if (idcode == ID_STM32H74x) {
|
||||
/* RM0433 Rev 4 is not really clear, what bits are needed.
|
||||
* Set all possible relevant bits for now. */
|
||||
|
|
Loading…
Reference in New Issue