部分客户反馈6261E和6621F没有获取flash uid的接口,这个接口,我们自己可以封装一下。操作如下: #define SF_RW_PARAM_CMD_ADDR_40BITS_DECLARE(name, cmd, addr, data, len) \ sfb_rw_params_t name = {{{((cmd)<<24)|(addr), 0}}, 40, (data), (len)} #define SPI_CMD_RDUID 0x4Bu /* Read UID */ void sf_read_uid_ex(HS_SF_Type *sf, uint32_t cs, void *data, uint32_t length) { SF_RW_PARAM_CMD_ADDR_40BITS_DECLARE(param, SPI_CMD_RDUID, 0, data, length); sfb_read_nodma(sf, cs, ¶m); } |