cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve PID (Product ID) from a STM32 MCU using DFU?

SLibe
Associate II

We are creating updated versions of our products; existing products are based on STM32F411, the new product versions are based on STM32F446.

We have previously developed a custom firmware update tool - used for field firmware updates by our customers - that runs on Windows; this same tool should work with both the existing product and the new product.

We want to ensure that users do not accidentally load the existing product firmware onto the new products, and vice versa.

We can determine whether the firmware file is for the existing or new product based upon the firmware file name. However, how can we determine whether the DFU target is STM32F411 or STM32F446?

After reading AN2606, it is clear that STM32F411 PID is 0x431, and STM32F446 PID is 0x421. However, all app notes (AN3156, and AN2606) and DfuSe user manuals (UM0384, UM0391, UM0392, UM0412) does not indicate how using the DFU protocol to retrieve the PID.

Simply put - how can we access the PID over DFU from a STM32 MCU?

1 ACCEPTED SOLUTION

Accepted Solutions

Read DBGMCU_IDCODE @ 0xE0042000 ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

Read DBGMCU_IDCODE @ 0xE0042000 ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Unfortunately, reading 0xE0042000 on these parts returns DFU error code DFU_ERROR (10). And the documentation does not indicate that the External PPB Memory is accessible by the bootloader (the reference manuals for the two parts in question indicate that these are the supported memory areas: Flash, RAM, System Memory, Data Memory, OTP Memory).

Any other ideas?