板上的各位前輩,小弟使用STVD開發STM8S103F3,使用C語言,使用仿真模式單步執行的時候發現卡在stm_interrupt_vector.c中的一個中斷function, @far @interrupt void NonHandledInterrupt (void) { /* in order to detect unexpected events during development, it is recommended to set a breakpoint on the following instruction */ return; } 主程式: main() { EnableInt; srand(0); delay(10000); GPIO_init(); CLK_ini(); TIM4_ini(); uart_ini(4800); for(i=0;i<=10;i++) { PC_ODR |= BIT7; //blink yellow LED delay(50000); PC_ODR &= ~BIT7; delay(50000); } PC_ODR |= BIT7; } 始終卡在中斷retuen;裡,導致我無法進行之後的動作,有版上的前輩們有遇過這種狀況或是處理方式嗎。 |
前輩您好 我有確認我的中斷配置
struct interrupt_vector const _vectab[] = {
{0x82, (interrupt_handler_t)_stext}, /* reset */
{0x82, trap_int}, /* trap Software interrupt*/
{0x82, NonHandledInterrupt}, /* irq0 TLI External top level interrupt*/
{0x82, NonHandledInterrupt}, /* irq1 AWU Auto wake up from halt*/
{0x82, NonHandledInterrupt}, /* irq2 CLK Clock controller*/
{0x82, NonHandledInterrupt}, /* irq3 EXTI0 Port A external interrupts*/
{0x82, NonHandledInterrupt}, /* irq4 EXTI1 Port B external interrupts*/
{0x82, NonHandledInterrupt}, /* irq5 EXTI2 Port C external interrupts*/
{0x82, NonHandledInterrupt}, /* irq6 EXTI3 Port D external interrupts*/
{0x82, NonHandledInterrupt}, /* irq7 EXTI4 Port E external interrupts*/
{0x82, NonHandledInterrupt}, /* irq8 */
{0x82, NonHandledInterrupt}, /* irq9 */
{0x82, NonHandledInterrupt}, /* irq10 SPI End of transfer*/
{0x82, NonHandledInterrupt}, /* irq11 TIM1 update/ overflow/underflow/ trigger/ break*/
{0x82, NonHandledInterrupt}, /* irq12 TIM1 capture/ compare*/
{0x82, NonHandledInterrupt}, /* irq13 TIM update/ overflow*/
{0x82, NonHandledInterrupt}, /* irq14 TIM capture/ compare*/
{0x82, NonHandledInterrupt}, /* irq15 TIM3 Update/ overflow*/
{0x82, NonHandledInterrupt}, /* irq16 TIM3 Capture/ compare*/
{0x82, NonHandledInterrupt}, /* irq17 */
{0x82, uart1_int}, /* irq18 UART1*/
{0x82, NonHandledInterrupt}, /* irq19 I2C I2C interrupt*/
{0x82, NonHandledInterrupt}, /* irq20 UART2 Tx complete*/
{0x82, NonHandledInterrupt}, /* irq21 UART2 Receive register DATA FULL*/
{0x82, NonHandledInterrupt}, /* irq22 ADC1 end of conversion/analog watchdog interrupt*/
{0x82, NonHandledInterrupt}, /* irq23 TIM update/ overflow*/
{0x82, NonHandledInterrupt}, /* irq24 Flash EOP/ WR_PG_DIS*/
{0x82, NonHandledInterrupt}, /* irq25 */
{0x82, NonHandledInterrupt}, /* irq26 */
{0x82, NonHandledInterrupt}, /* irq27 */
{0x82, NonHandledInterrupt}, /* irq28 */
{0x82, NonHandledInterrupt}, /* irq29 */
};
extern @far @interrupt void trap_int(void);
extern @far @interrupt void uart1_int(void);
我所宣告的中段都有對應到,可是一樣在仿真的時候還是會卡住