Skip to content

Bluetooth: hci: spi: host doesn't work on targets which do not support level triggered interrupts #59459

@lucasdietrich

Description

@lucasdietrich

Bug Description
With zephyr v3.4, an application implementing an HCI HOST will constantly fail on targets which do not support GPIO level-triggered interrupts. However, this was working with versions of Zephyr prior to 3.3.

This change from edge to level-triggered interrupts was introduced in the following PR #57427 which addresses issue #53980.

Steps for Reproduction
To replicate the issue, build a Bluetooth sample configure as a HCI HOST (i.e. with CONFIG_BT_HCI=y, CONFIG_BT_SPI=y and CONFIG_BT_CTLR=n) on a board that doesn't support level-triggered GPIO interrupts (e.g., any stm32 board, nucleo -f429zi in my particular instance).

The problem arises when the host can't configure the IRQ pin as a level-triggered interrupt via gpio_pin_interrupt_configure_dt(&irq_gpio, GPIO_INT_LEVEL_ACTIVE); .

The stm32 driver explicitly tells level-triggered interrupts are not supported here.

Expected Result
HCI HOST should ideally be functional even with targets that don't support level-triggered interrupts.

Consequences
As it stands, the HCI HOST is incompatible with targets that don't support level-triggered interrupts.

Environment Details:

  • Linux Fedora 37
  • Zephyr v3.4.0
  • Zephyr SDK 0.16.1

Additional Information
I imagine that only few targets support level-triggered interrupts.
Consequently, it might be more effective to design the HCI driver with the assumption that only edge-triggered interrupts are supported.

While I haven't yet formulated a resolution, I plan to think about it.

Edit:
I edited my message to highlight that this issue was introduced by version 3.4 of zephyr.

Metadata

Metadata

Assignees

Labels

RegressionSomething, which was working, does not anymorearea: Bluetootharea: Bluetooth HCIBluetooth HCI DriverbugThe issue is a bug, or the PR is fixing a bugplatform: STM32ST Micro STM32priority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions