Microchip's Accessory Framework for Android(tm)
47
8.3 What if I need design assistance creating
my accessory?
If you have questions about the library, our parts, or any of our reference codes/boards, please feel free to contact Microchip
for support (What if I need more support than what is here? ( see page 48)).
If you need someone to assist you in creating a portion of your design, Microchip has design partners that can assist in the
portion of your design that you need help with. You can find a list of design partners at the following address:
http://microchip.newanglemedia.com/partner_matrix. At the moment there isn't an option to filter for Android specialists. The
best option to filter by right now is USB.
8.4 The firmware stops working when I hit a
breakpoint.
The USB protocol has periodic packets sent out that keep the attached device active. Without this packet, the bus goes into
an idle state. Normally when a breakpoint is hit in the code both the CPU and all peripherals halt at that instruction. This
causes the USB module to stop running resulting in the attached peripheral to go into the idle state. The firmware still thinks
that the peripheral is active. This results in a break in communication.
There is a way to tell the microcontroller to leave the peripheral enabled when a breakpoint is hit. This will allow the USB
module to continue to run and sent out the Start-of-Frame(SOF) packets required to keep the bus alive. This is done via the
following methods:
MPLAB 8
Under the debugger->settings menu option, select the "Freeze on Halt" tab. Uncheck the "USB" or "U1CNFG" setting in the
list. If neither of these items are in the list of peripherals, uncheck the "All other peripherals" option at the bottom of the list.
MPLAB X
Go under "File->Project Properties". In the project configuration window, select the project configuration that you are using.
Under that configuration, select the debugger that is in use. In the resulting debugger menu, select the "Freeze Peripherals"
option in the drop down box. Uncheck the "USB" or "U1CNFG" options if you see them. If you don't see these options,
uncheck the "All other peripherals" option.
8.5 If I hit the "Home" or "Back" buttons while
the accessory is attached, the demo no longer
works.
If you hit the "Home" or "Back" buttons while the accessory is attached and the demo no longer runs, the code likely tried to
close the FileInputStream to release control of the accessory. v2.3.4 and v3.1 of the Android OS have an issue where
closing the ParcelFileDescriptor or FileInputStream will not cause an IOException in a read() call on the FileInputStream.
This results in the ParcelFileDescriptor being locked until either the accessory detaches or until the read function returns for
47
8
相关PDF资料
DM300004-2 BOARD DEMO DSPICDEM.NET 2
DM300014 BOARD DEMO DSPICDEM 1.1 GEN PURP
DM300016 BOARD DEMO DSPICDEM STARTER
DM300017 BOARD DEMO DSPICDEM STARTER
DM300020 BOARD DEV DSPICDEM MC1 MOTORCTRL
DM300021 MODULE PWR DSPICDEM MC1H HV 3PHS
DM300022 MODULE PWR DSPICDEM MC1L LV 3PHS
DM320002 BOARD EXPANSION PIC32 I/O
相关代理商/技术参数
DM2410-0AL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0BL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0CL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0DL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0GL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0HL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-0SL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic
DM2410-1AL1 制造商:未知厂家 制造商全称:未知厂家 功能描述:Optoelectronic