USB library problem

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

USB library problem

#1 Post by ilferrari » 15 Jan 2015 09:27

Hi all

I have written my own bootloader and firmware using HID_Enable/HID_Disable, HID_Read/HID_Write, and USB_Polling_Proc. Sometimes when it jumps from the Firmware to the Bootloader, Windows will lose sight of the HID device and there is no way to reconnect unless you remove and reattach the cable, then it will re-enumerate. Both the bootloader and firmware do the same thing after they start - HID_Enable, USB_Polling_Proc, then HID_Read/HID_Write. I have tried already calling HID_Disable before jumping.

Does anyone know a reliable method of jumping between the bootloader code and the firmware code using the above library functions.

ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

Re: USB library problem

#2 Post by ilferrari » 15 Jan 2015 09:27

I am using PIC32 at the moment, but I have had the same issue on PIC18

User avatar
dejan.odabasic
mikroElektronika team
Posts: 2649
Joined: 30 Apr 2012 14:20

Re: USB library problem

#3 Post by dejan.odabasic » 16 Jan 2015 14:30

Hello,

I suggest using compiler bootloader example projects as a guide for you development.
Bootloader projects are located in: ..compiler\Examples\Other\USB HID Bootloader\

Best regards.

esarearthur
Posts: 62
Joined: 16 Apr 2011 14:13

Re: USB library problem

#4 Post by esarearthur » 19 Jan 2015 01:01

ilferrari wrote:I am using PIC32 at the moment, but I have had the same issue on PIC18
I will suggest you check your clocking. 48Mhz for full speed and 6Mhz for slow
Never be afraid to try.

PICKit3 + MikroC Pro for PIC
DAQ with Ethernet -- Current project

Code: Select all

TRISA = 0x00

Post Reply

Return to “mikroC PRO for PIC General”