NXP KL03--9. KL03/KL17/KL27类似系列MCU 芯片类型信息获取,包括UUID
【摘要】
void sdid_test(void)
{
uint32 did = 0;
uint16 didmh= 0;
uint32 didml = 0;
uint32 didl= 0;
/*
24p...
void sdid_test(void)
{
uint32 did = 0;
uint16 didmh= 0;
uint32 didml = 0;
uint32 didl= 0;
/*
24pin
chip die id=0xd
sram 2kB
mcu is kl series
mcu is kl x3 subfamily
mcu is kl 0x family
*/
did = SIM_SDID ;
uart_printf("did=0x%x",did);
switch(did&0xf)
{
case 0:uart_printf("16 pin");
break;
case 1:uart_printf("24pin");
break;
case 2:uart_printf("32 pin");
break;
}
uart_printf("chip die id=0x%x",(did>>7)&0x1f);
switch((did>>16)&0xf)
{
case 0:uart_printf("sram 0.5kB");
break;
case 1:uart_printf("sram 1kB");
break;
case 2:uart_printf("sram 2kB");
break;
case 3:uart_printf("sram 4kB");
break;
case 4:uart_printf("sram 8kB");
break;
}
if(((did>>20)&0xf) == 1)
uart_printf("mcu is kl series");
if(((did>>24)&0xf) == 3)
uart_printf("mcu is kl x3 subfamily");
if(((did>>28)&0xf) == 0)
uart_printf("mcu is kl 0x family");
//didmh=0x2d
//didml=0x00232006
//didl=0x30284e45
didmh = SIM_UIDMH &0xffff ;
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
免费资源:KL03 外设模块开发的参考例子,RTC TPM FLASH等均有哦
关注我获取最新技术文章信息与海量资源~
文章来源: blog.csdn.net,作者:悟空胆好小,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/xushx_bigbear/article/details/123834778
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)