2016-09-06 12:37 PM
Is it possible to read the device type in user code? I would like to write some code that uses the crypto acceleration hardware if it is running on an STM32F415 and falls back to software implementations if it is running on an STM32F405. Is that possible? How do you do it? (The reason I need to do this is that I just did a production run of a product that had an error in the BOM and so I ended up with F405s where I wanted F415s.)
2016-09-06 12:56 PM
These two share the ID (see RM0090 rev.12 ch.38.6.1) so may be prectically undistinguishable (they in fact may be the same silicon).
The '41x do have CRYP so you may try to access its registers and see if you can get anywhere through that (may cause some sort of fault in '40x), but I wouldn't be surprised if this would not be a reliable method. JW