完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在使用ST Visual Develop
STM8S105xx数据手册详细介绍了96位唯一设备标识符 我的设备是STM8S105K6 我使用stm8s_flash.c来调用FLASH_ReadByte函数,如下所示: for(i = 0; i&lt; 12; i ++) u_id = FLASH_ReadByte(0x48CD + i); u_id用零填充。 我查看了内存视图,这个位置似乎也填充了零。 我可以按预期阅读其他位置。 闪存寄存器是: [0x505a] FLASH_CR1 - 闪存控制寄存器1 为0x00 [0x505b] FLASH_CR2 - 闪存控制寄存器2 为0x00 [0x505c] FLASH_NCR2 - 闪存互补控制寄存器2 侵入阅读 [0x505d] FLASH_FPR - 闪存保护寄存器 为0x00 [0x505e] FLASH_NFPR - Flash互补保护寄存器 为0xFF [0x505f] FLASH_IAPSR - Flash应用内编程状态寄存器 侵入阅读 [0x5062] FLASH_PUKR - 闪存程序存储器不保护寄存器 0xae [0x5064] FLASH_DUKR - 数据EEPROM非保护寄存器 0x56储存 选项字节是 AFR1 默认 AFR2 替代性的Ative AFR3 默认 AFR4 默认 AFR5 默认 AFR6 默认 AFR7 默认 CKAWUSEL 低速内部 EXTCLK 外部振荡器 HSECNT0 0 HSECNT1 0 HSECNT2 0 HSECNT3 0 HSECNT4 0 HSECNT5 0 HSECNT6 0 HSECNT7 0 HSITRIM 3位修整 IWDG HW 软件 LSI_EN 残 PRSC 16MHz至128kHz ROP 禁用读出保护 UBC 写保护已禁用 WWDG_HALT 没有重置 WWDG_HW 软件 的I2C 停止后冻结 定时器1 停止后冻结 Tmer2 停止后冻结 Tmer3 停止后冻结 Tmer4 停止后冻结 以下各项的组合可能是真的: 我没有正确设置。我设法擦除了这个位置。我有一个狡猾的设备。有任何想法吗? #STM8-stm8s105器唯一ID,96位 以上来自于谷歌翻译 以下为原文 I am using ST Visual Develop STM8S105xx Datasheet Page 57 details the 96-bit unique device identifier My Device is STM8S105K6 I am using stm8s_flash.c to call the FLASH_ReadByte function as follows: for (i=0; i<12; i++) u_id = FLASH_ReadByte(0x48CD+i); u_id is filled with zeros. I looked in the memory view and this location also appears to be filled with zeros. I can read other locations as expected. The Flash Registers are: [0x505a] FLASH_CR1 - Flash control register 1 0x00 [0x505b] FLASH_CR2 - Flash control register 2 0x00 [0x505c] FLASH_NCR2 - Flash complementary control register 2 Intrusive read [0x505d] FLASH_FPR - Flash protection register 0x00 [0x505e] FLASH_NFPR - Flash complementary protection register 0xff [0x505f] FLASH_IAPSR - Flash in-application programming status register Intrusive read [0x5062] FLASH_PUKR - Flash Program memory unprotection register 0xae [0x5064] FLASH_DUKR - Data EEPROM unprotection register 0x56 The option Bytes are AFR1 Default AFR2 Alternate Ative AFR3 Default AFR4 Default AFR5 Default AFR6 Default AFR7 Default CKAWUSEL Low Speed Internal EXTCLK External Oscillator HSECNT0 0 HSECNT1 0 HSECNT2 0 HSECNT3 0 HSECNT4 0 HSECNT5 0 HSECNT6 0 HSECNT7 0 HSITRIM 3-bit trimming IWDG HW Software LSI_EN Disabled PRSC 16MHz to 128kHz ROP Read-out protection disabled UBC Write protection disabled WWDG_HALT No Reset WWDG_HW Software l2C Frozen when stopped Timer1 Frozen when stopped T�mer2 Frozen when stopped T�mer3 Frozen when stopped T�mer4 Frozen when stopped A combination of the following may be true:
#stm8-stm8s105-unique-id-96-bit |
|
相关推荐
10个回答
|
|
嗨,
你可以排除2.因为这部分内存位置是写保护的,用户不能意外删除它。确保未启用ROP。 brazov2 以上来自于谷歌翻译 以下为原文 Hi, you can exclude 2. because this part of memory location is write protected, user can't erase it by accident. Ensure ROP is not enabled. brazov2 |
|
|
|
嗨brazov2,
感谢您的答复。 我同意我不能删除UID。我想知道它是否可能没有在这批次上得到保障,我可能已经删除了它。 我对ROP做了一些挖掘 根据MCU配置窗口,禁用读出保护 。 我可以在内存视图中读取选项字节,但唯一ID仍为空白。 第一个位置0x4800(读出保护 ROP)= 0 根据我的理解,通过将0xAA写入0x4800来启用ROP,这也指向ROP被禁用。 我附上了选项字节和唯一ID的屏幕截图(红色=选项字节,蓝色=唯一ID) 任何进一步的指示表示赞赏。 以上来自于谷歌翻译 以下为原文 Hi brazov2, Thanks for your response. I agree that I should not be able to erase the UID. I wondered if it may not have been secured on this batch and I might have erased it. I have done a little digging on the ROP According to the MCU configuration window, Read-out protection is disabled . I can read the option bytes in the memory view, however the unique id remains blank. The first location 0x4800 (Read-out protection ROP) = 0 From what I understand ROP is enabled by writing 0xAA to 0x4800, this also points to ROP being disabled. I attached s screen shot of the option bytes and the unique id (Red= Option Bytes, Blue=Unique ID) Any further pointers are appreciated. |
|
|
|
我看了一下内存映射,ROP没有启用。数据表中指定的位置不存在96位唯一ID。看来你有一个狡猾的设备。奇怪的是,在上面一排的同一区域有96位。或数据表错误或设备狡猾。
brazov 以上来自于谷歌翻译 以下为原文 I had a look on memory map, ROP it's not enabled. The 96 bit unique id is not present in the locations specified in the datasheet. It seems you have a dodgy device. The strange thing is that in the same area in the row above there are 96 bit. Or the datasheet is wrong or the device is dodgy. brazov |
|
|
|
再次感谢你的回复。
我简要地看了一下另一块板(有不同的stm8),它还返回了零。 星期一,我将查看保留区域中的96位是否可能是错误位置的唯一ID。我会比较一些板子。 以上来自于谷歌翻译 以下为原文 Thanks again for your reply. I had a brief look at another board (with a different stm8), It also returned zeros. On Monday I will look to see if the 96 bits in the reserved area could be the unique id in the wrong place. I will compare a few boards. |
|
|
|
地址
0x48B0到0x48BC在我可用的5个PCB上读取如下内容。 71 8E 6D 92 6E 91 86 97 1A E5 E5 1A 6F 90 6E 91 6B 94 6B 94 1A E5 E5 1A 72 8D 6F 90 6F 90 6B 94 1A E5 E5 1A 77 88 73 8C 74 8B 6F 90 1A E5 E5 1A 78 87 71 8E 76 89 6B 94 1A E5 E5 1A 它们确实看起来像是独特的ID 以上来自于谷歌翻译 以下为原文 Addresses 0x48B0 to 0x48BC read as follows on the 5 PCBs I have available. 71 8E 6D 92 6E 91 86 97 1A E5 E5 1A 6F 90 6E 91 6B 94 6B 94 1A E5 E5 1A 72 8D 6F 90 6F 90 6B 94 1A E5 E5 1A 77 88 73 8C 74 8B 6F 90 1A E5 E5 1A 78 87 71 8E 76 89 6B 94 1A E5 E5 1A They do look like they could be the Unique Ids |
|
|
|
我做了一点研究:
STM8S103K3 STM8S103F3 STM8S103F2:0x4865 STM8S105xx:0x48CD [可能是0x48B0,因为此位置的数字似乎合理] STM8S207xx,STM8S208xx:0x48CD STM8S903K3 STM8S903F3:0x4865 STM8L101xx:0x4925 STM8L151x2,STM8L151x3:0x4926 STM8L151xx,STM8L152xx:0x4926 STM8L15xx8,STM8L15xR6:0x4926 STM8L162R8,STM8L162M8:0x4926 我确实发现一个论坛帖子暗示2009年底之后制作的设备有唯一ID:http://translate.google.com/translate?hl = en&amp; sl = zh-CN&amp; u = http://bbs。 eeworld.com.cn/thread-254362-1-3.html&ei=Ro-JTpqrBMm90QX837DUDw&sa=X&oi=translate&ct=result&resnum=1&ved=0CCUQ7gEwADgU&prev=/search?q%3DSTM8 %2Bunique%2Bid%26start%3D20%26hl%3Den%26safe%3Dactive%26client%3Dfirefox-A%26sa%3DN%26rls%3Dorg.mozilla:EN-US:非官方%26biw%3D1106%26bih%3D928%26prmd%3Dimvns 我想知道我是否有旧设备,如果这是真的。 以上来自于谷歌翻译 以下为原文 I have done a little research: STM8S103K3 STM8S103F3 STM8S103F2: 0x4865 STM8S105xx: 0x48CD [Possibly 0x48B0 as the numbers in this location seem plausible] STM8S207xx, STM8S208xx: 0x48CD STM8S903K3 STM8S903F3: 0x4865 STM8L101xx: 0x4925 STM8L151x2, STM8L151x3: 0x4926 STM8L151xx, STM8L152xx: 0x4926 STM8L15xx8, STM8L15xR6: 0x4926 STM8L162R8, STM8L162M8: 0x4926 I did find a forum thread suggests that devices produced after the end of 2009 have the Unique ID: http://translate.google.com/translate?hl=en&sl=zh-CN&u=http://bbs.eeworld.com.cn/thread-254362-1-3.html&ei=Ro-JTpqrBMm90QX837DUDw&sa=X&oi=translate&ct=result&resnum=1&ved=0CCUQ7gEwADgU&prev=/search?q%3DSTM8%2Bunique%2Bid%26start%3D20%26hl%3Den%26safe%3Dactive%26client%3Dfirefox-a%26sa%3DN%26rls%3Dorg.mozilla:en-US:unofficial%26biw%3D1106%26bih%3D928%26prmd%3Dimvns I wonder if I have older devices and if this is true. |
|
|
|
我的供应商已确认其中一批产品缺少唯一ID。
我将确认我的设备是否属于此批次。 以上来自于谷歌翻译 以下为原文 My supplier has confirmed one of the batches was missing the unique id. I will confirm if my devices are part of this batch. |
|
|
|
我用不同的设备替换了STM8(来自RS)
我明白了: 唯一ID [0x48CD] = 0x0 唯一ID [0x48CE] = 0x3D 唯一ID [0x48CF] = 0x0 唯一ID [0x48D0] = 0x60 唯一ID [0x48D1] = 0x17 唯一ID [0x48D2] = 0x36 唯一ID [0x48D3] = 0x30 唯一ID [0x48D4] = 0x34 唯一ID [0x48D5] = 0x32 唯一ID [0x48D6] = 0x31 唯一ID [0x48D7] = 0x35 唯一ID [0x48D8] = 0x36 这必须是批处理问题。 失败的设备都有:05K6U6 9YBNG VG MYS 917 写在上面。 我还没有听说过ST吗? 以上来自于谷歌翻译 以下为原文 I have replaced the STM8 with a different device (from RS) I get: Unique ID [0x48CD]= 0x0 Unique ID [0x48CE]= 0x3D Unique ID [0x48CF]= 0x0 Unique ID [0x48D0]= 0x60 Unique ID [0x48D1]= 0x17 Unique ID [0x48D2]= 0x36 Unique ID [0x48D3]= 0x30 Unique ID [0x48D4]= 0x34 Unique ID [0x48D5]= 0x32 Unique ID [0x48D6]= 0x31 Unique ID [0x48D7]= 0x35 Unique ID [0x48D8]= 0x36 This must be a batch problem. The failing devices all had: 05K6U6 9YBNG VG MYS 917 written on the top. I have not heard from ST yet? |
|
|
|
现在看来还好,看着我的:
/public/STe2ecommunities/mcu/Lists/stm81/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/stm81/STM8S Ride7&amp; FolderCTID上的96位唯一ID = 0x01200200770978C69A1141439FE559EB459D7580001E3853D9DB932A46A3FE4CD15CAB46FB&amp; currentviews = 70 /public/STe2ecommunities/mcu/Lists/stm81/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/stm81/STM8S Ride7&amp; FolderCTID上的96位唯一ID = 0x01200200770978C69A1141439FE559EB459D7580001E3853D9DB932A46A3FE4CD15CAB46FB&amp; currentviews = 70 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 It seems ok now, looks at mine: /public/STe2ecommunities/mcu/Lists/stm81/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/stm81/STM8S 96 bit Unique ID on Ride7&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580001E3853D9DB932A46A3FE4CD15CAB46FB¤tviews=70 /public/STe2ecommunities/mcu/Lists/stm81/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/stm81/STM8S 96 bit Unique ID on Ride7&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580001E3853D9DB932A46A3FE4CD15CAB46FB¤tviews=70 Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
我收到了ST的以下信息:
这些独特的ID在STM8产品的生产过程中仅在2010年下半年开始生产。如果你得到带有标记的样品,例如MYS 11xx,则应该没问题。 11代表年份,xx代表本周。 以上来自于谷歌翻译 以下为原文 I have received the following from ST: The unique ID's are being programmed inside the STM8 products during their production only from second half of 2010. If you get samples with marking ending by for example MYS 11xx, those should be OK. 11 stands for the year, xx for the week. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2720 浏览 1 评论
3236 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3645 浏览 6 评论
6033 浏览 21 评论
1334浏览 4评论
208浏览 3评论
196浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
441浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 02:04 , Processed in 1.419124 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号