Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with command-based reset in console [solved]
#1
I've successfully implemented the bootloader into a design that uses an FTDI FT232RQ for USB to RS-232 communication from PC to the device. I am able to load new firmware via the GUI using a software reset command. I am trying to get the console to load new firmware and am running into problems with the software reset. Basically, the device never receives the command from the console app and as such, never resets to the bootloader.

Here is a console log...
-----------------------------------------------------------------------
C:\ds30 Loader\bin>ds30loaderconsole -z

Loading device database...492 devices found
Loading port plugin ds30LoaderPortSerial.dll: found 3 ports
Available ports:
Communications Port (COM1)
, no restrictions on baud/bitrate by ds30 Loader
Communications Port (COM2)
, no restrictions on baud/bitrate by ds30 Loader
USB Serial Port (COM9) M2)
, no restrictions on baud/bitrate by ds30 Loader
End of available ports, exiting
Press any key to continue


C:\ds30 Loader\bin>ds30loaderconsole -o -f=D:\firmware.hex -d=pic18f4620 -k=com9 -r=115200 -p -a=20 -q=7e;d

Loading device database...492 devices found
Loading port plugin ds30LoaderPortSerial.dll: found 3 ports
Parsing hex-file...
File timestamp: 7/20/2011 4:03:10 PM
Validating hex-file...ok
Hex-file successfully parsed

29979 program words found in 938 rows
0 Eeprom words found
14 config words found

File: D:\firmware.hex
Device: PIC18F4620
Port: com9
Baudrate: 115200



Initiating write...
Sending reset command...ok
Searching for bl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . timed out
Tx 163 bytes / Rx 0 bytes / 5.4s

C:\ds30 Loader\bin>
-----------------------------------------------------------------------

One thing that I noticed is that the port listing for the FTDI port (COM9) looks a little different than the standard serial ports. Not sure if this could be related or not.

In an attempt to get a better view of what is actually going on, I connected two USB-RS232 cables together via a null modem cable. I set both the GUI and console to use one of the ports and opened a serial terminal on the other. Here are the terminal captures...

GUI:
(ASCII)
~
ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ

(HEX)
7E0DC1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1

Console:
(ASCII)
<0>€<0><0><0>ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ

(HEX)
0080000000C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1

It appears to me as though the console application is not properly sending the specified reset command. I used the same syntax in the console as I did in the GUI. I'm out of ideas and thought I'd list my findings here to see if this is an actual bug. Thoughts? Thanks in advance.

Brandon
Reply
#2
Hi,
Which version are you using?
Reply
#3
Btw, you should probably set the reset baud rate.
Reply
#4
Mikael,

I am using the following...

ds30 Loader GUI.exe - 1.4.1.0
ds30 Loader.dll - 2.0.1.0
GHelper.dll - 1.0.5.0
devices.xml - 2011-04-10
ds30LoaderPortSerial.dll - 1.0.4.0

Btw, totally missed the reset baudrate command. That got everything working. I figured I must have missed something! Thanks again.

Brandon
Reply
#5
Great! I will improve the application so this doesn't happen again.

Thanks,
Mikael
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)