LoginSignup
0

More than 3 years have passed since last update.

2019-10-06 LPC > LPCXpresso54628 > bug? > GPIO > 二入力の割込を認識しない

Last updated at Posted at 2019-10-06
動作環境
OS: Ubuntu 18.04 LTS
基板: LPCXpresso54628
IDE: MCUXpresso IDE v11.0.1 [Build 2563] [2019-09-01]

概要

  • GPIO割込のSDKサンプルgint.cがある
  • 一入力の割込: 正常動作
  • 二入力の割込: 認識しない

準備と実行

  1. Quickstart PanelからImport SDK example(s)... を選択
  2. driver_examples > gint を選択
  3. 他の設定はデフォルトのままとしてプロジェクトを作成
    • プロジェクト名(例: 191006_1100_GPIO_interrupt)
  4. gint.cをビルドして実行する
    • 一入力の割込(GINT0): SW2 > 正常動作
    • 二入力の割込(GINT1): SW3 or SW4 > 認識しない

SW3 or SW4のところをSW3だけにすると認識するため、SW3が壊れているということではなさそう。

SDK exampleで正常動作する環境と、異常動作になる環境があるのだろうか?

gint.c
/* Select one input, active low for GINT0 */
#define DEMO_GINT0_POL_MASK ~(1U << BOARD_SW2_GPIO_PIN)
#define DEMO_GINT0_ENA_MASK (1U << BOARD_SW2_GPIO_PIN)

/* Select two inputs, active low for GINT1. SW2 & SW3 must be connected to the same port */
#define DEMO_GINT1_POL_MASK ~((1U << BOARD_SW3_GPIO_PIN) | (1U << BOARD_SW4_GPIO_PIN))
#define DEMO_GINT1_ENA_MASK ((1U << BOARD_SW3_GPIO_PIN) | (1U << BOARD_SW4_GPIO_PIN))

関連

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0