![]() |
no-OS
|
STM32 I2C2 platform setup for single-board loopback tests. More...
Functions | |
| int | i2c_platform_init (void) |
| void | i2c_platform_deinit (void) |
| void | i2c_platform_set_target_handle (struct capi_i2c_controller_handle *handle) |
| void | I2C2_EV_IRQHandler (void) |
| void | I2C2_ER_IRQHandler (void) |
STM32 I2C2 platform setup for single-board loopback tests.
CubeMX only generates MSP code for I2C1. This file configures I2C2 (clock source, GPIO, NVIC) so that the CAPI driver can initialise I2C2 as a target device. It also re-configures I2C1 pins with internal pull-ups required for the loopback wiring.
The I2C2 IRQ handlers dispatch through the CAPI isr function. The test must call i2c_platform_set_target_handle() after capi_i2c_init() so that the IRQ vectors can reach the correct controller handle.
Wiring: PB10 (I2C2_SCL) <-> PB6 (I2C1_SCL) PB11 (I2C2_SDA) <-> PB9 (I2C1_SDA)
Copyright (c) 2026 Analog Devices, Inc. SPDX-License-Identifier: BSD-3-Clause
| void I2C2_ER_IRQHandler | ( | void | ) |
| void I2C2_EV_IRQHandler | ( | void | ) |
| void i2c_platform_deinit | ( | void | ) |
| int i2c_platform_init | ( | void | ) |
| void i2c_platform_set_target_handle | ( | struct capi_i2c_controller_handle * | handle | ) |