pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleOS

  • Overview
  • Start here
    • Getting started guide
  • Pebble Firmware
    • Overview
    • Playground
    • Application SDK
  • Development
    • The pbl CLI
    • Build system
    • Samples
    • Emulator and simulator
    • Testing
    • Debugging
    • Conventions
  • System
    • Architecture overview
    • Kernel
    • Drivers
      • Device model
      • Simulators
      • Buses and I/O
      • Clocks, power and timing
      • Memory and storage
      • Display and graphics
      • Sensors and input
      • Audio and haptics
      • Power supply
      • System
    • Subsystems
    • Libraries
    • Third-party
  • Hardware
    • Boards
    • Board Add-ons
    • Programmers
  • Community
    • Contribution Guidelines
  • Reference
    • Reference
    • Kconfig options

Hardware spinlock

A hardware spinlock serializes processors that share registers or memory, where an interrupt lock only serializes the code of one. A consumer takes its lock from a devicetree hwlocks entry and holds it, with interrupts locked, around the accesses it shares. Without an entry, taking it only locks interrupts. Locks work before their controller is initialized, as for the pins of an early console.

Directory

drivers/hwspinlock

Header

pbl/drivers/hwspinlock.h

Kconfig

CONFIG_HWSPINLOCK, selected by the drivers and code that use it

API

API reference

A holder keeps a lock for a few register accesses. A processor waiting for longer than CONFIG_HWSPINLOCK_TIMEOUT_US gives up with -ETIMEDOUT: the holder stopped with it.

Drivers

Driver

Compatible

Kconfig

STM32H7 hardware semaphores

st,stm32-hwspinlock

CONFIG_HWSPINLOCK_STM32_HSEM

Users

Driver

Shares

STM32 pin controller and GPIO

Port registers, between the cores of an STM32H747

STM32 GPIO and RTC

EXTI triggers and their routing in the SYSCFG, between the cores of an STM32H747

Generated from PebbleOS 013613c8a. This page is maintained in the pebbleos repository: docs/drivers/hwspinlock.md.

Overview

  • Drivers
  • Users