Great tutorial! Thanks. I especially liked the interrupt based transmit example. I've been spending many hours trying to get it to get to to work w/no success. this video solved the puzzle :)
@k.t.d.chathumisamaraweera9477
2 жыл бұрын
Thank You very much for sharing your knowledge...!!!
@psykjavier
5 жыл бұрын
this video have helped me, in my case , i had not enabled in NVIC the USART2 interrupt, hence , the fuction HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) was not triggered, thank you..!!
@psykjavier
5 жыл бұрын
you have won a subscriber..!!
@cristianorodriguesdasilva6107
2 жыл бұрын
Great! Have you ever worked with RS485? Could you make a video explaining about it?
@Abhishekkumar-vf8qe
5 жыл бұрын
Thanks for providing a great tutorial
@dryoutube5150
6 жыл бұрын
Awesome work can u provide a video on interfacing 10dof IMU with help of cubemx
@ravisoni2228
5 жыл бұрын
awesome video....heartly thanks
@vicki211
3 жыл бұрын
Exceptionally clear, and a terrific introduction to the three methods. Would you please share why you made the choices you did for the clock settings rather than use the defaults? Particularly for using the PLLCLK? Thanks again, looking forward to exploring more of your work.
@ControllersTech
3 жыл бұрын
I always use the max sys clock with input from the external crystal. There is no particular reason for it though. Even if you set the external crystal and type in the sys clock frequency and hit enter, cubemx can generate the appropriate setup for you
@hro688
2 жыл бұрын
Hi! Could you please advise how to find a necessary function in lib? Search for text occurences is completely useless, it doesn't return anything. There is a possibility to searct for a methods available in Idea for example (ctrl + f12)
@ajitnayak1541
2 жыл бұрын
Good work. Is there sample code with synch uart mode
@clubunity9342
3 жыл бұрын
well actually Dma is different from interrupt cause it can access all peripherals,data,etc,. from the mcu directly without wasting cpu cycles.although,nice video.
@MehmetAliTurhan
3 жыл бұрын
Could we use UART2IRQN Handler function instead of the TxCallback function for interrupt mode and what is the difference of these two methods?
@MehmetAliTurhan
3 жыл бұрын
The reason of my question, when I was working on hardware interrupts I have used handler functions, I did not use callbacks, however in here you did not use the Uart interrupt handler function. So where do we use Uart interrupt handler or what is the purpose of this function?
@ControllersTech
3 жыл бұрын
Once the interrupt is triggered, the IRQ handler is called. This Uart irqn is used to handle the interrupt, Where it clears the necessary flags. After handling all the necessary things, it will call the callback. This callback function is typically designed for the user application. Ofcourse you can write your code in the interrupt handler itself, but this callback method is common in all sort of peripheral functions. This way we don't really need to worry about handling the interrupt and we can focus on our part of the code.
@MehmetAliTurhan
3 жыл бұрын
@@ControllersTech Thanks for your explanation
@ahkamnashiruddin7053
4 жыл бұрын
this is an amazing tutorial, in my project only send once when using DMA. Could you help me? Thanks.
@ControllersTech
4 жыл бұрын
You xan use hal_uart_dma_stop after transmitting once.
@yalginayyaltirik4607
4 жыл бұрын
thank u sir!!
@empireearth2716
3 жыл бұрын
Thanks You! One question, if I would like to print a variable, how can I do?
@ControllersTech
3 жыл бұрын
use sprintf to convert to string, and then send
@hro688
2 жыл бұрын
When I wirte uint8_t [] data or uint8_t data[] or uint8_t * data it doesn't compile (expected identifier or '(' before '+' token). Any idea why, guys?
@electronicswithmadhan1052
7 ай бұрын
Whether you created this project in stm32 cubeide and imported it to keil ?
@ControllersTech
7 ай бұрын
Better watch the latest video on this channel.. After watching it, watch this one part 2 kzitem.info/news/bejne/q5eD3YKKaZ9khqw
@stuff2learn07
3 жыл бұрын
It looks like interrupt runs in parallel? The LED blink is not at all affected. Can you please explain this phenomenon? I was under impression that in interrupt the processor halts its current process and continues what ISR has asked it to do and then resumes where it had left.
@ControllersTech
3 жыл бұрын
Yes what you wrote is correct. But this entire process is very fast, so the effect on the LED is negligible. It's because the interrupt is getting triggered during the delay period. The best practice to handle ISRs is to write them as short as possible.
@embedded_eng
11 ай бұрын
10:12 on the screen tx rx pins are left empty. How did you get the serial transmission characters? Virtual com port or any other?
@ControllersTech
11 ай бұрын
Yes through the virtual com port. In nucleo boards uart2 is connected to the virtual com port.
@023-mohammadsyawal7
2 жыл бұрын
thankyuu
@naveensiva170
Жыл бұрын
Thanks for the video. If we use two UART in Interrupt mode, then HAL_UART_TxCpltCallback will be called at the end of the tx interrupt. But how do we identify or differentiate on which UARTS TX is complete?
@ControllersTech
Жыл бұрын
You can identify the instance that called it. Inside the txcmpltcallback function use the if loop to identify the instance. If (huart->instance == uart1) { do something} It could be UART1 or USART1 depending on your mcu.
@naveensiva170
Жыл бұрын
@@ControllersTech Thanks for the clarification
@mahilyaeswaran1019
Жыл бұрын
can you please mention that vision firmware package name?
@umarahmad1497
5 жыл бұрын
Can you please provide video of I2S working with CubeMX, i am running into this problem of HAL_TIMEOUT as my data is read only once ....
@tytuer
5 жыл бұрын
That's a great video, but I want to transmit data coming to tx pin rather than transmitting predefined buffer. How is that possible? Thx for your help.
@ControllersTech
5 жыл бұрын
You have to first receive the data and store it in a buffer. After that you can transmit the buffer. Check my latest video. That might exactly be what you are looking for
@ProjectAssistant-yc9qg
Жыл бұрын
hello sir. i am doing same using cube mx ide for STM32L4S5 but nothing print on hercules can any guide.Please
@ControllersTech
Жыл бұрын
connection issue...
@yassin5568
3 жыл бұрын
Great Video Bro😊 Can you tell me please how can I delete the received data from Rx_buffer (UART interrupt) in order to receive new data from Rx_buffer[0] ?
@ControllersTech
3 жыл бұрын
Clear the buffer Write a new function which can write null ('/0') to the buffer
@illidan2514
3 жыл бұрын
sry i kinda bad at english hope u understand . So im used uart1 connect to lora uart e32 and im used HAL_UART_Transmit to send a simple data like "hello", and im used another lora uart e32 connect to my computer to see the data on hercules (both lora are same channel setting) but i didnt see any data show up . can u help me pls
@ControllersTech
3 жыл бұрын
I don't know about lora. Check the datasheet.. you might need to set the connection type, baud rate and all. Also make sure the pins are always connected as tx to rx and rx to tx.
@franckciccio8032
2 жыл бұрын
Hi, Can I receive with interrupt and trasmit with another interrupt? It doesn't work to me :(
@ControllersTech
2 жыл бұрын
What you mean transmit with another interrupt ?
@franckciccio8032
2 жыл бұрын
@@ControllersTech I mean an echo program: I receive the data and trasmit what I received
@ControllersTech
2 жыл бұрын
Why transmit with another interrupt ? Just send the data inside the callback of the received interrupt
@shubhamkumaragarwal7347
Жыл бұрын
When I run the polling method code, the led blinks correctly but I am not able to view the TX data in console view, What could be the possible reason?
@ControllersTech
Жыл бұрын
Put the array in “live expression”, not in “expression”
@shubhamkumaragarwal7347
Жыл бұрын
How do I view the data I am transmitting using HAL_UART_Transmit, It does not show any data in "command shell console" in the console
@ControllersTech
Жыл бұрын
What board are u using ?
@shubhamkumaragarwal7347
Жыл бұрын
STM32F407G Discovery board
@ControllersTech
Жыл бұрын
Are you using any usb to ttl converter ? The connection should be in cross.. Tx to Rx and Rx to Tx
@kavorka8855
2 жыл бұрын
I can confirm that the DMA version in this video doesn't work on stm32f7 series, it works OK on stm32f4, though.
@ControllersTech
2 жыл бұрын
DMA is a bit more complicated in cortex M7 series. Check out cortex M7 playlist, the MPU video series. Then try it.. it will work.
@kavorka8855
2 жыл бұрын
@@ControllersTech You're awesome!
@prapulkrishna
2 жыл бұрын
Hi, Apparently that’s a huge improvement using call back completion interrupt. But still transferring 2000 bytes of data is big and how does that ensure interrupt call back is speeding the data transfer. I mean even without interrupt it’s still the same amount of data. So during interrupt, active task is blocked and interrupt takes over CPU which means the same effort spent by CPU. So what exactly is the speeding factor here??? Can someone please explain? I would greatly appreciate. Thanks
@ControllersTech
2 жыл бұрын
It's not speeding... If you don't use interrupt, the cpu will be blocked until 2000 bytes are received. You can't perform any other operation. With interrupt, other task can carry on while the data is being received in the background. Once the 2000 bytes are received, the interrupt will trigger, and the cpu will process the data.
@prapulkrishna
2 жыл бұрын
@@ControllersTech Thanks for the response. With that understanding, Interrupt Call Back facilitates the elimination of need to use CPU for data transfer as it's fulfilled by ISR. Am I correct?
@rushikeshchaudhari5264
2 жыл бұрын
i want to send R letter from stm to PC to print on notepad
@ControllersTech
2 жыл бұрын
Uart can only send the data to serial monitor. You can write an application for PC which can print that data on the notepad. Other option would be to emulate the STM as a keyboard, then you can print where you want
@rushikeshchaudhari5264
2 жыл бұрын
how can i print this data on notepad
@ControllersTech
2 жыл бұрын
That is related to computer, not the mcu.
@armincal9834
3 жыл бұрын
thanks for the tutorial! do you know where i can find the full list of all the HAL functions? or at least all HAL functions related to a particular protocol like UART,I2C etc. i mean how do you guys know that these functions exist?
@ravimali2814
3 жыл бұрын
You will find them in project_name/Drivers/STM32F4xx_HAL_Driver/Src/ c files of all enabled functions
Пікірлер: 70