Skip to content

Missing SPI SCK on STM32F103vctx #43452

@calaghann

Description

@calaghann

Describe the bug
A custom board using stm32F103vctx MCU uses SPI1 with remaped sck pin pb3 does not output any clock signal. The SPI1 peripheral was used and configured with the stm vendor dts / dtsi. However once I tried to sent out some SPI commands using the stm spi driver I noticed that no spi clock signal is emitted on pb3 (using an oscilloscope). The other spi signals (MOSI, MISO and nCS on pb4, pb5 and pb8) are correctly pushed by the stm spi driver.
A quick implementation using only STM HAL produces the same register contents of the affected register banks GPIOB, AFIO, and SPI1. However using STM HAL the clock signal is emitted correctly on pb3.

To Reproduce
Steps to reproduce the behavior:

  1. Grab a plattform using a stm32F103 MCU (preferably stm32F103vctx)
  2. configure SPI1 in the dts e.g. like this
    pinctrl-0 = <&spi1_sck_master_pb3 &spi1_miso_master_pb4 &spi1_mosi_master_pb5>; cs-gpios = <&gpiob 8 (GPIO_ACTIVE_LOW)>; pinctrl-names = "default"; status = "ok";
  3. try to send something on SPI using stm spi driver and spi_transceive_dt
  4. measure spi clock on pb3 (e.g by using oscilloscope or logic analyzer)

Expected behavior
SPI communication with remapped Pins pb3, pb4 and pb5 is working

Impact
In that case no SPI communication can be established which is a show stopper on my board right now.

Environment (please complete the following information):

  • OS: Windows
  • Toolchain Zephyr SDK
  • Commit SHA 49d08c2

Metadata

Metadata

Assignees

Labels

bugThe 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