• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 30F4011 一直reset
#4
版主
版主


查看用戶資訊
Address Error 主要發生的原因 :

1. 16-bit 的資料運算獲頒一一定要使用偶數位址,如定到碁數位址就會出錯。但使用 Byte 運算就無此限制。

2. 到不存在的空間去抓資料, 這種錯誤對ROM & RAM 都適用。

3. PSV 功能沒打開就去抓取 0x8000 ~ 0xFFFE 的資料。

目前就只想到這三種,是否還有網友要補充?

發表於: 2008/3/14 16:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 30F4011 一直reset
#3
中級會員
中級會員


查看用戶資訊
Hi Ryang 大大 :

我測試的結果的確是 _AddressError 只是不知道為什麼會發生,及如何預防,因為是利用範例修改進行測試

發表於: 2008/3/14 16:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 30F4011 一直reset
#2
版主
版主


查看用戶資訊
最有可能發生了 Address Error 的中斷了 (NMI) 因為沒有對該向量作楚哩,Default 就會到 0x000000 的RESET位置執行。
所以加入 void _ISR _AddressError(void) 的函數來攔截 Address Error 的中斷。
/* Function Prototypes */
void _ISR _OscillatorFail(void);
void _ISR _AddressError(void);
void _ISR _StackError(void);
void _ISR _MathError(void);
void _ISR _AltOscillatorFail(void);
void _ISR _AltAddressError(void);
void _ISR _AltStackError(void);
void _ISR _AltMathError(void);


/* ************************************************************** */
/* Standard Exception Vector handlers if ALTIVT = 0, INTCON2<15> */
/* ************************************************************** */

void _ISR _OscillatorFail(void)
{

    
INTCON1bits.OSCFAIL 0;
    while(
1);     
}

void _ISR _AddressError(void)
{

    
INTCON1bits.ADDRERR 0;
    while(
1);     
}

void _ISR _StackError(void)
{

    
INTCON1bits.STKERR 0;
    while(
1);     
}

void _ISR _MathError(void)
{

    
INTCON1bits.MATHERR 0;
    while(
1);     
}
ICD2執行後按下 Halt 就知道是脽卡住了。

發表於: 2008/3/14 15:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


30F4011 一直reset
#1
中級會員
中級會員


查看用戶資訊
使用APP020 demo board 及30F4011 利用C30_Peripheral_Modules中修改mpwm中的程式,來測試部份功能所需要的程式,可是不知道為什麼程式program後一直reset,因使用不少中斷但是有設定巢狀中斷可是一樣reset,而且中斷優先權也規劃過了,因之前使用18F時未碰過16BIT產品處於剛剛上手階段,不知是硬體設定還是軟體有問題

發表於: 2008/3/14 15:40
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------