Re: 使用APP013 練習板 練習Bootloader
|
||||
---|---|---|---|---|
管理員
|
你好,
原因可能如下 : 因為在網站上的 Firmware 是新版本的 V1.3 版. 而 V1.3 版加入了以下對 Configuration 的設定. 這是不必要的而且會影響原來的 Configuration 設定. 現在可用的方法為把以下的程式片段用註解區塊 Mark 起來就 OK 了! 還有如果原來的 Boot Loader 不幸因此被毀掉了. 就重新 Import 在 C:\MCHPFSUSB\fw\_factory_hex\ 的 picdemfsusb.hex 然後重新 program 就行了 ! 但要注意的是 APP013 的 Oscillator 是 24 Mhz. 所以在 Configuration Bits 的設定中 , 96 Mhz PLL Prescaler 要設為 "Divide by 6" 再燒錄程式喔 :) #if defined(PIC18F4550_PICDEM_FS_USB) // Configuration bits for PICDEM FS USB Demo Board #pragma config PLLDIV = 5 // (20 MHz crystal on PICDEM FS USB board) #pragma config CPUDIV = OSC1_PLL2 #pragma config USBDIV = 2 // Clock source from 96MHz PLL/2 #pragma config FOSC = HSPLL_HS #pragma config FCMEN = OFF #pragma config IESO = OFF #pragma config PWRT = OFF #pragma config BOR = ON #pragma config BORV = 3 #pragma config VREGEN = ON //USB Voltage Regulator #pragma config WDT = OFF #pragma config WDTPS = 32768 #pragma config MCLRE = ON #pragma config LPT1OSC = OFF #pragma config PBADEN = OFF // #pragma config CCP2MX = ON #pragma config STVREN = ON #pragma config LVP = OFF // #pragma config ICPRT = OFF // Dedicated In-Circuit Debug/Programming #pragma config XINST = OFF // Extended Instruction Set #pragma config CP0 = OFF #pragma config CP1 = OFF // #pragma config CP2 = OFF // #pragma config CP3 = OFF #pragma config CPB = OFF // #pragma config CPD = OFF #pragma config WRT0 = OFF #pragma config WRT1 = OFF // #pragma config WRT2 = OFF // #pragma config WRT3 = OFF #pragma config WRTB = ON // Boot Block Write Protection #pragma config WRTC = OFF // #pragma config WRTD = OFF #pragma config EBTR0 = OFF #pragma config EBTR1 = OFF // #pragma config EBTR2 = OFF // #pragma config EBTR3 = OFF #pragma config EBTRB = OFF #elif defined(PIC18F87J50_FS_USB_PIM) // Configuration bits for PIC18F87J50 FS USB Plug-In Module board #pragma config XINST = OFF // Extended instruction set #pragma config STVREN = ON // Stack overflow reset #pragma config PLLDIV = 3 // (12 MHz crystal used on this board) #pragma config WDTEN = OFF // Watch Dog Timer (WDT) #pragma config CP0 = OFF // Code protect #pragma config CPUDIV = OSC1 // OSC1 = divide by 1 mode #pragma config IESO = OFF // Internal External (clock) Switchover #pragma config FCMEN = OFF // Fail Safe Clock Monitor #pragma config FOSC = HSPLL // Firmware must also set OSCTUNE<PLLEN> to start PLL! #pragma config WDTPS = 32768 // #pragma config WAIT = OFF // Commented choices are // #pragma config BW = 16 // only available on the // #pragma config MODE = MM // 80 pin devices in the // #pragma config EASHFT = OFF // family. #pragma config MSSPMSK = MSK5 // #pragma config PMPMX = DEFAULT // #pragma config ECCPMX = DEFAULT #pragma config CCP2MX = DEFAULT //If using the YOUR_BOARD hardware platform (see usbcfg.h), uncomment below and add pragmas //#elif defined(YOUR_BOARD) //Add the configuration pragmas here for your hardware platform //#pragma config ... = ... #else #error Not a supported board (yet), make sure the proper board is selected in usbcfg.h, and if so, set configuration bits in __FILE__, line __LINE__ #endif
發表於: 2008/3/25 17:41
|
|||
|
Re: 使用APP013 練習板 練習Bootloader
|
||||
---|---|---|---|---|
中級會員
|
不好意思, 小弟借芋圓大的版面來問個問題...
小弟現在也在嘗試玩bootloader, 所用的版子也是APP013, 不過PIC用的是P18F4550, 所下載的工具套件包是en021827.exe. 小弟跟著app013_manual.pdf一步一步去試著載入bootloader跟DEMO, 初期還算順利, 不過到了D-6的f步驟, 小弟並沒有看到滑鼠在繞圈, 此時APP013LCD上面亮黃燈, 不知道是否是哪裡有操作錯誤了...請指教 另外, 關於芋圓大所提到的錯誤訊息, 小弟在操作D-6時有看到, 那是按下S3使APP013進入RESET時所出現的. 猜測應該是電腦的mchpusb.sys在此時並不能找到APP013, 因此出現錯誤視窗.不知道, 此看法對芋園大在debug有無幫助....
發表於: 2008/3/25 15:27
|
|||
|
Re: 使用APP013 練習板 練習Bootloader
|
||||
---|---|---|---|---|
高級會員
|
板大~錯誤貼上了!救救我吧~~囧rz
發表於: 2008/1/28 14:46
|
|||
|
Re: 使用APP013 練習板 練習Bootloader
|
||||
---|---|---|---|---|
高級會員
|
發表於: 2008/1/25 14:44
|
|||
|
Re: 使用APP013 練習板 練習Bootloader
|
||||
---|---|---|---|---|
版主
|
燒錄時出現何種錯誤? 貼上來看看。
發表於: 2008/1/25 14:07
|
|||
|
使用APP013 練習板 練習Bootloader
|
||||
---|---|---|---|---|
高級會員
|
我是使用 站上提供的
http://www.microchip.com.tw/uploads/app013_manual.pdf APP013 USB 實驗板使用手冊 裡面有提到 叫我下載en021826.zip 解開後 有BootLoader 的Demo 我使用它提供的 picdemfsusb.hex把它直接拿來燒錄後~連接usb 啟用bootloader燒錄 沒問題! 於是 我想用它提供的 code (MCHPFSUSB\fw\Boot)來改一下進入bootloader 模式的方法 目前我都還沒有改,可是我Complier完之後燒進去 可以用同樣的方式進去bootloader mode 但是在燒錄的時候會出現錯誤! 請問該怎麼解決呢!?
發表於: 2008/1/25 10:34
|
|||
|