Shawn will absolutely go down in the history books.
@sumeetbhanjadeo5994
2 жыл бұрын
These are the best tutorials I have ever come across. You are doing a great contribution to the embedded community. Respect🙌
@Archnemesis88
21 күн бұрын
This series is gold, thank you for making this
@LOLukeJamieson
4 жыл бұрын
Love this series Shawn and digikey. Keep 'em coming!
@ErikLevholt
4 жыл бұрын
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?
@yosefgreen4187
2 жыл бұрын
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()
@danpommerening3490
3 жыл бұрын
Thanks this helped me! I was able to eventually read a RTC chip in half duplex mode based off this example
@AlexEduardoRR
3 жыл бұрын
OMG Shawn, I'm just using this now at work, you're a life saver!
@abutaymiyyahlectures
3 жыл бұрын
what do u work as?
@Dazza_Doo
Жыл бұрын
@@abutaymiyyahlectures mad scientist - Great Scott!
@paulrudman1349
4 жыл бұрын
Very helpful, especially because you show us how to print to the serial terminal in debug. Thank you!
@javibaeza2644
3 жыл бұрын
Wow! I subscribed instantly after I watched your video. It´s amazing how you explain everything and so clear!
@Auddy_s7395
9 ай бұрын
My problem is solved form this clip many thanks.
@antonello988
5 ай бұрын
This is an EXCELLENT video. Bravissimo!
@MichaelOldfield-dm2hk
Жыл бұрын
Excellent tutorial. Thanks Shawn
@Bravo_L
5 ай бұрын
every dude i know named shawn is a fucking genius
@softelectronicsolutions5327
4 ай бұрын
informative and simple to use
@jamesgoacher1606
4 жыл бұрын
:-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
@alfredorabago5537
2 жыл бұрын
very nice video, Thanks a lot!!!!! Can you show how to use I2C Slave using interruption or DMA in STM32 (non blocking method)
@michaelallport259
2 жыл бұрын
These videos are excellent, thank you!
@tegu2850
Жыл бұрын
Very informative. Thank you.
@leoUFSJ1
2 жыл бұрын
Excellent tutorial ! Thanks a lot !
@RenegadeFury
3 жыл бұрын
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
@mumbaiverve2307
3 жыл бұрын
Excellent video ! Thanks much Shawn. Is there any tutorial on the interrupt structure of STM32F103xxx ?
@ordnanceant
4 жыл бұрын
Very useful again any recommendations on which STM32 nucleo board which can be use with your trading demos / future videos CAN bus hint hint....😬
@barunbasnet
2 жыл бұрын
Please do a video for CAN as well using HAL.
@JoJoNumbarOne
Жыл бұрын
You have better video than stm
@ERVE74
4 жыл бұрын
Thank you! It is useful!
@carlosmartins7388
2 жыл бұрын
Very good.
@rajeshn2600
2 жыл бұрын
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?
@DavidTLutz
2 жыл бұрын
Why does Fritzing diagram show 25LC040 but you paste in constants for 25AA040A?
@markusstaden
2 жыл бұрын
I get 2 extra clock pulses on my very first transmit, all other transmits are fine. Do you have any idea, why this happens?
@lockiecresswell4629
2 жыл бұрын
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.
@varulven5143
10 ай бұрын
how to do uart configuration manually? in my ide it doesn't come prepared
@fatihe.1338
3 жыл бұрын
Can you explain how you can send dummy data and get garbage data via "Hal Function " ?
@dajianghe
3 жыл бұрын
There are random spikes in my CS pin signal during HAL_SPI_Transmit operation. Do you know why?
@Jake_2903
10 ай бұрын
for some reason when I use this code and setup on my g474re using lpuart putty always displays nothing at all
@varulven5143
9 ай бұрын
i've got the same issue
@Jake_2903
9 ай бұрын
@@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
@rickpercy87
4 жыл бұрын
Yes!
@adaminsanoff
4 жыл бұрын
I do not know why, but STM32CubeIDE 1.3.1 it does not show the baud rate when I select the prescaler.
@elmirqarayev9586
3 жыл бұрын
Can you make a video about Can Bus?
@khushwantmaan791
8 ай бұрын
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
@midhunkarthi6038
2 жыл бұрын
Can I send and receive data to 2 microcontroller ??
@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
@daninwy2681
2 жыл бұрын
How do you get CubeMX to generate the SPI transmit/receive functions? It only generates to init.
@daninwy2681
2 жыл бұрын
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().
@goodwill7643
3 жыл бұрын
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)
@manojsuryawanshi1334
2 жыл бұрын
i am not able to read more than 256 bytes in externnal spi
@nagahemachandchinta5498
Ай бұрын
Every time it transmits, does it transmit data to all the slaves one after the another?
@freddycumana2571
4 жыл бұрын
fine!!!
@davidrathbone6978
4 жыл бұрын
Found it I was expecting a GIT link
@bennguyen1313
4 жыл бұрын
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!
@minhdang6502
4 жыл бұрын
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 :))
@davidrathbone6978
4 жыл бұрын
and the code link is?
@ShawnHymel
4 жыл бұрын
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
@abutaymiyyahlectures
3 жыл бұрын
continue from 13:30
@DrKnow65
3 жыл бұрын
// 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. :)
@kd4pba
2 жыл бұрын
LOL here I thought SPI was a simple protocol.
@aaronartale
Жыл бұрын
It's a pain in the ass
@eos1d3
2 жыл бұрын
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.
Пікірлер: 62