Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ds33FJ256GP710 on Explorer 16 board [solved]
#2
Hi,

it seems i fixed the problem. I added this:

;Place the New Oscillator Selection (NOSC=0b111) in W0
MOV #0x17, W0
;OSCCONH (high byte) Unlock Sequence
MOV #OSCCONH, w1
MOV #0x78, w2
MOV #0x9A, w3
MOV.B w2, [w1] ; Write 0x78
MOV.B w3, [w1] ; Write 0x9A
;Set New Oscillator Selection
MOV.B WREG, OSCCONH
; Place 0x01 in W0 for setting clock switch enabled bit
MOV #0x01, w0
;OSCCONL (low byte) Unlock Sequence
MOV #OSCCONL, w1
MOV #0x46, w2
MOV #0x57, w3
MOV.B w2, [w1] ; Write 0x46
MOV.B w3, [w1] ; Write 0x9A
; Enable Clock Switch
MOV.B w0, [w1] ; Request Clock Switching by Setting OSWEN bit
wait:
btsc OSCCONL, #OSWEN
bra wait

copy/pasted Code Example for Clock Switching from 07. Oscillator - dsPIC33F FRM.pdf into
; User specific entry code area

Now application with XT_PLL switched on works and Loader works normally.

Dmitri
Reply


Messages In This Thread
RE: ds33FJ256GP710 on Explorer 16 board - by dts - 2011-04-10, 15:39:52
RE: ds33FJ256GP710 on Explorer 16 board - by coolj - 2012-06-25, 19:47:17

Forum Jump:


Users browsing this thread: 1 Guest(s)