cancel
Showing results for 
Search instead for 
Did you mean: 

Is CubeMX the right way?

volker2
Associate II
Posted on November 16, 2016 at 09:20

Hi,

i am new to STM32 programming. I have to make a small program where the STM32L471 is the SPI master.

I tried the CubeMX to build a program for the Keil MDK. Seems to be ok. But when i call the transmit functions of the library with:    

HAL_SPI_TransmitReceive(&hspi1, u8Send, u8Receive, 6, 10000);

i can't see the clock or reactions on the MOSI. I saw that the signals change one time, but i can't see the the communication.

So my question was how you build new projects and what libs do you use? The CMSIS, the HAL or older things?

Best regards

Volker
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Walid FTITI_O
Senior II
Posted on November 16, 2016 at 15:04

Hi  kugler.volker, 

You would refer to the SPI example in STM32CubeL4 library ''SPI_FullDuplex_ComPolling'' at this path:

You can see code there and how transfer is implemented and apply on your CubeMx project.

For STM32Cube firmware library example , there is an application note for each Cube package' device series that illustrates the existing examples topics and packages. For STM32L4 refer to

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/09/77/32/19/96/59/4c/1e/DM00209748/files/DM00209748.pdf/jcr:content/translations/en.DM00209748.pdf

'' STM32Cube firmware examples for STM32L4 Series''

-Hannibal-