STM32CubeMX basics: 11.3 STM32Cube HAL labs SPI - Lab SPI DMA

  Рет қаралды 26,324

STMicroelectronics

STMicroelectronics

5 жыл бұрын

This lecture is part of the MOOC - STM32CubeMX and STM32Cube HAL basics • MOOC - STM32CubeMX and...
Please see below hands-on mandatory pre-requisites and additional links.
Hands-on technical pre-requisites:
- PC with admin rights running Windows 7 or higher
- STM32 nucleo kit NUCLEO-F401RE www.st.com/en/evaluation-tool...
- Mini USB cable
- Java JRE www.oracle.com/technetwork/jav...
- STM32CubeMX www.st.com/en/development-too...
- STM32CubeF4 firmware www.st.com/en/embedded-softwa...
- ST-LINK USB driver www.st.com/en/development-too...
- A development IDE, either IAR, Keil, Atollic or SW4STM32
MOOC slideset: drive.google.com/open?id=1H2O...
MOOC lab archive: drive.google.com/open?id=1R59...
MOOC lab documentation: drive.google.com/open?id=18v5...
Additional references:
- UM1724 NUCLEO-F401RE user manual www.st.com/resource/en/user_m...
- UM1718 STM32CubeMX user manual www.st.com/resource/en/user_m...
- Additional information on How to use SWO to print information from STM32 drive.google.com/open?id=1Xv0...
Tell us what do you think about this MOOC through anonymous survey: www.surveymonkey.com/r/TTB3TYM

