Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bootloader 2nd time through
#1
Good afternoon,

I have used the bootloader in a couple of different projects and have not had any problems. This time around, using a dspic30f4013 which I have used in the past, I am having some difficulty. I have setup everything as I would have normally with the bootloader code,

BLINIT                    4000

HELLOTRIES          2

BLTIME                  2000

I download this code with an MPLAB ICD 3 and then toggle power and use the GUI (ver 1.5.1) to bootload the code via a serial port.  The code downloads and the target runs fine. The problem I seem to be having is if I want to bootload a new version of code over this. The GUI always comes back with

Initiating write...



      Searching for bl . . . . . . . . . . . . . . . . . . . . timed out

      Tx 20 bytes / Rx 0 bytes / 13.2s

      Write failed

Now if I change the bootloader code to BLINIT 6000 and go through the same process, it will work the second time thru. So why don't I just do that? Because the target is a handhelld device that has a LCD. When you press the on button and nothing happens on the display for 6 seconds, it appears to be broken/not working. At that point the customer/user tries pressing the on button again, which actually turns the unit off. The aesthetics are just not what we wanted.

So can you tell me what is going on between GUI and the bootloader code at start up that the extra 2 seconds helps with. Maybe i can whittle down something in the actual firmware to help?? I have tried a bunch of different settings in the boot code to no avail.

Thanks
Reply
#2
Hello,
How do invoket the boot loader/reset the device?
Reply
#3
(2015-03-06, 14:45:38)Mikael Gustavsson Wrote: Hello,
How do invoket the boot loader/reset the device?

Mikael,

The Host that the boot loader is installed on has an FTDI FT232R chip used for a USB interface, it is a Li-Ion battery powered device and the power is controlled by an LTC2954-2 push button on/off controller. I say this so that you have all the info about the circuitry. To power the unit, a button is pressed and held for ~1.5 seconds. The power comes up, the FT232R chip initializes and the computer recognizes the chip and installs the com port driver. (I have used the FT232R chip in other hosts and gotten the boot loader to work.) At this point if all that is in the host is the ds30 boot loader code, the GUI recognizes it and downloads the hex file I have pointed it to.

If I have the ds30 boot loader code loaded and have boot loaded a hex file onto the host and I try to update that hex file with another, the GUI always times out and can not find the boot loader (see previous post for error message).

If I then change the ds30 boot loader code to increase the BLINIT number to 6000 instead of 4000, the GUI software will load code in either scenario.

As I stated before, turning on a handheld device and waiting 6 seconds before anything is displayed on the LCD is not very helpful. Do you have any ideas on why the extra time is needed in the case of updating previously loaded code?

Thanks for your help

Steve
Reply
#4
You are not using a reset command?
/M
Reply
#5
(2015-03-15, 19:34:59)Mikael Gustavsson Wrote: You are not using a reset command?
/M

Mikael,

I do not understand. Toggling the power resets the whole device, no? Also, the manner in which I reset it works in the first case, as well as in four other devices that I use this boot loader in.

Steve
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)