打印

STM8S I/O口中断有问题!

[复制链接]
5776|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
young_xyj|  楼主 | 2009-10-31 09:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
定义:GPIO_Init(PORT_D, GPIO_PIN_7, GPIO_MODE_IN_PU_IT);
EXTI_SetExtIntSensitivity(EXTI_PORT_GPIOD, EXTI_SENSITIVITY_FALL_ONLY);

@near @interrupt void EXTI_PORTD_IRQHandler (void)中始终产生不了中断?
难道资料有误还是芯片有问题?
沙发
cgha| | 2009-10-31 22:42 | 只看该作者
用过STM8S105的中断,没问题。看一下反汇编及初始化完的寄存器

使用特权

评论回复
板凳
Trylin| | 2009-11-1 16:27 | 只看该作者
中断向量地址填写了没?

使用特权

评论回复
地板
young_xyj|  楼主 | 2009-11-2 10:11 | 只看该作者
中断向量地址:
(void @near (*)())0x8200,
  _stext, /* RESET */
  
  (void @near (*)())0x8200,
  TRAP_IRQHandler, /* TRAP - Software interrupt */
  
  (void @near (*)())0x8200,
  TLI_IRQHandler, /* irq0 - External Top Level interrupt (TLI) */
  
  (void @near (*)())0x8200,
  AWU_IRQHandler, /* irq1 - Auto Wake Up from Halt interrupt */

  (void @near (*)())0x8200,
  CLK_IRQHandler, /* irq2 - Clock Controller interrupt */

  (void @near (*)())0x8200,
  EXTI_PORTA_IRQHandler, /* irq3 - External interrupt 0 (GPIOA) */

  (void @near (*)())0x8200,
  EXTI_PORTB_IRQHandler, /* irq4 - External interrupt 1 (GPIOB) */

  (void @near (*)())0x8200,
  EXTI_PORTC_IRQHandler, /* irq5 - External interrupt 2 (GPIOC) */

  (void @near (*)())0x8200,
  EXTI_PORTD_IRQHandler, /* irq6 - External interrupt 3 (GPIOD) */

  (void @near (*)())0x8200,
  EXTI_PORTE_IRQHandler, /* irq7 - External interrupt 4 (GPIOE) */

  (void @near (*)())0x8200,
  CAN_RX_IRQHandler, /* irq8 - CAN Rx interrupt */

  (void @near (*)())0x8200,
  CAN_TX_IRQHandler, /* irq9 - CAN Tx/ER/SC interrupt */

  (void @near (*)())0x8200,
  SPI_IRQHandler, /* irq10 - SPI End of transfer interrupt */

  (void @near (*)())0x8200,
  TIM1_UPD_OVF_TRG_BRK_IRQHandler, /* irq11 - TIM1 Update/Overflow/Trigger/Break interrupt */

  (void @near (*)())0x8200,
  TIM1_CAP_COM_IRQHandler, /* irq12 - TIM1 Capture/Compare interrupt */

  (void @near (*)())0x8200,
  TIM2_UPD_OVF_BRK_IRQHandler, /* irq13 - TIM2 Update/Overflow/Break interrupt  */

  (void @near (*)())0x8200,
  TIM2_CAP_COM_IRQHandler, /* irq14 - TIM2 Capture/Compare interrupt */

  (void @near (*)())0x8200,
  TIM3_UPD_OVF_BRK_IRQHandler, /* irq15 - TIM3 Update/Overflow/Break interrupt */

  (void @near (*)())0x8200,
  TIM3_CAP_COM_IRQHandler, /* irq16 - TIM3 Capture/Compare interrupt */

  (void @near (*)())0x8200,
  UART1_TX_IRQHandler, /* irq17 - UART1 Tx complete interrupt */

  (void @near (*)())0x8200,
  UART1_RX_IRQHandler, /* irq18 - UART1 Rx interrupt */

  (void @near (*)())0x8200,
  I2C_IRQHandler, /* irq19 - I2C interrupt */

  (void @near (*)())0x8200,
  UART2_TX_IRQHandler, /* irq20 - UART2/UART3 Tx interrupt */

  (void @near (*)())0x8200,
  UART2_RX_IRQHandler, /* irq21 - UART2/UART3 Rx interrupt */

  (void @near (*)())0x8200,
  ADC2_IRQHandler, /* irq22 - ADC1/ADC2 end of conversion interrupt */

  (void @near (*)())0x8200,
  TIM4_UPD_OVF_IRQHandler, /* irq23 - TIM4 Update/Overflow interrupt */

  (void @near (*)())0x8200,
  EEPROM_EEC_IRQHandler, /* irq24 - FLASH interrupt */

  (void @near (*)())0x8200,
  NonHandledInterrupt, /* irq25 - Reserved */

  (void @near (*)())0x8200,
  NonHandledInterrupt, /* irq26 - Reserved */

  (void @near (*)())0x8200,
  NonHandledInterrupt, /* irq27 - Reserved */

  (void @near (*)())0x8200,
  NonHandledInterrupt, /* irq28 - Reserved */

  (void @near (*)())0x8200,
  NonHandledInterrupt, /* irq29 - Reserved */
这个还有问题吗?

使用特权

评论回复
5
young_xyj|  楼主 | 2009-11-2 11:26 | 只看该作者
怎么没人回复?

使用特权

评论回复
6
young_xyj|  楼主 | 2009-11-2 12:24 | 只看该作者
解决了,问题的PD7是没有中断的,只有TIME1的中断

使用特权

评论回复
7
Trylin| | 2009-11-2 22:54 | 只看该作者
PD7是TLI中断

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

9

主题

30

帖子

1

粉丝