USB Attach/Detach Problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB Attach/Detach Problem

1,201件の閲覧回数
ericd
Contributor I

Hi all,

 

I'm using the MCF51JM128. have two sections of code that run independently.  Each section is created as a different CW project using Processor Expert.  The first code section is a bootloader that reads from a USB thumbdrive and re-flashes the second main application section.  This bootloader uses the USB host stack. I jump from one section to another at the "_startup" address to supposedly initialize everything appropriately.

 

Normally, after a hard power cycle, the bootloader runs first and checks to see if a re-flashing is required.  If no re-flashing is required, it will immediately jump to the main application section. Within the main application I do not use the USB stack. I only monitor the USB attach bit in the INT_STAT register via the interrupt to determine if the user has inserted or removed a thumbdrive to bring up a "software update screen".  In this scenario, the attach/detach detection works fine.

 

The problem arises when the bootloader does a re-flashing and then jumps to the main application.  In this scenario, I continually get an attach event interrupt with or without a thumbdrive inserted (I do clear the interrupt by writting to the INT_STAT register each time). 

 

--Eric

ラベル(1)
タグ(3)
0 件の賞賛
返信
2 返答(返信)

981件の閲覧回数
TomE
Specialist II

Can you have the boot reflash and then tell the user to remove the USB stick? Then the boot should be reset the CPU, resulting in a normal boot.  Problem not solved, but avoided.

Tom

0 件の賞賛
返信

981件の閲覧回数
miduo
NXP Employee
NXP Employee

Hi, Eric

I am not quite understand what your mean the "re-flashing". What the main difference operation between them?

Best Regards,

Fang

0 件の賞賛
返信