打印
[DemoCode下载]

在M451中,使用U盘更新APROM

[复制链接]
2328|12
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
a_ziliu|  楼主 | 2015-9-24 11:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
感谢CYTseng提供。
CONFIG请设成BOOT IN "LDROM with IAP".
使用在KEIL编译後下载代码至M451即可。在U盘中,要更新的BIN档请改成AP.BIN即可。


M451SeriesBSP_CMSIS_v3.00.005 - HOST MASS ISP.zip (1.28 MB)




沙发
yiyigirl2014| | 2015-9-24 21:18 | 只看该作者
U盘的接口程序如何写的啊,我要学学了,这个好神奇的。

使用特权

评论回复
板凳
598330983| | 2015-9-26 11:09 | 只看该作者
IAP程序先读取U盘数据,然后确认固件后,读取写入到Flash

使用特权

评论回复
地板
mintspring| | 2015-9-28 17:02 | 只看该作者
有了这个可以拷贝进去就行了

使用特权

评论回复
5
734774645| | 2015-9-29 15:32 | 只看该作者
不知道原理是什么,要不停扫描优盘内容吗?

使用特权

评论回复
6
小猫爱吃鱼| | 2015-9-29 16:19 | 只看该作者
用U盘更新APROM,是一个很不错的想法啊

使用特权

评论回复
7
minier| | 2015-10-3 13:28 | 只看该作者
NXP的ARM就是这样

使用特权

评论回复
8
weizhiwuxian| | 2015-12-23 14:59 | 只看该作者
是启动设置成LDROM 含IAP功能吧??然后把程序烧写到APROM吧?烧写到LDROM说程序太大,
U盘更目录下有个IP.bin程序.插U盘上电后,观看串口输出的信息,无任何输出.
再把启动塞罕至成APROM,重启后,可以看到串口输出

UDetecting USB disk...

Device connected.

Port reset OK.

USB device enabled (Full-speed).


[Device Descriptor]

----------------------------------------------

  Length              = 18

  DescriptorType      = 01

  USB version         = 2.00

  Vendor:Product      = 1043:8012

  MaxPacketSize0      = 64

  NumConfigurations   = 1

  Device version      = 1.00

  Device Class:SubClass:Protocol = 00:00:00


[Configuration Descriptor]

----------------------------------------------

  Length              =  9

  DescriptorType      = 02

  wTotalLength        = 32

  bNumInterfaces      = 1

  bConfigurationValue = 1

  iConfiguration      = 0

  bmAttributes        = 0x80

  MaxPower            = 50


[Interface Descriptor]

----------------------------------------------

  Length              =  9

  DescriptorType      = 04

  bInterfaceNumber    = 0

  bAlternateSetting   = 0

  bNumEndpoints       = 2

  bInterfaceClass     = 0x08

  bInterfaceSubClass  = 0x06

  bInterfaceProtocol  = 0x50

  iInterface          = 0


[Endoint Descriptor]

----------------------------------------------

  Length              =  7

  DescriptorType      = 05

  bEndpointAddress    = 0x81

  bmAttributes        = 0x02

  wMaxPacketSize      = 64

  bInterval           = 0

  bRefresh            = 7

  bSynchAddress       = 5


[Endoint Descriptor]

----------------------------------------------

  Length              =  7

  DescriptorType      = 05

  bEndpointAddress    = 0x02

  bmAttributes        = 0x02

  wMaxPacketSize      = 64

  bInterval           = 0

  bRefresh            = 0

  bSynchAddress       = 0

USB Mass Storage device found.

Max lun is 0




******* Read lun 0 ******


INQUIRY...

INQUIRY command success.

TEST_UNIT_READY...

CSW status error.

REQUEST_SENSE...

REQUEST_SENSE command success.

READ CAPACITY ==>

USB disk found: size=2046 MB, uTotalSectorN=4190208

g_disk_lun = 0

rc=0

Firmware AP.BIN file not found.

Data file data.bin not found.

Will branch to user application...

In Hard Fault Handler

r0  = 0x18

r1  = 0x20026

r2  = 0x2e

r3  = 0xa

r12 = 0x0

lr  = 0x201

pc  = 0x790

psr = 0x21000000

最终都没有更新,是什么原因?????

使用特权

评论回复
9
weizhiwuxian| | 2015-12-23 15:26 | 只看该作者
换了个U盘后

******* Read lun 0 ******


INQUIRY...

INQUIRY command success.

TEST_UNIT_READY...

CSW status error.

REQUEST_SENSE...

REQUEST_SENSE command success.

READ CAPACITY ==>

USB disk found: size=1911 MB, uTotalSectorN=3915775

g_disk_lun = 0

rc=0

----A 2015/12/22 16:23      5760  AP.BIN

   1 File(s),      5760 bytes total

   0 Dir(s)Firmare file found, start update firmware...

Program page 0x0, count=2048

Verify failed at 0x0, read:0x0, epect:0x200004f8

Will branch to user application...

In Hard Fault Handler

r0  = 0x18

r1  = 0x20026

r2  = 0x2e

r3  = 0xa

r12 = 0x1

lr  = 0x201

pc  = 0x790

psr = 0x21000000

使用特权

评论回复
10
734774645| | 2016-1-27 15:53 | 只看该作者
IAP程序先读取U盘数据,然后确认固件后,读取写入到Flash

使用特权

评论回复
11
neeringstu| | 2016-1-28 09:01 | 只看该作者
这个是不是就是dfu啊?

使用特权

评论回复
12
玛尼玛尼哄| | 2019-8-14 22:54 | 只看该作者
config是在哪儿

使用特权

评论回复
13
wanduzi| | 2019-8-14 22:58 | 只看该作者
U盘也可以,这个方法比较好,不需要单独搞烧录软件了。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

100

主题

295

帖子

6

粉丝