cancel
Showing results for 
Search instead for 
Did you mean: 

Read stm32f4 device

tm3341
Associate II
Posted on October 30, 2014 at 13:31

Hi.

How can I read device ID with software?

Is there any register that stores this value?

I would like to detect device on which program is running.

Or at least size of flash.

I'm using stm32f4 devices.
2 REPLIES 2
chen
Associate II
Posted on October 30, 2014 at 14:00

Hi

''How can I read device ID with software?

Is there any register that stores this value?''

There are not any ST peripheral registers that say which device it is.

However, I have found in the reference manual - in the debug support, there is

register : ''DBGMCU_IDCODE

Address: 0xE004 2000''

(for a STM32F405 at least).

Posted on October 30, 2014 at 14:07

unsigned short flashkb = *((unsigned short *)0x1FFF7A22);

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