這顆CHIP發現有個問題,就是燒錄問題,在programmer可以燒錄,但是轉換成Debug時候就不能燒錄,會出現這樣的Massage:
PK3Err0040: The target device is not ready for debugging.
Please check your configuration bit settings and program
the device before proceeding.
檢查之後是因為Spec上有寫到的問題
bit 3 ICESEL: In-Circuit Emulator/Debugger Communication Channel Select bit
1 = PGEC2/PGED2 pair is used
0 = PGEC1/PGED1 pair is used
bit 2 Reserved: Write ‘1’
bit 1-0 DEBUG<1:0>: Background Debugger Enable bits (forced to ‘11’ if code-protect is enabled)
11 = Debugger is disabled
10 = Debugger is enabled
01 = Reserved (same as ‘11’ setting)
00 = Reserved (same as ‘11’ setting)
原來燒錄問題是出現在這顆IC有2個燒錄方式,分別是
1. PGEC1; PGED1
2. PGEC2; PGEC2
要看當時的版子是選用哪一種方式去燒路,所以要去選擇Configure->Configuration Bit->ICESEL
要看一下線路圖,Spec預設值是PGEC2/PGED2
線路圖的話,
要看一下PIC32MX795F512,100隻腳位PGEC1/PGED1是在pin24(PGEC1),pin25(PGED1)
PGEC2/PGED2是在pin28(PGEC2),pin27(PGED2)
沒有留言:
張貼留言