Page 1 of 1

STM32F405 and non standard CS pin for SPI1

Posted: Thu Feb 25, 2021 12:04 pm
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.

Re: STM32F405 and non standard CS pin for SPI1

Posted: Thu Feb 25, 2021 12:07 pm
by Giovanni
Hi,

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

Giovanni

Re: STM32F405 and non standard CS pin for SPI1

Posted: Thu Feb 25, 2021 12:41 pm
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.

Re: STM32F405 and non standard CS pin for SPI1

Posted: Thu Feb 25, 2021 12:54 pm
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

Re: STM32F405 and non standard CS pin for SPI1

Posted: Thu Feb 25, 2021 2:46 pm
by b0ba
I will try to follow from this cpp file to the source code of Chobios. Thanks you for the help.