HID Bootloader is not working

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
szacpp
Posts: 61
Joined: 19 Sep 2015 21:31

HID Bootloader is not working

#1 Post by szacpp » 13 Jun 2018 15:10

Hello everyone,

I'm using pic18f4550 with 20mhz external crystal and internal mcu frequency is 48mhz.
one week ago i flashed hid boot-loader into pic. today when i connected my device, it's boot-loader not working. i dont know why?
I flashed boot-loader again it's working now. the problem had also occurred one month ago. pls guide me how do resolve the issue?

Here is my boot-loader configuration is it correct configuration? also i want to know that my user app configuration and boot-loader configuration should be same?
Attachments
sss.png
sss.png (81.38 KiB) Viewed 2306 times

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: HID Bootloader is not working

#2 Post by filip » 14 Jun 2018 14:47

Hi,

Which HEX file did you upload ? Can you attach it here ?
Did something happened during the upload which could lead to this ?

Regards,
Filip.

szacpp
Posts: 61
Joined: 19 Sep 2015 21:31

Re: HID Bootloader is not working

#3 Post by szacpp » 14 Jun 2018 16:48

Thank you filip for your response. i attached bootloader project included hex file.
filip wrote:Hi,

Which HEX file did you upload ? Can you attach it here ?
Did something happened during the upload which could lead to this ?

Regards,
Filip.
nothing happened during upload.
Attachments
USB HID Bootloader.zip
(552.57 KiB) Downloaded 77 times

szacpp
Posts: 61
Joined: 19 Sep 2015 21:31

Re: HID Bootloader is not working

#4 Post by szacpp » 16 Jun 2018 11:56

Hello filip,
now i saw, There is USB Voltage ragulator option is disable in user app configuration whereas that option is enable in bootloader configuration...is that a problem?

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: HID Bootloader is not working

#5 Post by filip » 18 Jun 2018 10:23

Hi,

That should be turned on too, but this does not explain the issue that you have.

Just in case, turn this on and see if you experience the same problem again.

Regards,
Filip.

szacpp
Posts: 61
Joined: 19 Sep 2015 21:31

Re: HID Bootloader is not working

#6 Post by szacpp » 19 Jul 2018 18:57

Hello filip,
i had turned on usb voltage regulator...
Today the bootloader is not working again. can it be usb cable fault? when i plug usb cable it fluctuates (or power low and normal) during plugin...then i pull out usb cable little bit from usb socket for stabilizing voltage. i can see voltage fluctuation because there is an led on circuit board. is voltage fluctuation (by cable) corrupting bootloader?

Thanks.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: HID Bootloader is not working

#7 Post by filip » 20 Jul 2018 16:12

Hi,

This can explain the issue, try changing the cable and see it this helps.

Regards,
Filip.

szacpp
Posts: 61
Joined: 19 Sep 2015 21:31

Re: HID Bootloader is not working

#8 Post by szacpp » 20 Jul 2018 17:24

Thanks filip for your response.
I changed usb cable...also I compared user app USBdsc.c and Bootloader USBdsc.c
both files have some differences...

Like:
user app USBdsc.c has USB_SELF_POWER = 0xC0 whereas Bootloader USBdsc.c has USB_SELF_POWER = 0x80
and user app USBdsc.c has USB_INTERRUPT = 1; whereas Bootloader USBdsc.c has USB_INTERRUPT = 0;

Is that normal?

also My user app's used ROM(bytes) are 23310 and HEAP RAM(bytes) are 160...
and bootloader used ROM is 6242 bytes. using pic18f4550;

is it possible that my user app has huge size causing bootloader corrupt?

knxrc
Posts: 19
Joined: 19 Jun 2018 19:32

Re: HID Bootloader is not working

#9 Post by knxrc » 20 Jul 2018 20:57

Hi.

I'm also dealing with this problem on 18F4550. I tried to test a simple circuit, default USB code and it didn't work.

I posted a topic a few days ago, I'm wondering that they are working in my solution.

Take a look in my issue: viewtopic.php?f=88&t=72571

Post Reply

Return to “mikroC PRO for PIC General”