最近在读协议的时候看到寄存器的属性表,关于只能写不能读的部分十分不解,有大能 能讲讲为什么会设计一个寄存器只能写不能读吗?

R: Read only.
W: One time programmable and not readable.
R/W: One time programmable and readable.
W/E: Multiple writable with value kept after power failure, H/W reset assertion and any
CMD0 reset and not readable.
R/W/E: Multiple writable with value kept after power failure, H/W reset assertion and any
CMD0 reset and readable.
R/W/C_P: Writable after value cleared by power failure and HW/rest assertion (the value not
cleared by CMD0 reset) and readable.
R/W/E_P: Multiple writable with value reset after power failure, H/W reset assertion and any
CMD0 reset and readable.
W/E_P: Multiple writable with value reset after power failure, H/W reset assertion and any
CMD0 reset and not readable.

只能写不能读的寄存器还是比较常见的。主要用在一些控制上,比如有些清中断寄存器,写 1 清除中断标识,但是读这个清中断寄存器是没意义的,写的 1 并没保存,一般读出来都是 0
还有就是你贴出来的 一次性写,不能读,这一般用在加密上,保护用户的敏感代码,敏感数据等。在 IC 卡用的比较多。
比如公交卡,在公交公司发卡时,会在卡里写串密码,用户是没办法读读出来的,单公交卡的内部处理器能通过特殊的程序来验证这个密码是否正确。这个公交卡就不会被不法分子非法复制。