Цитата(GetSmart @ Jan 21 2009, 13:29)

Телепатически трудно угадать что Вы как новичёк забыли сделать.
Версия №1
Забыли записать VICVectAddr = 0 в конце прерывания для сброса приоритетов в VIC ?
все прерывания сделаны следующим образом (в соответствии с портом FreeRTOS):
usb_isr.s79
Код
RSEG ICODE:CODE
CODE32
EXTERN vUSB_ISR
PUBLIC vUSB_ISREntry
vUSB_ISREntry:
portSAVE_CONTEXT ; Save the context of the current task.
LDR R0, =vUSB_ISR
mov lr, pc
BX R0
portRESTORE_CONTEXT ; Restore the context of the current task -
; which may be different to the task that
; was interrupted.
END
usb_main.c
Код
BOOL USB_isr()
{
if (USBINTS & 0x00000008)
{
u32 int_status = HCINTERRUPTSTATUS;
u32 ie_status = HCINTERRUPTENABLE;
if (!(int_status & ie_status))
return FALSE;
else
{
int_status = int_status & ie_status;
if (int_status & OR_INTR_STATUS_RHSC)
{ /* Root hub status change interrupt */
if (HCRHPORTSTATUS1 & OR_RH_PORT_CSC)
{
if (HCRHPORTSTATUS1 & OR_RH_PORT_CCS)
HOST_RhscIntr = 1;
else
HOST_RhscIntr = 0;
HCRHPORTSTATUS1 = OR_RH_PORT_CSC;
}
if (HCRHPORTSTATUS1 & OR_RH_PORT_PRSC)
HCRHPORTSTATUS1 = OR_RH_PORT_PRSC;
}
if (int_status & OR_INTR_STATUS_WDH) // Writeback Done Head interrupt
HOST_WdhIntr = 1;
HCINTERRUPTSTATUS = int_status; // Clear interrupt status register
}
}
return FALSE; // context switch?
}
// ********************************************************************
// ********************************************************************
// USB ISR. This can cause a context switch
// The interrupt service routine - called from the assembly entry point.
extern "C" void vUSB_ISR( void );
void vUSB_ISR( void )
{
// If a task was woken by either a character being received or a character
// being transmitted then we may need to switch to another task.
portEND_SWITCHING_ISR(USB_isr());
// End the interrupt in the EIC
VICADDRESS = 0; // clear interrupt
}
Цитата(aaarrr @ Jan 21 2009, 13:31)

Проверьте, всегда ли VIC сбрасывается записью в VICVecAddr по окончании обслуживания прерывания.
сбрасывается вроде бы всегда. но вообще, я не совсем понимаю этот механизм, в даташите написано очень коротко и расплывчато, что подразумевается под "в конце прерывания", можно ли считать точку перед выполнением portRESTORE_CONTEXT концом прерывания?