Raspberry Pi读取OTP

Raspberry Pi读取OTP

OTP简介

OTP(One Time Programmable)是MCU的一种存储器类型,意思是一次性可编程: 程序烧入IC后, 将不可再次更改

读取OTP信息

只需要在shell中输入即可

  1. sudo vcgencmd otp_dump 

例如

  1. rootming@pi3:~ $ sudo vcgencmd otp_dump 
  2. 08:00000000 
  3. 09:00000000 
  4. 10:00000000 
  5. 11:00000000 
  6. 12:00000000 
  7. 13:00000000 
  8. 14:00000000 
  9. 15:00000000 
  10. 16:00280000 
  11. 17:1020000
  12. 18:1020000
  13. 19:ffffffff 
  14. 20:ffffffff 
  15. 21:ffffffff 
  16. 22:ffffffff 
  17. 23:ffffffff 
  18. 24:ffffffff 
  19. 25:ffffffff 
  20. 26:ffffffff 
  21. 27:00002727 
  22. 28:8015f91e 
  23. 29:7fea06e1 
  24. 30:00a02082 
  25. 31:00000000 
  26. 32:00000000 
  27. 33:00000000 
  28. 34:00000000 
  29. 35:00000000 
  30. 36:00000000 
  31. 37:00000000 
  32. 38:00000000 
  33. 39:00000000 
  34. 40:00000000 
  35. 41:00000000 
  36. 42:00000000 
  37. 43:00000000 
  38. 44:00000000 
  39. 45:00000000 
  40. 46:00000000 
  41. 47:00000000 
  42. 48:00000000 
  43. 49:00000000 
  44. 50:00000000 
  45. 51:00000000 
  46. 52:00000000 
  47. 53:00000000 
  48. 54:00000000 
  49. 55:00000000 
  50. 56:00000000 
  51. 57:00000000 
  52. 58:00000000 
  53. 59:00000000 
  54. 60:00000000 
  55. 61:00000000 
  56. 62:00000000 
  57. 63:00000000 
  58. 64:00000000 
  59. 65:00000000 
  60. 66:00000000 

获取到这些信息后, 就可以知道树莓派的MAC地址, 以及启动模式

Locations 28 and 30 store the Serial and Revision values that get displayed by /proc/cpuinfo (the Serial is also used to determine the Ethernet MAC address on Model B boards), and location 32 stores the value of the warranty bit. Purpose of values in other locations is unknown. RPI_vcgencmd_usage

原文地址:https://www.cnblogs.com/rootming/p/5760544.html