Clicker Board 2 (PIC18FJ) is not detected

Post Reply
Author
Message
MAAI
Posts: 4
Joined: 05 Aug 2018 15:51

Clicker Board 2 (PIC18FJ) is not detected

#1 Post by MAAI » 05 Aug 2018 16:22

Dear experts,

While uploading code (reprogramming) to the Clicker, the board just disappeared. Note that this was NOT a connection issue. The PC can not detect it now although the power (PWR) light comes on when it is connected. I was using the USB HID Bootloader v2.7.0.0 to be exact. Probable cause: corrupt bootloader. It's not like I was messing with it, just a hunch. I don't have a programmer, so can't try that at the moment. And I had a Texas Instruments RF module connected to it (if it would change something).

And the worst thing is that this is the second board that just went into coma :shock: :x :cry: . I don't know if its worth mentioning, there were two boards connected to the PC although I was trying to upload to only one in both encounters. I mean, it would be pretty stupid if it is the case. The USB HID Bootloader allows only one device to program at a time.

This thing is becoming a huge pain. That's two in a row.
Any suggestions would be appreciated. If you can point out the cause, I'll try to avoid that. Or maybe its high time I leave PIC platform for good.

Thanks in advance.

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Clicker Board 2 (PIC18FJ) is not detected

#2 Post by filip.grujcic » 06 Aug 2018 15:09

Hello,

Could you tell me what .hex file are you trying to load?
Is it a custom .hex file? If it is, could you attach it here please?

How many times were you able to program it before it stopped working?

Kind regards,
Filip Grujcic

MAAI
Posts: 4
Joined: 05 Aug 2018 15:51

Re: Clicker Board 2 (PIC18FJ) is not detected

#3 Post by MAAI » 06 Aug 2018 21:46

Hi filip.grujcic,

The type of HEX file you were asking about is unclear to me. I'm developing a custom application and i.e. I believe the HEX file is of custom type. Anyways, I couldn't attaching the HEX file due to surprising The extension hex is not allowed error. Please find the file here - https://drive.google.com/open?id=1-an11 ... 3rCl1odkuC

Please bear in mind that this HEX is NOT the precise one I was trying to upload. The thought had never crossed my mind otherwise I would have backed it up. Nevertheless, the core functionalities of the code remained the same inferring a somewhat similar HEX file if not the exact one that caused the issue.

As for the number of times I was able to program the device, it's somewhat hard to give an accurate estimation. The second one became unresponsive 3 days after the first one - considering my work flow, the number should be not exceed 50. But again, who was counting... :)

By the way, is there any way to restore/re-program the Bootloader?

Thanks again.

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Clicker Board 2 (PIC18FJ) is not detected

#4 Post by filip.grujcic » 07 Aug 2018 09:32

Hi,

Yes, that is what I meant, I apologize for the confusion.
If you had zipped the .hex file, it would've let you attach it.

I programmed the Clicker 2 board with your hex file using the bootloader many times hoping to reproduce the issue, but everything was working correctly - the bootloader wasn't disappearing.

Also, I used the one from the device's product page:
https://download.mikroe.com/examples/st ... d-v100.zip

Perhaps try that one and see if it will work.

There is no way to restore the bootloader without an external programmer I'm afraid.

Could you also check in the Device Manager if the board appears under Human Interface Devices?

Kind regards,
Filip Grujcic

MAAI
Posts: 4
Joined: 05 Aug 2018 15:51

Re: Clicker Board 2 (PIC18FJ) is not detected

#5 Post by MAAI » 07 Aug 2018 19:32

Hey there,

Thanks for the advice on zipping before uploading. Will try that next time.

Could it be the case that more than one devices were connected to the PC? I mean it is somewhat sensible for the USB HID Bootloader app to confuse the connected devices - the GUI shows Device and MCU Type which would be identical for two boards having the same hardware. Connecting two boards separately doesn't show distinguishable properties on those fields. This is assuming the case that the boards don't have some unique IDs embedded within (e.g. something analogous to IMEI for cell phones). But, considering the fact that a board has to be reset/rebooted for the app to be able to upload a HEX file which would suggest otherwise. Please elaborate on these.

There was no luck with the one from the device's product page either. And, the board doesn't appear on the Device list (which lead me to believe a corrupted bootloader in the first place). Tried with different USB ports also.

Well, referring to the restoration of Bootloader, I actually meant in general. My bad! I'm planning to order a programmer/debugger. Might try then. I asked this to ensure that are these boards still recoverable? (Fingers crossed)

Good day.

User avatar
filip.grujcic
Posts: 822
Joined: 14 May 2018 08:34

Re: Clicker Board 2 (PIC18FJ) is not detected

#6 Post by filip.grujcic » 08 Aug 2018 08:22

Hi,

Having two devices connected shouldn't matter, like you noticed, the device has to be reset and the bootloader has 5 seconds to recognize it and connect to it.
If it doesn't connect, the device will just start its program and the PC won't recognize it until reset again.

From everything you've said it sounds like the issue is bootloader which is easily fixable by programming it again via an external programmer.

Are the LEDs on the board working? The PWR when you connect the Clicker and turn the switch on, also the hex you sent makes the RD4 LED blink.

Kind regards,
Filip Grujcic

MAAI
Posts: 4
Joined: 05 Aug 2018 15:51

Re: Clicker Board 2 (PIC18FJ) is not detected

#7 Post by MAAI » 08 Aug 2018 09:36

filip.grujcic,

Okay. The CHG LED flickers once (very fast) while turning the power on. Then the PWR LED stays on. Even if my code has blinking the other LEDs, I don't see them. This is probably because the last code didn't get uploaded just before I encountered the issue.

By the way, I (rarely: 2/3 times max) noticed the USB HID Bootloader app (embedded in mikroC) would not recognize a healthy device although the PC would suggest otherwise by making the new connection sound. Or maybe it has something to do with me, the user or one of those bugs that happen once in a million. Nevertheless, at this point, I'm pretty much disappointed with the software experience including mikroC - it crashes once in a while asking me to restart/exit leading to data loss, the auto-complete/suggestion would not be available, the undo/redo would insert/delete to/from totally unrelated parts of code. Whew... that's a lot to take in given the past few days. Please note that I have around 1000 lines of code in the main and this has yet to go higher.

Post Reply

Return to “mikroBootloader”