Пікірлер: 28
@Andrei424M
@Andrei424M 3 жыл бұрын
Wonderful tutorials! You have my appreciation!
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Glad you like them!
@J.Amaral
@J.Amaral 4 жыл бұрын
I was having problems, without DMA worked but using DMA no, on the cubeide, the problem was the missing "HAL_SPI_MspInit(&hspi1);", it wasn't done on the build! It may help someone so here it is! Cheers!
@paulopecegueiro1694
@paulopecegueiro1694 4 жыл бұрын
Hi I had the same fucking problem, I spent 4 days trying to understand what was wrong... Is that a bug in STM32CUBEIDE? We must report this issue. Thank you!
@elijohua
@elijohua 4 жыл бұрын
Oh man, you absolute lifesaver, it wasn't working for me either until I added that line of code. Must be a bug in CUBEIDE. Thank you!
@sarabelhajyahya6657
@sarabelhajyahya6657 4 жыл бұрын
Hello julio can you please tell us where should we put "HAL_SPI_MspInit(&hspi1);"
@muhammedemintanik255
@muhammedemintanik255 5 ай бұрын
Thank you
@andriitkach5259
@andriitkach5259 4 жыл бұрын
We have IRQ handlers from DMA interrrupts, however we implement the callback from SPI interrupt? A bit confusing...
@edwardsoto3279
@edwardsoto3279 4 жыл бұрын
i love this videos
@klaus9503
@klaus9503 2 жыл бұрын
How is the SPI CS handled?
@bennguyen1313
@bennguyen1313 4 жыл бұрын
If a SPI port has multiple SS pins that can be used (PE4, PE11, etc), the main.c's MX_SPI4_Init() enables /disables the SS: hspi4.Init.NSS = SPI_NSS_HARD_OUTPUT; hspi4.Init.NSS = SPI_NSS_SOFT; However it's in the stm32h7xx_hal_msp.c file (HAL_SPI_MspInit()) that defines *WHICH* SSN pin to use!! But is it possible to enable SS (SPI_NSS_HARD_OUTPUT), but *IN-ADDITION* manually take control of the pin like HAL_GPIO_WritePin (SPI4_NSS_GPIO_Port, SPI4_NSS_Pin, 0);
@widsawaka
@widsawaka 2 жыл бұрын
I try to use HAL_SPI function with the IC74HC165 but i can not receive the data. if you have experience about the CubeMX or example the source code, could you please share?
@sarpdaltaban
@sarpdaltaban 4 жыл бұрын
Could you give an example with separate RX and TX callbacks? Like: HAL_SPI_Receive_DMA(&hspi1, &receivedData, 1);
@tingt3496
@tingt3496 5 жыл бұрын
The NSS Pin need not set?
@LouisChouraki
@LouisChouraki 5 жыл бұрын
Personnally, if I reset it before HAL_Transmit_DMA and set it after, I have a wrong value. If I don't do this I have shifted-bytes value (the shift change when I reset), that's usually a problem when you don't set NSS pin. So... I think you have to but I don't know where to set and reset the pin. If you find it out, please let me know
@Graham1904
@Graham1904 4 жыл бұрын
Curious as to why you don't open the project after you generate code....
@stmicroelectronics
@stmicroelectronics 4 жыл бұрын
In case you had installed few different Eclipse based toolchains there were issues in older versions of STM32cubeMX to properly opening the proper IDE.
@user-bu5pb4bb5p
@user-bu5pb4bb5p Жыл бұрын
I am not receiving the data in STM32 cube id by using STM32H750B-DK board
@hossamalzomor3311
@hossamalzomor3311 3 жыл бұрын
Thanks for the lab, but I think SPI DMA example will not be complete without HW controlled NSS. in order for this lab to be useful , kindly consider repeating it with HW controlled NSS
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Hello! Visit our online community to share ideas with our developers and ST experts : community.st.com
@allhero4128
@allhero4128 3 жыл бұрын
how can i use the SRAM memory with HAL and Cubemx ??
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Hello! Visit our online community to find answers to your technical questions and share ideas with our developers and ST experts : community.st.com
@carlotacchella
@carlotacchella 3 жыл бұрын
tried on stm32cube ide on 19/9/20 and it worked on a nucleo f091rc.. be careful to connect on pin declared on .ioc pinout configuration listed on spi1 gpio settings and change SPI_DATASIZE_4BIT default to SPI_DATASIZE_8BIT
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Hello! Visit our online community to find answers to your technical questions and share ideas with our developers and ST experts : community.st.com
@_B_e_K_i_n_d_
@_B_e_K_i_n_d_ 4 жыл бұрын
it would be better if they showed how to do it with CMSIS
@paulg.3067
@paulg.3067 4 жыл бұрын
or with their LL libs
@cosmic9642
@cosmic9642 2 жыл бұрын
It would be easier to follow if you were showing your mouse cursor
@peterpan9638
@peterpan9638 3 жыл бұрын
STM, i'm not sure how much u work with microcontroller (u remark the sarcasm) but in my opinion you have 2 major bugs in your structure. Why did you designed the interrupt of UART and SPI to de deinit after it received the data?? Because that's what you do, you set the pointer to NULL. Why?? Also the second problem, why it is nessesary to receive a specific amount of bytes? If you communicate with uC via PC you don't know how many bytes you will receive, but that's what you have to know to make this interrupt work. Otherwise it won't call the callback untill you send the correct amount of bytes. After every com you have to reinit UART/SPI and set the correct amount of bytes beeing received. Thats not efficient neither usefull. It would be much better if you just reset the array number after the buffer end has reached and start from 0. Also an option for a message end command would be nice too. I can do all this on my own, but for the ppl out there without expirience it would be very helpfull.
STM32CubeMX basics: 12.1 STM32Cube HAL labs TIM - Lab TIM IT
10:43
STMicroelectronics
Рет қаралды 7 М.
STM32CubeMX basics: 11.1 STM32Cube HAL labs SPI - Lab SPI Poll
10:44
STMicroelectronics
Рет қаралды 28 М.
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 6 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
STM32CubeIDE basics - 10 ADC DMA TIM HAL lab
31:32
STMicroelectronics
Рет қаралды 58 М.
STM32CubeMX basics: 03.1 STM32CubeMX clock configuration tab - Basics
9:11
STMicroelectronics
Рет қаралды 29 М.
STM32CubeMX basics: 10.10 STM32Cube HAL labs UART - Lab UART IT
18:36
STMicroelectronics
Рет қаралды 12 М.
STM32 Tutorial - DMA to GPIO for fast bit patterns (2 MHz) stm32f103rb
9:22
STM32CubeMX basics: 13.1 STM32Cube HAL labs ADC - Lab ADC IT
21:51
STMicroelectronics
Рет қаралды 12 М.
STM32CubeMX basics: 10.11 STM32Cube HAL labs UART - UART DMA
16:14
STMicroelectronics
Рет қаралды 29 М.
SPI in STM32 interfacing ADXL 345 || LCD || CubeMX || HAL || SW4STM
12:12
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 5 МЛН
GamePad İle Bisiklet Yönetmek #shorts
0:26
Osman Kabadayı
Рет қаралды 540 М.