MCU serial number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-21 07:15 AM
For some reasons it will be good to write my own MCU serial number for USB purpose.. Is it possible to change seria number of hte MCU and how to do this...
Solved! Go to Solution.
- Labels:
-
USB
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-22 03:00 AM
Any number that is persistently stored on the device will do. Could be stored in flash, user option bytes, external eeprom etc.. Just implement the Get_SerialNum(void) function and supply your own variant of deviceserial0 and deviceserial1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-21 07:20 AM
No, but you can write your own code to generate the USB Serial number
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-22 02:39 AM
Some explanation will be good... I found that into usbd_desc.c file is is generated but I am not sure how I can add my own serial number. Some useful explanation with example will be good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-22 03:00 AM
Any number that is persistently stored on the device will do. Could be stored in flash, user option bytes, external eeprom etc.. Just implement the Get_SerialNum(void) function and supply your own variant of deviceserial0 and deviceserial1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-22 04:21 AM
It is putting an alpha/numeric identifier in a USB descriptor, how complicated can that be?​
​
Why isn't the current method working for you now?
​
I​f you want some linear number space, or particular form you have to manage the allocation and programming of each individual device.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-22 04:29 AM
If you need to uniquely serialized each device at final test most of the challenge is how you manage that allocation. On the STM32 side you'd likely want to put serialization, configuration, keys and calibration ​data into FLASH or OTP areas you have set aside for that purpose.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-23 02:01 PM
@KnarfB​ Are there any option bytes that are available for random user data? In which STM32 family?
Thanks,
Pavel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-23 02:21 PM
I'm guessing, but probably Knarf meant OTP, not option bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-25 12:47 AM
Not really/many, but they do exist. For example some F0 (RM0091) have 2 bytes of user data. That's okay for 2^16 boards.
On some F7 (RM0385) you may use BOOT_ADD1 for that, if the feature is not needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-01-25 05:15 AM
Thank you KnarfB... I manage to do this....