paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paparazzi-devel] external interrupt with the chibios?


From: Chris
Subject: [Paparazzi-devel] external interrupt with the chibios?
Date: Thu, 27 May 2021 02:14:02 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi.

Is there any example of how to setup an external interrupt iwith chibios?

with libopencm3 i use

  rcc_periph_clock_enable(RCC_SYSCFG);
  rcc_periph_clock_enable(RCC_GPIOB);
  rcc_periph_clock_enable(RCC_GPIOB);

  gpio_mode_setup(GPIOB, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO5);
  //gpio_mode_setup(GPIOC, GPIO_MODE_INPUT, GPIO_PUPD_NONE, GPIO6);

  nvic_enable_irq(NVIC_EXTI9_5_IRQ);
  exti_select_source(EXTI5, GPIOB);
  //exti_select_source(EXTI6, GPIOC);
  exti_set_trigger(EXTI5, EXTI_TRIGGER_FALLING);
  //exti_set_trigger(EXTI6, EXTI_TRIGGER_RISING);
  exti_enable_request(EXTI5);
  //exti_enable_request(EXTI6);
  nvic_set_priority(NVIC_EXTI9_5_IRQ, 0x0F);

But with chibios i do';t know how to do it (but i am trying!)

Chris





reply via email to

[Prev in Thread] Current Thread [Next in Thread]