Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ds30loader ok testboard- doesn't work in device [solved]
#1
I have gotten ds30loader working fine on test boards with pic24hj128gp502 and pic24fj256ga110. Both chips are running pll, the 24hj running at 4*7.375MHZ and the 24FJ at 4*8MHZ.

My actual device has both a 24hj128gp502 and a 24fj256gp106. The FJ chip in my device is 64 pins, whereas the one on the test board is 100 pins- otherwise the same chips.

I cannot get the gui to connect with the bootloader on either of the chips on my actual device.

On my actual device the 24HJ is running at 30 MhZ with a 30 MHz crystal and the 24FJ is running at 32 MHz with a 32 MHz crystal. Also
on my actual device VDD has ~ 200 usec risetime, whereas on the test boards the rise time is much faster.

I have done numerous tests, but in summary the results are:

The bootloaders are running in both chips, and if I put a sendL ‘D’ near the beginning in the .s file, I see the D sent repeatedly with no discernable delay using a terminal program. When I do the same thing on my test boards, I see the ‘D’ about every 3 seconds, and the GUI connects and bootloads fine, even with the ‘D’ being sent.

On my device, putting in strategic sendl’s in the .s file to trace whatis happening, the bootloader thinks it has an input on the uart that is not valid and completely bypasses the 3 sec delay and goes immediately to exit, where it then starts over.

I added the three bclr’s shown below in an attempt to get rid of any uart events that were present as the program started, but that made no difference. Possibly I’m leaving out something here. You can also see where I placed the sendl ‘D’.

;----------------------------------------------------------------------
; TX enable, make tx enable pin output and set to 0
;----------------------------------------------------------------------
.ifdef USE_TXENABLE
bclr TRISR_TXE, #TRISB_TXE
bclr LATR_TXE, #LATB_TXE
.endif
bclr UIFS, #URXIF ;clear uart received interrupt
bclr USTA, #OERR ; clears error bit AND clears data in urxreg
bclr USTA, #URXDA ; clear bit saying we have a uart value SendL 'D' ;

;------------------------------------------------------------------------------
; Receive hello
;------------------------------------------------------------------------------

I then went back to the original .s and settings.inc files for the 24HJ chip and changed only the pin assignments for my chip. I did not change the config’s, even using the internal oscillator as configured. It did not work (the GUI did not see it). I then added the sendl ‘D’ and found it was doing the same thing. The bootloader was running and sending the ‘D’, but bypassing the 3 sec wait.

I tried 9600 baud and again had the same result. I am always able to read the character it is sending, so the baud rate is OK.

It acts as if it is continuously getting input on the uart, or worse, reseting the chip.

I used MPLAB icd2 to program my applications, and everything works fine, including the uarts. I did have to clear buffers and interrupts before it would work with my programs, though.


I am using rp13 for transmit and rp14 for receive on the 24HJ. Below is the code I inserted in .s for this assignment.

; Transmit, map uart to pin b13 uart1 is 00011
bset RPOR6, #RP13R0 ;xxx
bset RPOR6, #RP13R1 ;xxx
bclr RPOR6, #RP13R2 ;xxx
bclr RPOR6, #RP13R3 ;xxx
bclr RPOR6, #RP13R4 ;xxx

I am stumped. Any help would be appreciated.
Reply


Messages In This Thread
ds30loader ok testboard- doesn't work in device [solved] - by Donheli - 2011-05-04, 21:26:54

Forum Jump:


Users browsing this thread: 1 Guest(s)