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


Browsing this Thread:   1 Anonymous Users






Re: 5015 编译之后出现这种警告是什么原因?
#4
版主
版主


查看用戶資訊
PSV 的功能在 C30 的啟動模塊(crt1.o)裡就已經致能了,為避免你在中斷裡誤改或誤用了PSV的Page 或指標,所以加入了這個訊息。早期的 C30 版本是不檢查的,新版的 C30 就加了這個檢查的功能。

發表於: 2008/2/27 11:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 5015 编译之后出现这种警告是什么原因?
#3
新會員
新會員


查看用戶資訊
谢谢版主的指点。

但我还有一点不明白,为什么中断函数宣告里要加入no_auto_psv 的字眼,而其他的函数里不加就可以呢?

發表於: 2008/2/26 16:40
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 5015 编译之后出现这种警告是什么原因?
#2
版主
版主


查看用戶資訊
void __attribute__((interruptno_auto_psv)) _T1Interrupt(void)
{
    
IFS0bits.T1IF 0;        // clear interrupt flag
    
TMR0_Flag 1;
    
Count++;
    if (
Count==12Count=0;
    
//    LATBbits.LATB15 =!LATBbits.LATB15;            //Toggle LED4
}

void __attribute__((interruptno_auto_psv)) _T4Interrupt(void)
{

    
IFS1bits.T4IF //(_T4IF)

}


在中斷的函數宣告裡加入 no_auto_psv 的字眼,告訴編譯器說中斷裡我沒有使用PSV的功能。

發表於: 2008/2/26 14:18
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


5015 编译之后出现这种警告是什么原因?
#1
新會員
新會員


查看用戶資訊
程序如下:


//---------------------------------------------------------------------
// Include File
#include "p30f5015.h"

//---------------------------------------------------------------------
//Constant Definitions
//---------------------------------------------------------------------
#define NODE_VAL 1

//---------------------------------------------------------------------
// Variable declarations
//---------------------------------------------------------------------
unsigned char rev_buf[30]; // 接收缓冲区
unsigned char send_buf[40]; // 发送缓冲区

//---------------------------------------------------------------------
// Function Prototypes
//---------------------------------------------------------------------
void __attribute__((__interrupt__)) _T1Interrupt (void);
void __attribute__((__interrupt__)) _U1RXInterrupt(void);

//---------------------------------------------------------------------
// Timer1 Interrupt routine T1=100ms
//---------------------------------------------------------------------
void __attribute__((__interrupt__)) _T1Interrupt (void)
{
IFS0bits.T1IF = 0;
// 处理
}

//---------------------------------------------------------------------
// UART1 Interrupt Service Routine
//---------------------------------------------------------------------
void __attribute__((__interrupt__)) _U1RXInterrupt(void)
{
IFS0bits.U1RXIF = 0;
// 处理
}


int main(void)
{

}

编译之后总有这个警告,不知什么原因,请大家指点,谢谢!!!

aa.c: In function '_T1Interrupt':
aa.c:546: warning: PSV model not specified for '_T1Interrupt';
assuming 'auto_psv' this may affect latency
aa.c: In function '_U1RXInterrupt':
aa.c:636: warning: PSV model not specified for '_U1RXInterrupt';
assuming 'auto_psv' this may affect latency

發表於: 2008/2/26 10:54
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... ]

教育訓練中心

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