cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F334 SPI

vishi100
Associate II
Posted on August 29, 2016 at 14:02

Hi! I am new to STM32 microcontrollers and SPI. I'm currently working on STM32F334R8T6 (Nucleo board 64-pin package) and need to configure it as spi full duplex master without crc for operating MAX31865 temperature sensor. I'm also confused about NSS. The chip select is high in idle state. Using the STM32Cube for configuring

Can I plz get an SPI sample code for this microcontroller either in polling or interrupt mode??

#stm32f334 #hal #spi #!stm32
6 REPLIES 6
slimen
Senior
Posted on August 29, 2016 at 15:15

Hi,

You can find a full set of running examples within the

http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-embedded-software/stm32cubef3.html

firmware package that can help you in SPI configuration.

This example shows how to ensure SPI Data buffer transmission and reception 

using Interrupt mode: STM32Cube_FW_F3_V1.6.0\Projects\STM32F334R8-Nucleo\Examples_LL\SPI\SPI_TwoBoards_FullDuplex_IT

You can also get inspiration from this example which shows how to ensure SPI data buffer transmission/reception in Polling mode between two boards:

\STM32Cube_FW_F3_V1.6.0\Projects\STM32F303RE-Nucleo\Examples\SPI\SPI_FullDuplex_ComPolling

Regards

vishi100
Associate II
Posted on August 30, 2016 at 07:30

Thanks a lot :)

Posted on December 17, 2016 at 15:30

I'm also trying to get SPI working with a MAX31865.  Did you get this working?  Can you share your code?

vishi100
Associate II
Posted on December 17, 2016 at 20:37

@Brian Beardmore -

I have interfaced MAX31865 with STM32F334 in polling method. My code is in Github. Here is the link to the repo -

/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FVishi100%2FSTM32F334_MAX31865

Manuel Martins
Associate
Posted on March 17, 2017 at 10:56

Bonjour from France,

I'm also trying to get SPI working with a MAX31865 with STM34F407 Discovery card with the STM standard libraries or HAL .Does anyone get this working?

I use COOCOX and ECLIPSE

I just begin in a project to reed temperature with a PT100 probe, I try to use this example

/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FVishi100%2FSTM32F334_MAX31865

but not working in F407 cpu

Thanks for your help

Manuel

Posted on July 13, 2017 at 16:47

Hi b_u.vishal,

I followed your instructions using cubemx but when I build the code or the empty one from cubemx, I get the message that the type is unknown for:

SPI_HandleTypeDef hspi1;

UART_HandleTypeDef huart2;

unknown type name 'SPI_HandleTypeDef' main.c

unknown type name 'UART_HandleTypeDef' main.c

This causes one error after the other...

Do you have an idea what I can do?

The program has access to the libraries.

Thank you for your help!