/*
读取stm32的unique id 与 flash size
*/
/*
func: unsigned int Read_UniqueID_Byte(unsigned char offset)
desc: This function is used to read the unique ID in flash.
parameter offset is the byte offset ,the max is 96/8= 12.
return: the return value is indicated part of the unique ID.
*/
unsigned char Read_UniqueID_Byte(unsigned char offset)
{
unsigned char id_byte; id_byte = *(unsigned char*)(0x1FFFF7E8+offset); //ID基地址是0x1FFFF7E8 return id_byte;
} /*
func: unsigned short Read_Flash_Byte(void)
desc: This function is used to read flash size .This field value indicates
the Flash memory size of the device in Kbytes.
example:0x100 means this flash size is 256 Kbytes.
0x080 means this flash size is 128 Kbytes.
return: the return value is flash size.
*/
unsigned short Read_Flash_Byte(void)
{
unsigned short id_byte; id_byte = *(unsigned int*)(0x1FFFF7E0); //flash size基地址是0x1FFFF7E0 return id_byte;
}

Read UNIQUE ID and flash size method for stm32的更多相关文章

  1. 【STM32F4】读取芯片ID和芯片Flash Size

    首先声明,手册上给出的FlashSize地址是错误的,正确的应该是0x1FFF7A20,取高16位.确切说应该是(0x1FFF7A23,0x1FFF7A22两个字节), 芯片的这96位ID是产品唯一身 ...

  2. NuMicro Coretex™-M0家族中哪种芯片支持UID (Unique ID)? 用户该怎么做才能对其芯片进行加密功能?

    http://www.nuvoton.com/hq/chs/productfaqs/Pages/00000001.aspx 是的,使用者可利用UID来对以下系列芯片进行加密, Mini51 Serie ...

  3. 分布式Unique ID的生成方法

    分布式Unique ID的生成方法 分布式的Unique ID的用途如此广泛,从业务对象Id到日志的TraceId,本文总结了林林总总的各种生成算法. 1. 发号器 我接触的最早的Unique ID, ...

  4. [转帖]分布式Unique ID的生成方法一览

    分布式Unique ID的生成方法一览 http://www.importnew.com/22211.html 分布式的Unique ID的用途如此广泛,从业务对象Id到日志的TraceId,本文总结 ...

  5. 分布式系统中 Unique ID 的生成方法

    http://darktea.github.io/notes/2013/12/08/Unique-ID Snowflake 生成的 unique ID 的组成 (由高位到低位): 41 bits: T ...

  6. Unique ID Generate Notes

    Unique ID generation in distributed systems http://www.slideshare.net/davegardnerisme/unique-id-gene ...

  7. 分布式系统中Unique ID 的生成方法

    http://darktea.github.io/notes/2013/12/08/Unique-ID 本文主要介绍在一个分布式系统中, 怎么样生成全局唯一的 ID 一, 问题描述 在分布式系统存在多 ...

  8. 分布式环境下Unique ID生成方法

    ID即标示符,在某个搜索域内能唯一标示其中某个对象.在关系型数据库中每个表都需要定义一个主键来唯一标示一条记录.为了方便一般都会使用一个auto_increment属性的整形数做为ID.因为数据库本身 ...

  9. Ruby学习笔记5: 动态web app的建立 (2)

    上一节里,我们搭建了一个数据库的结构,并用index验证了request-response cycle,如下图: 1. Add show method into Controller 这一节,我们要继 ...

随机推荐

  1. 次短路经(dijsktra)

    #include <cstdio>#include <cstring>#include <queue>#include <algorithm>#defi ...

  2. hdu 5877(树状数组+dfs)

    Weak Pair Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total ...

  3. “全排列”问题系列(一)[LeetCode] - 用交换元素法生成全排列及其应用,例题: Permutations I 和 II, N-Queens I 和 II,数独问题

    转:http://www.cnblogs.com/felixfang/p/3705754.html 一.开篇 Permutation,排列问题.这篇博文以几道LeetCode的题目和引用剑指offer ...

  4. python和shell间变量互相传递

    Python -> shell: 参考文章 1.环境变量 import os var=123或var=’123’ os.environ[’var’]=str(var) #environ的键值必须 ...

  5. new Date()时间

    var myDate = new Date(); myDate.toLocaleDateString():可以获取当前日期myDate.toLocaleTimeString(); 可以获取当前时间 扩 ...

  6. LoadRunner配置方案

    1.配置方案运行时设置 选择“Tools”>“Options”.在“Options”对话框有“Run-Time Settings”(运行时设置).“Timeout”(超时).“Run-Time  ...

  7. LoadRunner 使用虚拟IP测试流程

    LoadRunner 使用虚拟IP测试流程 LoadRunner 使用IP欺骗的原因 . 当某个IP的访问过于频繁,或者访问量过大是,服务器会拒绝访问请求,这时候通过IP欺骗可以增加访问频率和访问量, ...

  8. BOM知识整理

    1.窗口位置: 1-1.window,screenLeft获取窗口距离屏幕左边的距离 1-2.window.screenTop获取窗口距离屏幕顶端的距离 1-3.window.screenX和wind ...

  9. Java 继承内部类

    大家有没有想过内部类究竟能不能被继承呢? public class Main { public static void main(String[] args){ Outer outer = new O ...

  10. pt--适配方案

    原文地址:一种粗暴快速的Android全屏幕适配方案