Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIC24F16KA102, Unknown firmware version [solved]
#1
Hi,

I'm trying to run ds30 loader on PIC24F16KA102
the firmware on PIC seems to work correctly.

Code:
Searching for bl.
Found PIC24F16KA102 fw ver. 0.9.4

but I have get Error Message in GUI, when I use "Download" button.
Code:
Initiating download...
      Searching for bl .
      Found PIC24F16KA102 fw ver. 0.9.4
      Unknown firmware version
      Tx 1 byte / Rx 3 bytes / 0,1s

but when I change in firmware:
Code:
;------------------------------------------------------------------------------
; Constants, donĀ“t change
;------------------------------------------------------------------------------
        .equ    VERMAJ,        0                                        /*firmware version major*/
        .equ    VERMIN,        9                                        /*fimrware version minor*/
        .equ    VERREV,        3                                        /*firmware version revision*/

I get errors in GUI:
Code:
Initiating download...
      Searching for bl . . . . . . (discarded null byte) .
      Found PIC24F16KA102 fw ver. 0.9.3
      Waiting for bootloader to be ready...ok
      Writing flash...verification error,1 try
      Writing flash...verification error,2 try
      Writing flash...download failed
      Download finished
      Tx 319 bytes / Rx 9 bytes / 3,5s

How can I fix it?
It is problem with firmware on PIC
or with "ds30 loader" program on PC?

Thank You for helping me.

Best regards,
tyralek.
Reply
#2
Here, is my configured firmware.


Attached Files
.zip   ds30_PIC24F_bootloader.zip (Size: 56.65 KB / Downloads: 31)
Reply
#3
Please activate advanced mode (View menu) and the debug mode (Options menu)
and post the result download result.
Reply
#4
Hi,

As You want, I run:
Code:
ds30LoaderConsole.exe --file=project.hex --port=com1 --device=pic24f16ka102 --baudrate=9600 --write-program -l

for original firmware 0.9.4:
Code:
Initiating download...
    Opening port com1@9600
    Searching for bl .
    Found PIC24F16KA102 fw ver. 0.9.4
    Unknown firmware version
    Closing port
    Tx 1 byte / Rx 3 bytes / 0,1s

After changing fw version to 0.9.3 (only constant change in ds30loader.s)
Code:
Initiating download...
    Opening port com1@9600
    Searching for bl .
    Found PIC24F16KA102 fw ver. 0.9.3
    Bootloader placement: 4
    Bootloader size: 4
    Waiting for bootloader to be ready...ok
    Parsing hex-file...
        File timestamp: 2010-12-09 05:33:38
        Validating hex-file...ok
        Goto user app address: 0x2AFC
        User app address: 0x200
        Flash row 0 is used, 0x00 - 0x3F
        Flash row 1 is used, 0x40 - 0x7F
        Flash row 2 is used, 0x80 - 0xBF
        Flash row 3 is used, 0xC0 - 0xFF
        Flash row 4 is used, 0x100 - 0x13F
        Flash row 5 is used, 0x140 - 0x17F
        Flash row 6 is used, 0x180 - 0x1BF
        Flash row 7 is used, 0x1C0 - 0x1FF
        Flash row 8 is used, 0x200 - 0x23F
        Flash row 9 is used, 0x240 - 0x27F
        Flash row 10 is used, 0x280 - 0x2BF
        Flash row 11 is used, 0x2C0 - 0x2FF
        Flash row 12 is used, 0x300 - 0x33F
        Flash row 13 is used, 0x340 - 0x37F
        Flash row 14 is used, 0x380 - 0x3BF
        Flash row 15 is used, 0x3C0 - 0x3FF
        Flash row 16 is used, 0x400 - 0x43F
        Flash row 17 is used, 0x440 - 0x47F
        Flash row 18 is used, 0x480 - 0x4BF
        Flash row 19 is used, 0x4C0 - 0x4FF
        Flash row 20 is used, 0x500 - 0x53F
        Flash row 21 is used, 0x540 - 0x57F
        Flash row 22 is used, 0x580 - 0x5BF
        Flash row 23 is used, 0x5C0 - 0x5FF
        Flash row 24 is used, 0x600 - 0x63F
        Flash row 25 is used, 0x640 - 0x67F
        Flash row 26 is used, 0x680 - 0x6BF
        Flash row 27 is used, 0x6C0 - 0x6FF
        Flash row 28 is used, 0x700 - 0x73F
        Flash row 29 is used, 0x740 - 0x77F
        Flash row 30 is used, 0x780 - 0x7BF
        Flash row 31 is used, 0x7C0 - 0x7FF
        Flash row 32 is used, 0x800 - 0x83F
        Flash row 33 is used, 0x840 - 0x87F
        Flash row 34 is used, 0x880 - 0x8BF
        Flash row 171 is used, 0x2AC0 - 0x2AFF
        Bootloader start address: 0x2B00
        Bootloader start page: 172
        Bootloader end page: 175
        Bootloader start row: 172
        Bootloader end row: 175
        Hex-file successfully parsed

        1116 program words found in 36 rows
        0 Eeprom words found
        0 config words found
    Erasing page 0...ok
    Writing row 0...verification error,1 try
    Writing row 0...verification error,2 try
    Writing row 0...download failed
    Closing port
    Download finished
    Tx 313 bytes / Rx 8 bytes / 0,5s
