ds30 Loader free edition forums
Searching for bootloader times out - Printable Version

+- ds30 Loader free edition forums (https://picbootloader.com/forum)
+-- Forum: Support (https://picbootloader.com/forum/forumdisplay.php?fid=3)
+--- Forum: GUI (https://picbootloader.com/forum/forumdisplay.php?fid=4)
+--- Thread: Searching for bootloader times out (/showthread.php?tid=22335)



Searching for bootloader times out - Kevin4455 - 2020-05-28

I'm getting:


Code:
Initiating read...
      Searching for bl . . . . . . . . . . . . . . . . . . . . . timed out
      Read  failed

whenever I try to update the dsPIC30F6013A . 

Debug mode does not show anything aside from the above. Should I overwrite the bootloader?


RE: Searching for bootloader times out - Mikael Gustavsson - 2020-05-29

If your hardware is ok you most likely have a configuration issue with clock and/or baud rate.


RE: Searching for bootloader times out - Kevin4455 - 2020-06-03

(2020-05-29, 08:29:57)Mikael Gustavsson Wrote: If your hardware is ok you most likely have a configuration issue with clock and/or baud rate.

I had some trouble updating the firmware on a dspic30f6013a; initial update worked, but the bootloader can no longer be found later. 

Is there a way to "reset" a dspic30f6013a?




RE: Searching for bootloader times out - Mikael Gustavsson - 2020-06-03

It is describe in the main manual. There are two manual options and one automatic.


RE: Searching for bootloader times out - Kevin4455 - 2020-06-08

(2020-06-03, 12:50:14)Mikael Gustavsson Wrote: It is describe in the main manual. There are two manual options and one automatic.

In the manual:

https://www.ds30loader.com/images/files/ds30-Loader-firmware-manual.pdf

on page 18, it's mentioned that the programmer can erase the bootloader:

On the menu Programmer->Erase Flash Device

but I don't have (nor need a programmer; bootloader was flashed earlier). I'm updating the firmware through code (C#) using ds30Loader.dll:


Code:
clsds30ParseSettings objParseSettings = new clsds30ParseSettings();

objParseSettings.device = objDevice;
objParseSettings.addChecksum = false;
objParseSettings.allowBlOverwrite = false;
objParseSettings.dontWriteEmptyPages = false;
objParseSettings.noGotoBl = false;
objParseSettings.noGotoUserApp = false;
objParseSettings.writeConfigs = false;
objParseSettings.blPlacementP = 1;
objParseSettings.blSizeP = 1;

bool bParseResult = false;
objHex.ParseHexFile(objParseSettings, false, 0, ref bParseResult);               


if (bParseResult == false)
{
    MessageBox.Show("Parse of hex file failed, write aborted.", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    this.Cursor = Cursors.Default;
    return;
}

bool bWriteResult = false;
clsds30Settings objds30Settings = new clsds30Settings();
                
ds30Settings.portName = "COM1";
ds30Settings.baudRate = i115200;
ds30Settings.writeFlash = true;

ds30Settings.password = "pass";    

clsds30Loader.WriteDevice(objDevice, objHex, objds30Settings, 0, ref bWriteResult);

if (bWriteResult == false)
{
    MessageBox.Show("Write failed", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);    
    return;
}



RE: Searching for bootloader times out - Kevin4455 - 2020-06-09

(2020-06-03, 12:50:14)Mikael Gustavsson Wrote: It is describe in the main manual. There are two manual options and one automatic.

I've managed to get it running. The problem was d30Loader's poor design; once the serial port is opened there is a timeout until it's closed provided nothing is written to it. In short, if the API is called from C# and the connection is not closed within the next 5 minutes the  code can no longer access the serial port regardless if the PC is rebooted or not.


RE: Searching for bootloader times out - Mikael Gustavsson - 2020-06-09

There is no such functionality either by design or as a bug. Which package are you using?


RE: Searching for bootloader times out - Kevin4455 - 2020-06-10

(2020-06-09, 16:55:06)Mikael Gustavsson Wrote: There is no such functionality either by design or as a bug. Which package are you using?

ds30Loader.dll v1.0.0.0