Skip to content

Add STM32 CAPI peripherals implementation#3090

Open
cristina-suteu wants to merge 10 commits into
mainfrom
staging/capi-stm32
Open

Add STM32 CAPI peripherals implementation#3090
cristina-suteu wants to merge 10 commits into
mainfrom
staging/capi-stm32

Conversation

@cristina-suteu
Copy link
Copy Markdown
Collaborator

Pull Request Description

This PR adds CAPI based implementations to several STM32 platform drivers: GPIO, DMA, IRQ, I2C, SPI, UART and TIMER.
An example with minimal to no external hardware connections is provided. The example uses an IOC that targets the NUCLEO-F76ZI board.

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)

PR Checklist

  • I have followed the Coding style guidelines
  • I have complied with the Submission Checklist
  • I have performed a self-review of the changes
  • I have commented my code, at least hard-to-understand parts
  • I have build all projects affected by the changes in this PR
  • I have tested in hardware affected projects, at the relevant boards
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe etc), if applies

dbogdan and others added 3 commits December 11, 2025 11:37
Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
add latest implementations for c-api

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
added uart receive implementation
added error check in uart transmit
fixed uart denit

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
static GPIO_TypeDef *get_gpio_port_from_identifier(uint64_t identifier)
{
/* If identifier looks like a base address, use it directly */
if (identifier >= 0x40000000)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this is likely correct on what you tested, but will fail on other targets, so I think we need to decide on a more reasonable number for the comparison here, it has to be smaller like 256 or 1024 or something like that

added initial capi based implementation of stm32 gpio driver

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
add initial capi based implementation for stm32 dma

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
added initial capi based imlementation for stm32 spi

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
added initial capi based implementation for stm32 i2c

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
added initial capi based implementation for stm32 irq
fiexd typo in capi_irq.h

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
added initial capi based implementation for stm32 timer

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
add example that tests the available CAPI implementations for stm32
tests without external hardware: gpio, dma, irq, timer, spi(loopback req)
to do: add proper i2c test with external hw

Signed-off-by: Cristina Suteu <cristina.suteu@analog.com>
@cristina-suteu
Copy link
Copy Markdown
Collaborator Author

v2:
stm32_capi_gpio: use 256 as comparision value for gpio port identifier

@buha
Copy link
Copy Markdown
Contributor

buha commented May 20, 2026

please fix astyle and drivers checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants