STM32F405 and non standard CS pin for SPI1

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
b0ba
Posts: 3
Joined: Thu Feb 25, 2021 10:49 am

STM32F405 and non standard CS pin for SPI1

Post by b0ba »

Hi All !
I have the STM32F405 board and non standard CS pin PC4 for SPI1. Is it possible it could be potential bug ?
I have MPU6000 connected to the STM32 and I can not read registers from MPU.
Will it work correctly in ChiBios ? I am not sure I understand correctly how this method is working here in my case. File: SPIDevice.cpp
bool SPIDevice::acquire_bus(bool set, bool skip_cs)
Thanks in advance for any help.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F405 and non standard CS pin for SPI1

Post by Giovanni »

Hi,

ChibiOS HAL can use any pin as CS, it is a normal GPIO, you need to configure it as output.

Giovanni
b0ba
Posts: 3
Joined: Thu Feb 25, 2021 10:49 am

Re: STM32F405 and non standard CS pin for SPI1

Post by b0ba »

Thank you very much for the fast answer. May be you have good tips how to diagnose or debug this issue ? For me is easy to add some messages to the console. Could you pls help to find correct place in SPI driver.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F405 and non standard CS pin for SPI1

Post by Giovanni »

Those C++ functions are not part of ChibiOS so cannot help there, where that code comes from? perhaps you should contact the author.

If you need help it is your interest to describe the problem in details and give all the required information, your description is too generic.

Giovanni
b0ba
Posts: 3
Joined: Thu Feb 25, 2021 10:49 am

Re: STM32F405 and non standard CS pin for SPI1

Post by b0ba »

I will try to follow from this cpp file to the source code of Chobios. Thanks you for the help.
Post Reply