Reply
#5
Thanks. There's an error in devices.xml. PIC24F devices don't have pages, only rows.
Open bin\devices.xml and search for PIC24F (not PIC24F) then replace
<hasPages>true</hasPages>
with
<hasPages>false</hasPages>

Please let us know if it works after the fix.


Btw, I'll fx 0.9.4 not being recognized to the next version.
Reply
#6
Hi,

as You write, I change the devices.xml
and it still do not work.

Code:
Press any key to begin download

Initiating download...
    Opening port com1@9600
    Searching for bl .
    Found PIC24F16KA102 fw ver. 0.9.3
    Bootloader placement: 4
    Bootloader size: 4
    Waiting for bootloader to be ready...ok
    Parsing hex-file...
        File timestamp: 2010-12-09 05:33:38
        Validating hex-file...ok
        Goto user app address: 0x2AFC
        User app address: 0x200
        Flash row 0 is used, 0x00 - 0x3F
        Flash row 1 is used, 0x40 - 0x7F
        Flash row 2 is used, 0x80 - 0xBF
        Flash row 3 is used, 0xC0 - 0xFF
        Flash row 4 is used, 0x100 - 0x13F
        Flash row 5 is used, 0x140 - 0x17F
        Flash row 6 is used, 0x180 - 0x1BF
        Flash row 7 is used, 0x1C0 - 0x1FF
        Flash row 8 is used, 0x200 - 0x23F
        Flash row 9 is used, 0x240 - 0x27F
        Flash row 10 is used, 0x280 - 0x2BF
        Flash row 11 is used, 0x2C0 - 0x2FF
        Flash row 12 is used, 0x300 - 0x33F
        Flash row 13 is used, 0x340 - 0x37F
        Flash row 14 is used, 0x380 - 0x3BF
        Flash row 15 is used, 0x3C0 - 0x3FF
        Flash row 16 is used, 0x400 - 0x43F
        Flash row 17 is used, 0x440 - 0x47F
        Flash row 18 is used, 0x480 - 0x4BF
        Flash row 19 is used, 0x4C0 - 0x4FF
        Flash row 20 is used, 0x500 - 0x53F
        Flash row 21 is used, 0x540 - 0x57F
        Flash row 22 is used, 0x580 - 0x5BF
        Flash row 23 is used, 0x5C0 - 0x5FF
        Flash row 24 is used, 0x600 - 0x63F
        Flash row 25 is used, 0x640 - 0x67F
        Flash row 26 is used, 0x680 - 0x6BF
        Flash row 27 is used, 0x6C0 - 0x6FF
        Flash row 28 is used, 0x700 - 0x73F
        Flash row 29 is used, 0x740 - 0x77F
        Flash row 30 is used, 0x780 - 0x7BF
        Flash row 31 is used, 0x7C0 - 0x7FF
        Flash row 32 is used, 0x800 - 0x83F
        Flash row 33 is used, 0x840 - 0x87F
        Flash row 34 is used, 0x880 - 0x8BF
        Flash row 171 is used, 0x2AC0 - 0x2AFF
        Bootloader start address: 0x2B00
        Bootloader start page: 172
        Bootloader end page: 175
        Bootloader start row: 172
        Bootloader end row: 175
        Hex-file successfully parsed

        1116 program words found in 36 rows
        0 Eeprom words found
        0 config words found
    Writing row 0...verification error,1 try
    Writing row 0...verification error,2 try
    Writing row 0...download failed
    Closing port
    Download finished
    Tx 307 bytes / Rx 7 bytes / 0,4s
Press any key to continue



Attached Files
.zip   devices.zip (Size: 4.41 KB / Downloads: 11)
.zip   ds30_GPS_bootloader.zip (Size: 53.37 KB / Downloads: 15)
Reply
#7
Please try and disable all fancy features such as watchdog, bor, code protection e.t.c.
Have you tried different chips/boards?
I don't have any PIC24F at hand so I cant do much testing.
Reply
#8
Hi again,
I got another report about write verification failing.
Could you please tell me what revision of the device you are using.
Reply
#9
Hello again,
Here's the solution, replace the following code
Code:
        ;----------------------------------------------------------------------        
        ; Erase & write row
        ;----------------------------------------------------------------------        
        ; Erase row
program:tblwtl    WADDR, [WADDR]        ;??? "Set base address of erase block", equivalent to setting nvmadr/u in dsPIC30F?
        mov        #0x4058, W0
        rcall    Write
        ; Load latches
        mov     #ROWSIZEW, WCNT
latlo:    tblwth.b     [WBUFPTR++], [WADDR]     ;upper byte
        tblwtl.b    [WBUFPTR++], [WADDR++]     ;low byte
        tblwtl.b    [WBUFPTR++], [WADDR++]     ;high byte    
        dec     WCNT, WCNT
        bra     nz, latlo
        ; Write row
        mov     #0x4004, W0        
        rcall     Write
Reply
#10
Hi,

Today I used Your Fixed PIC24F firmware from download page,
And everything seems to work perfectly.

Thank You for helping me.

Best regards,
tyralek.
Reply
#11
Thanks for the report!
Reply
#12
very well thanks all~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)