STM32F405 and non standard CS pin for SPI1

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

Moderators: RoccoMarco, barthess

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

STM32F405 and non standard CS pin for SPI1

Postby b0ba » Thu Feb 25, 2021 12:04 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM32F405 and non standard CS pin for SPI1

Postby Giovanni » Thu Feb 25, 2021 12:07 pm

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

Postby b0ba » Thu Feb 25, 2021 12:41 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: STM32F405 and non standard CS pin for SPI1

Postby Giovanni » Thu Feb 25, 2021 12:54 pm

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

Postby b0ba » Thu Feb 25, 2021 2:46 pm

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


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 24 guests