【无标题】DFU协议

DFU (usb device upgrade)

DFU只使用control endpoint.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
Reconfiguration Phase
该阶段用于应用需求进行升级,从正常模式切换到DFU模式。
Device检测到Host发送的DETACH命令,willdetach=1的设备会立即detach-attach。否则,device会开启timer,如果在wDetachTimeout时间内检测到一个usb reset则立即切换到DFU模式。
在这里插入图片描述
在这里插入图片描述
3.Transfer Phase
FW download和upload都有可能。

3.1 Downloading
N = ((F – S) / O) + 1
where
F is the size of the file, specified in bytes.
S is the size of the suffix, specified in bytes.
O is the transfer size, specified in bytes, [bMaxPacketSize0 , wTransferSize], 取决于host。

这个阶段,host持续的通过发送DFU_DNLOAD请求来发送固件数据片,然后通过DFU_GETSTATUS请求来确认device状态。只有在处于DFUIDLE状态时才允许继续发送下一个个数据片。
3.1.1
在这里插入图片描述

  • The wBlockNum field is a block sequence number. It increments each time a block is transferred,wrapping to zero from 65,535. It is used to provide useful context to the DFU loader in the device.The wLength field indicates the total number of bytes in this transfer, according to USB version 1.0.This value should not exceed the value specified in the wTransferSize field.
    在这里插入图片描述
    3.1.2
    在这里插入图片描述
    在这里插入图片描述

在这里插入图片描述

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值