В процессе отладки контроллер не входит в обработчик прерывания PIT_Handler. Казалось бы, что после этого состояния (прерывание от PIT в AIC и PIT_MR):
Нажмите для просмотра прикрепленного файла
контроллер должен войти в обработчик
PIT_Handler, указанный здесь:
CODE
void PIT_Init(void){
volatile unsigned long pimr = 0,
svr = 0;
/* Configure a resolution of 1 ms */
AT91C_BASE_PITC->PITC_PIMR = AT91B_MASTER_CLOCK / (16 * 1000) - 1;
/* Enable interrupts */
/* Disable the interrupt on the interrupt controller */
AT91C_BASE_AIC->AIC_IDCR = (1 << AT91C_ID_SYS);
/* Save the interrupt handler routine pointer and the interrupt priority */
svr = (unsigned long)PIT_Handler;
AT91C_BASE_AIC->AIC_SVR[AT91C_ID_SYS] = svr;
/* Store the Source Mode Register */
AT91C_BASE_AIC->AIC_SMR[AT91C_ID_SYS] = AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL | AT91C_AIC_PRIOR_LOWEST;
/* Clear the interrupt on the interrupt controller */
AT91C_BASE_AIC->AIC_ICCR = (1 << AT91C_ID_SYS);
/* Enable the interrupt on the interrupt controller */
AT91C_BASE_AIC->AIC_IECR = (1 << AT91C_ID_SYS);
/* Enable the interrupt on the pit */
pimr = AT91C_BASE_PITC->PITC_PIMR;
AT91C_BASE_PITC->PITC_PIMR = pimr | AT91C_PITC_PITIEN;
/* Enable the pit */
pimr = AT91C_BASE_PITC->PITC_PIMR;
AT91C_BASE_PITC->PITC_PIMR = pimr | AT91C_PITC_PITEN;
}
Но по нажатию "Step Into" выполняется следующая команда и состояние регистров следующее:
Нажмите для просмотра прикрепленного файла
В чем может быть проблема?