cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H563ZI : Create an Free-RTOS project for full duplex SPI communication

microcoder
Associate II

Greetings,

STM32CubeIDE newbie user here!

 

I have the above eval board, and would like to jumper SPI-A (master) to another (different) eval board (slave),

and run full duplex SPI transfers.

I have played with the Example (SPI_FullDuplex_CommIT_Master), and having trouble making it work.

I have so many questions but will start with a few of my most urgent.

 

1) In the manual for the NUCLEO eval board it says,

SPI_A_SCK (PA5) is CN7 pin 10.

The readme.md under the project says

CN6 pin 10

I assume one of them is a typo?

 

2) All of the SPI example projects that I have perused, set the SPI_A interface as follows:

hspi1.Init.NSS = SPI_NSS_SOFT;

I assume this means that I have to use a GPIO for the SPI chip select?

Why don't the examples ever use HARD_OUTPUT, is there an issue with using this mode?

 

3) Have tried many times to create my own projects, and failed, mostly due to me lack of experience with 

the CubeIDE.

Can someone suggest the correct procedure (please list all the steps) so that I can create

a new project for this eval board/microcontroller, which will result in the following:

- FreeRTOS (no bare metal)

- SPI-A Full Duplex driver installed

- UART3 driver installed (for printf)

 

4) Once a project has been instantiated, builds and executes, how can I add new files to the 'Src" directory

such that the IDE actually compiles them?

 

Thanks!

Ken

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

Hello @microcoder, welcome to ST Community 

>>I assume one of them is a typo?

Yes, as for all STM32H5 Nucleo-144 boards, there is CN7, CN8, CN9 and CN10, so in the Readme it should be: 

CLK Pin : PA5 (pin 10 on CN7 connector) instead of CN6 

SarraS_0-1714487092576.png

2) The hspi1.Init.NSS = SPI_NSS_SOFT setting configures the SPI to use software management for the slave select (NSS) signal. so you will manually control the NSS line using a GPIO pin in your code.

>> Why don't the examples ever use HARD_OUTPUT, is there an issue with using this mode? 

I was not aware of that, but I would say it's due to flexibility or to avoid potential limitations with the hardware NSS management maybe not being able to handle certain modes of operation or specific timing requirements.

3) To enable FreeRTOS, under Middleware, -in the integrated CubeMX- select FreeRTOS and configure it according to your needs

Please check the stm32cubeIDE user manual UM2609, section 3.4.2 "FreeRTOS" and the quick start guide UM2553.

4) The IDE should automatically compile the file that you add when you build your project. If it doesn't, check the file properties to see if the file is included in the build 

Hope that helps!

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Sarra.S
ST Employee

Hello @microcoder, welcome to ST Community 

>>I assume one of them is a typo?

Yes, as for all STM32H5 Nucleo-144 boards, there is CN7, CN8, CN9 and CN10, so in the Readme it should be: 

CLK Pin : PA5 (pin 10 on CN7 connector) instead of CN6 

SarraS_0-1714487092576.png

2) The hspi1.Init.NSS = SPI_NSS_SOFT setting configures the SPI to use software management for the slave select (NSS) signal. so you will manually control the NSS line using a GPIO pin in your code.

>> Why don't the examples ever use HARD_OUTPUT, is there an issue with using this mode? 

I was not aware of that, but I would say it's due to flexibility or to avoid potential limitations with the hardware NSS management maybe not being able to handle certain modes of operation or specific timing requirements.

3) To enable FreeRTOS, under Middleware, -in the integrated CubeMX- select FreeRTOS and configure it according to your needs

Please check the stm32cubeIDE user manual UM2609, section 3.4.2 "FreeRTOS" and the quick start guide UM2553.

4) The IDE should automatically compile the file that you add when you build your project. If it doesn't, check the file properties to see if the file is included in the build 

Hope that helps!

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you, much appreciated!

Ken