Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p24FJ64GB004 verification error [solved]
#1
Hi!
ds30 Loader finds loader FW: Found "PIC24FJ64GB004 fw ver. 4.0.3", but attempted code write fails with:

Initiating write...
Opening port USB Serial Port (COM3)@9600
Searching for bl . . . .
Found PIC24FJ64GB004 fw ver. 4.0.3
Bootloader placement/size: 2/1
Waiting for the boot loader to be ready...ok
Hex file successfully parsed in 0ms
Writing flash....
Erasing page 0 @ 0x0000...ok
Writing row 0 @ 0x0000...verification error, try 1, verification error, try 2, write failed
Write flash failed
Closing port
Tx 604 bytes / Rx 8 bytes / 2.5s
Write failed

Writes fails always with slite variation in Tx bytes 604..611.

I tried two boards, that perfectly work with Microchip USB bootloader with FRC_PLL clock.
I also tried ds30 Loader with plain FRC clock at 4MHz and FRCPLL at 16 MHz. In both cases BL FW is found, but write fails. It could not be clock accuracy, because it is good enough for USB. Both boards are identical, have LDO Vsupply, 10uF ceramic capacitor on Vcap.

settings.inc modifications, FRC version:
.equ __24FJ64GB004, 1
.equiv FCY, 4000000
config __CONFIG2, POSCMOD_NONE & FNOSC_FRC & FCKSM_CSECMD & IESO_OFF & OSCIOFNC_OFF

user_code.inc:
mov #0xFFFF, W0 ; all pins digital
mov wreg, AD1PCFGL ;

; Receive, map pin to uart
mov #0x1F05, W0
mov W0, RPINR18 ; U1RXR = 0x05; // U1Rx <= RP5

; Transmit, map uart to pin
mov #0x0003, W0
mov W0, RPOR3 ; RP6R = PPS_U1TX; // U1Tx => RP6


Before PIC24FJ64GB004 i got the same code with appropriate modifications perfectly working with p24HJ64GP502 both with FRC and FRCPLL clocks.

ds30 Loader version: 2012-08-26
MplabX 1.41, xc16 1.10
Win XP SP3
And by the way the GUI crashed a couple of times with unknown error message, but not today yet.

Any suggestions?


Attached Files
.zip   src.zip (Size: 2.6 KB / Downloads: 16)
Reply
#2
Hi,
Thank you for the report. I was able to reproduce the write verification problem but not the GUI crash. Unfortunately the problem went away by itself after some testing.

My project and a screenshot is attached. I probably cannot help you anymore than that.


Attached Files Thumbnail(s)
   

.zip   firmware 16-bit.zip (Size: 31.9 KB / Downloads: 35)
Reply
#3
Hello,

Thanks for that example Mikael, that helped me understanding how to use it with the 24fj64gb004.
Reply
#4
Helped you with what?
What was the problem?
Reply
#5
I had trouble configuring the loader (i'm a novice in pic programming) for the p24FJ64GB004 but since your posted file was setted for that pic it helped me.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)