查看ESP32 SPR的源代码
←
ESP32 SPR
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== Overview == Speical Registers of ESP32 (Xtensa) hold the majority of the state added to the processor. <br><br> == R/W SPR == rsr.* a2 wsr.* a2 xsr.* a2 <--- exchanges the values in a General Register (GPR) and a Special Register (SPR) For example: <pre> rsr.prid a2 </pre> <br><br> == PRID == Processor ID PRID on the ESP108 architecture (ESP32) : * 0xCDCD on the PRO processor * 0xABAB on the APP CPU We can distinguish between the two by simply checking bit 1: It's 1 on the APP and 0 on the PRO processor. <source lang=cpp> void dump_prid() { uint32_t pd; //asm volatile ("rsr %0, PRID" : "=r" (pd)); asm volatile ("rsr.prid %0" : "=r" (pd)); printf("prid = 0x%08X\r\n", pd); } </source> <br><br> == CONFIG == <source lang=cpp> void dump_configid() { uint32_t c0, c1; //asm volatile ("rsr %0, CONFIGID0" : "=r" (c0)); //asm volatile ("rsr %0, CONFIGID1" : "=r" (c1)); asm volatile ("rsr.configid0 %0" : "=r" (c0)); asm volatile ("rsr.configid1 %0" : "=r" (c1)); printf("configid0 = 0x%08X\r\n", c0); printf("configid1 = 0x%08X\r\n", c1); } </source> <br><br> <br><br><br><br> <br><br><br><br> <br><br><br><br> <br><br><br><br> <br><br>
返回到
ESP32 SPR
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面