Shawn will absolutely go down in the history books.
@sumeetbhanjadeo59942 жыл бұрын
These are the best tutorials I have ever come across. You are doing a great contribution to the embedded community. Respect🙌
@LOLukeJamieson4 жыл бұрын
Love this series Shawn and digikey. Keep 'em coming!
@yosefgreen41872 жыл бұрын
Thank you for this useful tutorial. Maybe you do another one on Octo-SPI ? Some bookmarks: 1:51 3 lines SPI configuration! 2:53 daisy chain connection 8:41 note that you can use any gpio pin for your chip select line 9:55 full duplex master 10:45 the spi configuration. 12:44 read status register 13:58 wait until WIP bit is cleared 14:59 a way to do the code non-blocking 17:02 using: HAL_SPI_Transmit_IT() 18:38 HAL_SPI_TxCpltCallback()
@AlexEduardoRR3 жыл бұрын
OMG Shawn, I'm just using this now at work, you're a life saver!
@abutaymiyyahlectures3 жыл бұрын
what do u work as?
@Dazza_Doo Жыл бұрын
@@abutaymiyyahlectures mad scientist - Great Scott!
@ErikLevholt3 жыл бұрын
Great video. Good pace and explanations. Alot better than the guides ST offers. As for future videos something showing how to find and include 3rd party libraries would be good. And maybe combine that with a small graphic i2c OLED display to print text?
@antonello9883 ай бұрын
This is an EXCELLENT video. Bravissimo!
@javibaeza26443 жыл бұрын
Wow! I subscribed instantly after I watched your video. It´s amazing how you explain everything and so clear!
@paulrudman13494 жыл бұрын
Very helpful, especially because you show us how to print to the serial terminal in debug. Thank you!
@danpommerening34902 жыл бұрын
Thanks this helped me! I was able to eventually read a RTC chip in half duplex mode based off this example
@MichaelOldfield-dm2hk Жыл бұрын
Excellent tutorial. Thanks Shawn
@Auddy_s73958 ай бұрын
My problem is solved form this clip many thanks.
@Bravo_L4 ай бұрын
every dude i know named shawn is a fucking genius
@softelectronicsolutions53273 ай бұрын
informative and simple to use
@michaelallport2592 жыл бұрын
These videos are excellent, thank you!
@jamesgoacher16064 жыл бұрын
:-D :-D I am really glad you made that a simple explanation :-) :-). Sorry I was reminded of some small book from my past entitled RS232 Made Easy. It was 400 pages thick. Forgive me I need to go over it a few more times. Maybe I will want to use the SPI afterwards, maybe not. I also need to get some previous background material. I do not NEED to do these things od course, I am just curious. Regarding burning an EPROM: I made and partially wrote the program for a 2708 and 2716 eprom and to speed things up we used a more rapid burn cycle followed by a read for each bit, maybe byte untill the received equalled the sent then sent a few more burn cycles to make sure. The overall result was a MUCH shorter burn time. Please don't ask me for details it is 40+ yrs ago and more accomplished people did the majority of the work. I think I have come across the comercial version in my junk now and then. Not something Magpies throw away
@leoUFSJ12 жыл бұрын
Excellent tutorial ! Thanks a lot !
@tegu285010 ай бұрын
Very informative. Thank you.
@alfredorabago55372 жыл бұрын
very nice video, Thanks a lot!!!!! Can you show how to use I2C Slave using interruption or DMA in STM32 (non blocking method)
@JoJoNumbarOne Жыл бұрын
You have better video than stm
@ERVE744 жыл бұрын
Thank you! It is useful!
@ordnanceant22544 жыл бұрын
Very useful again any recommendations on which STM32 nucleo board which can be use with your trading demos / future videos CAN bus hint hint....😬
@RenegadeFury3 жыл бұрын
Great video thanks a lot. And if you get stuck like me where you keep getting 0 for your status register. Make sure you are using a pointer. e.g uint8_t spi_test2; HAL_SPI_Receive(&hspi1, (uint8_t *)&spi_test2, 1, 100); I forgot the &, and it caused some pain ;p
@mumbaiverve23073 жыл бұрын
Excellent video ! Thanks much Shawn. Is there any tutorial on the interrupt structure of STM32F103xxx ?
@rajeshn26002 жыл бұрын
Thanks for the useful tutorial. I just want to ask, what are the best options for TFT display (of at least 4" size) that I can interface with my STM32F401 Nucleo-64 board? Which interface would be better, SPI or parallel?
@carlosmartins73882 жыл бұрын
Very good.
@rickpercy874 жыл бұрын
Yes!
@barunbasnet2 жыл бұрын
Please do a video for CAN as well using HAL.
@abutaymiyyahlectures3 жыл бұрын
continue from 13:30
@goodwill76433 жыл бұрын
14:18 - You send command to read data from address 5. How EEPROM chip knows that you're expecting 3 bytes to receive, not 7 or 10? I assume that HAL_SPI_Receive command simply waits for data coming in or it is send some short commands as well to EEPROM? Thank you
@aaronartale Жыл бұрын
The eeprom will keep sending out bites starting from the address you gave it, as long as you keep the clock pulsing (and keep cs low)
@adaminsanoff4 жыл бұрын
I do not know why, but STM32CubeIDE 1.3.1 it does not show the baud rate when I select the prescaler.
@DavidTLutz2 жыл бұрын
Why does Fritzing diagram show 25LC040 but you paste in constants for 25AA040A?
@lockiecresswell46292 жыл бұрын
I am still confused. How do we use SPI2 and SPI3? How can we use them at the same time as SPI1? All my attempts seem to fail miserably, whereas SPI1 seems easy.
@dajianghe3 жыл бұрын
There are random spikes in my CS pin signal during HAL_SPI_Transmit operation. Do you know why?
@markusstaden2 жыл бұрын
I get 2 extra clock pulses on my very first transmit, all other transmits are fine. Do you have any idea, why this happens?
@varulven51438 ай бұрын
how to do uart configuration manually? in my ide it doesn't come prepared
@Jake_29038 ай бұрын
for some reason when I use this code and setup on my g474re using lpuart putty always displays nothing at all
@varulven51438 ай бұрын
i've got the same issue
@Jake_29038 ай бұрын
@@varulven5143 the baud rate was not set correctly in putty, check in cube MX what tje baud rate is set to and put the same into putty
@MichaelOldfield-dm2hk Жыл бұрын
Anyone else having problems using HAL_SPI_Transmit() and HAL_SPI_Receive() functions for STM32H753 (HAL version 1.11) ? The combined HAL_SPI_TransmitReceive() function works for me but not the individual ones
@khushwantmaan7917 ай бұрын
I want to use it with CRC, even I enabled it and then I'm intentionally writing wrong values but CRCERR flag is not set
@fatihe.13383 жыл бұрын
Can you explain how you can send dummy data and get garbage data via "Hal Function " ?
@daninwy26812 жыл бұрын
How do you get CubeMX to generate the SPI transmit/receive functions? It only generates to init.
@daninwy26812 жыл бұрын
OK, I'm using the STM32F100RB and the file is: \Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_spi.c and the function to use is: HAL_SPI_TransmitReceive().
@midhunkarthi60382 жыл бұрын
Can I send and receive data to 2 microcontroller ??
@manojsuryawanshi1334 Жыл бұрын
i am not able to read more than 256 bytes in externnal spi
@elmirqarayev95862 жыл бұрын
Can you make a video about Can Bus?
@freddycumana25714 жыл бұрын
fine!!!
@bennguyen13134 жыл бұрын
Why didn't you set the peripheral to automatically control CSN, instead of manually via GPIO? Is it because the CSN line goes goes tri-state when not in use, so without an external pull-up, the only workaround is to manually disable the hardware NSS and manually control it via a GPIO? And so if you are controlling CSN independently, when 'HAL_SPI_Transmit' returns is guaranteed that the transfer has completely finished, or is it possible that it returns, but the peripheral could still be clocking out data? I've also seem some very strange behavior in CubeMX entering User Labels.. after every entry, the caret seems to jump to the character before!
@minhdang65024 жыл бұрын
This is my 2 cents answer: 1. The hardware CSN is more for when your MCU in slave mode rather than master mode. Because you would get into scenario that needs to control multiple slaves with one SPI peripherals and obviously one hardware CSN is not enough. 2. The function is a polling function with a time wait arguments. It will returns HAL_OK if the peripherals is successfully transmitted the data and HAL_ERROR or HAL_BUSY otherwise (I think). So using this requires setting time good enough to wait the peripherals transmit the data. In basic scenerio like testing out the peripheral, using HAL_MAX_DELAY would suffice. Otherwise adding a bit of waiting would do too or even better, interrupts :))
@davidrathbone69783 жыл бұрын
Found it I was expecting a GIT link
@davidrathbone69783 жыл бұрын
and the code link is?
@ShawnHymel3 жыл бұрын
Apologies, as it looks like it's buried. It's labeled as "Related Project Link:" www.digikey.com/en/maker/projects/getting-started-with-stm32-how-to-use-spi/09eab3dfe74c4d0391aaaa99b0a8ee17
@kd4pba2 жыл бұрын
LOL here I thought SPI was a simple protocol.
@aaronartale Жыл бұрын
It's a pain in the ass
@DrKnow653 жыл бұрын
// Print out bytes read uart_buf_len = sprintf(uart_buf, "0xx 0xx 0xx ", (unsigned int)spi_buf[0], (unsigned int)spi_buf[1], (unsigned int)spi_buf[2]); HAL_UART_Transmit(&huart2, (uint8_t *)uart_buf, uart_buf_len, 100); The code on your website is broken, note the hex value characters. :)
@eos1d32 жыл бұрын
The interrupt version never works because the state machine is wrong. The codes always switch to state 1 and never goes to state 2, 3, 4 and 5. And the plus signs are missing here: for (int i = 0; i < 10; i ) { spi_buf[2 i] = i; } I think the code is never tested.