0
\$\begingroup\$

I followed the documentation on the Diolan's web site . I changed the project to be programmed to an PIC18F4550 and not a PIC18F4455 as it was originally written.

The compilation succeed and I was able to program the bootloader into the PIC18F4550's flash. I used PIckit3 and MPLABV8 to do it.

I did not encrypt my application using the encoder, I just tried to write it to memory without encrypt it. So, I copied and paste my .hex file application to the bin folder where the fw_update is. I opened the console and typed:

fw_update -e -w -v -vid 0x04D8 -pid 0xFF04 -ix example.hex

The followed message appears:

U2IO flash erasing: FAILED.

Device is not found.

Operation aborted.

Does someone have some advice or tip of what it is happening ?

OBSERVATION:
My Windows 10 is not recognizing my USB device, neither before nor after the bootloader programming. It always inform: "USB device not recognized".

Below is picture of the schematic of my device:

enter image description here

[Edited]

Good observation, I saw at the datasheet that minimum value of CUSB is 220nF and there is no maximum and typical values.The hardware was not made by me, but I put the capacitor of 470nF, based on the PICDEM™ FS USB DEMONSTRATION BOARD of microchip. The Windowa 10 stopped to inform that the device was not connected, but at the device manager it is still with a yellow exclamation(But this time in HID USB). The error mentioned before still happens.

So, I did the following changes on the bootloder code:

In source files where was originally #include "P18F4455.INC" I changed to #include "P18F4550.INC"

On the Header files, I remove "P18F4455.INC" and put "P18F4550.INC instead that I downloaded from here.

My application code is edited on the project by its configuration bits this way:

CPU System Clock Postscaler was: [OSC1/OSC2 Src:/4][96 MHz PLL Src: /6]

Power Up Timer: Enabled

The others I left default. And this configuration works when I run my application without the bootloader.

But, when I will compiled the bootloader, I did not configure the configuration bits, the checkbox "Configuration Bits set in code" is selected as is said in the documents.

I found on the bootloader's file usb_desc.inc that :

#ifndef BOOTLOADER_VID
#define BOOTLOADER_VID  0x0000      ; MUST BE VALID Vendor ID
#endif
#ifndef BOOTLOADER_PID
#define BOOTLOADER_PID  0x0000      ; MUST BE VALID Product ID
#endif

So I changed my command line in the prompt to:

fw_update -e -w -v -vid 0x0000 -pid 0x0000 -ix principal.hex

But it still not working.

\$\endgroup\$
  • \$\begingroup\$ What drivers are you using? It sort of looks like you're missing drivers. \$\endgroup\$ – vini_i May 16 at 19:09
  • \$\begingroup\$ I don't know, do I need a specific driver? \$\endgroup\$ – Daniel May 16 at 19:15
  • 1
    \$\begingroup\$ @vini_i This boot loader uses the built-in HID drivers. \$\endgroup\$ – Spehro Pefhany May 16 at 19:44
1
\$\begingroup\$

See the below section of the data sheet- there may be other things wrong (the clock has to be correct) but it certainly won’t work without the cap on Vusb.

17.2.2.8 Internal Regulator The PIC18FX455/X550 devices have a built-in 3.3V regulator to provide power to the internal transceiver and provide a source for the internal/external pull-ups. An external 220 nF (±20%) capacitor is required for stability.

\$\endgroup\$
  • \$\begingroup\$ Good observation. On the datasheet the minimum value of CUSB is 220nF and there is no maximum values.The hardware was not made by me, but I put the capacitor of 470nF, based on the PICDEM™ FS USB DEMONSTRATION BOARD. After that, the Windows 10 stopped to inform that the device was not connected, but at the device manager it is still with a yellow exclamation and the error mentioned before, when I tried to update firmware by usb, still happens. I will edited my question, I will put at the end, [edited] the modifications that I did on the bootloader project after the bootloader not working \$\endgroup\$ – Daniel May 17 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.