[an error occurred while processing this directive]
|
а) таблица векторов не там, где думаете.
б) прерывания запрещены в CSR.
в) прерывание замаскировано.
Вот куски кода:
инициализация
//........................
TIMER_Config far timer0_cfg = {
TIMER_CTL_RMK(
TIMER_CTL_INVINP_NO,
TIMER_CTL_CLKSRC_CPUOVR4,
TIMER_CTL_CP_PULSE,
TIMER_CTL_HLD_YES,
TIMER_CTL_GO_NO,
TIMER_CTL_PWID_ONE,
TIMER_CTL_DATOUT_0,
TIMER_CTL_INVOUT_NO,
TIMER_CTL_FUNC_GPIO),
TIMER_PRD_RMK(0x927B),
TIMER_CNT_RMK(0) };//........................
CSR=0x100; /* disable all interrupts */
IER=1; /* disable all interrupts except NMI */
ICR=0xffff; /* clear all pending interrupts */
ISTP=0x80000000; /* Set new base of IST - vectors.asm linked to 0x80000000*/
CSL_init();
CACHE_reset();
CACHE_setL2Mode(CACHE_48KCACHE);
CACHE_invalidate(CACHE_L1PALL,(void*)0,0);
CACHE_invalidate(CACHE_L1DALL,(void*)0,0);
CACHE_enableCaching(CACHE_CE00);
//..........................
hTimer = TIMER_open(0,TIMER_OPEN_RESET);
TIMER_config(hTimer,&timer0_cfg);TIMER_start(hTimer);
//...........................ICR = IFR | 0x4100;
IER |= 0x4102;
CSR |= 1;//--........................
void interrupt timer0_isr(void)
{
ULONG i;flg1=1;
if (++icnt>99) {
icnt=0;
for (i=0; i<64; i++) {
qued[i].fPkt=1;
}
}}
vectors.asm :
RESET_RST:
mvkl .S2 _c_int00, B0
mvkh .S2 _c_int00, B0
B .S2 B0
NOP
NOP
NOP
NOP
NOP
NMI_RST:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPRESV1:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPRESV2:
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT4: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT5: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
INT6: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT7: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT8: b _edma_isr1
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT9: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT10: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT11: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT12: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT13: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT14: b _timer0_isr
NOP
NOP
NOP
NOP
NOP
NOP
NOPINT15: NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
E-mail: info@telesys.ru