Gracias por subir este material!, yo uso el STM32F401CE y realmente estoy muy conforme, estoy usando MBED. Gracias.
@bugaje100 Жыл бұрын
It worked. Thank you sir, but i had to download the AT firmware on the esp32.
@onurolce5 жыл бұрын
13:40 So if a function blocks UART then is it better to use USART in interrupt mode always?
@ControllersTech5 жыл бұрын
Buddy, this is uart ring buffer. It is always working in interrupt mode. In blocking mode the data is still being received in the Rx bufger anyway. If u use the if loop, you can even do rest of the functions normally. It's just, you won't be able to do anything with the data received in the uart, until the string is matched and characters are copied..
@onurolce5 жыл бұрын
@@ControllersTech So I need to look previous video for your own header file and functions.
@onurolce5 жыл бұрын
I've looked UartRingbuffer files now and it looks a bit heavy code for me :(
@ControllersTech5 жыл бұрын
Although it might look heavy but it's very simple to use. Give it a try. It's your best shot for unknown data length
@onurolce5 жыл бұрын
@@ControllersTech You are right. I'll try to make it via watching your video for my MCU.
@zlad12 жыл бұрын
well hello i have some issue at multi uart while using the hal its fine,but while using the ringbuffer isr it crash the receive well be fine but the transmission cant send while using multi uart ,testing in single fine
@eddyv5244 жыл бұрын
Thanks for posting! Very useful video! What would you 'get after' if you are transmitting google protocol buffers over a serial link between a stm32 processor and a esp32?
@naveent91633 жыл бұрын
Hi Eddy how did you integrate Google Protocol Buffers on STM32 Project , Please Help me in this Process i can't integrate Google Protocol Buffers on STM32 project iam getting many dependency and compiler errors Thanks in Advance
@mecatronicamx5823 жыл бұрын
Excusme because define twice rx_buffer1,tx_buffer1, etc?
@haunchung3462 жыл бұрын
Hello! Thank you for the tutorial and code. I have been trying to implement this, but when I send an AT command via RealTerm it only increments in the _tx_buffer1 and _rx_buffer2 in the debugger. The _rx_buffer1 and _tx_buffer2 remain empty and I don't get any response on RealTerm from the wifi module. Do you know, what I could do to fix this?
@dighuyntran13513 жыл бұрын
Thanks for the tutorial but for some instances, the uart doesn't receive fully string that ESP respones, like i should get:"AT+CIPMUX=0 Ok " but i just get "AT+CIPMUX" instead. Because of that, the function always stucks at Wait_for("Ok ").
@ControllersTech3 жыл бұрын
can't help that. This is a very fragile code and things like that can happen.
@eddyv5244 жыл бұрын
Thanks for posting your videos! I ported the code to a stm32H750 processor and expanded it to 3 interfaces. i had to change some register names that access the flags etc but for the most part it works great except for one issue that i can not get rid of. 2 of the uarts are usarts and 1 is a uart. when i receive data on the uart , the data ends up in the buffer but then the interrupt for that uart (uart4) keeps firing and the program never gets to the main loop anymore. Do you know if setting and resetting interrupt flags is different for uart and usart blocks?
@eddyv5244 жыл бұрын
Never mind i found the issue :)
@onurolce5 жыл бұрын
Is not there a build BIN or HEX file directly and upload it into BluePill STM32F103C8T6 device via ST-Link V2 Mini programmer ?
@ControllersTech5 жыл бұрын
There is a hex file generated after you build the project. Look for it inside the project folder. You can upload it via st link utility or maybe some other software too. But it's better to use the st link directly. This way u will have the option to debug also.
@onurolce5 жыл бұрын
@@ControllersTech OK, when I tried to Debug then CubeIDE said me "you ave to update your ST-Link V2 mini device firmware" and then I clicked to Upgrade button and it's done. But now Cube IDE and Cube Programmer says " error 4. No device found". Sometimes it uploads if I press on Reset Buttton on my BluePill (STM32F103C8T6) board and it uploads but sometimes even this way does not work. Maybe upgraded version has a bug ? If it is so how can I fix it ?
@ControllersTech5 жыл бұрын
Frankly, i also have a lot of problems with my bluepill connection. That's why I am making more videos with nucleo board now a days. It's like half the time get wasted on just connecting that thing. I'll try to look into some other way of connecting it using serial connection or something. But till then i can only say that keep trying... Connect disconnect and hope it works..
@onurolce5 жыл бұрын
@@ControllersTech Yeah, since yesterday I am working to fix it and learn to program in STM32 Cube. it was working well in Arduino IDE but it has another problem that it doesnot Work 2nd UART Channel in Arduino IDE. That's why I am trying to switch to more better programming environment like Cube IDE. Do you have any idea how to make work to UART2 in Arduino IDE ?
@ControllersTech5 жыл бұрын
I can recommend you something but telegram me.. i need more information about the way you are using things. Telegram me @controllerstech
@enderkulucka4 жыл бұрын
I use stm32l496G discovery. I am not user usart1 because this board (stm32 discovery board) hasn't usart1 pin. therefore I am used LPUART1 for communication with esp8266. I have a problem. my problem is in Uart_isr function. error: USART_typedef has no member named 'DR'; did you mean 'RDR'? HELP ME.
@ControllersTech4 жыл бұрын
Check the description. There is a solution for that
@orlandocarvalho4092 жыл бұрын
Hi, i'm trying to implement the projet, however when i do the sending buffer by usart ("AT" ASCI), (Usart 2 -> Usart 1) it only receive the carcter "A" . Don't know what's happening here. Don't know what's the change to do, any help ? I check the code, and i don't have the "READ_REG(huart->Instance->ISR)" and the "unsigned char c = huart->Instance->RDR;",, we only have the SR and the DR registers!! I'm using the STm32F103RBTX MCU
@ControllersTech2 жыл бұрын
Read the description
@orlandocarvalho4092 жыл бұрын
@@ControllersTech The program does it ok, following this tutorial. But when the code reaches the point of :: Uart_sendstring("AT ", wifi_uart while(!(Wait_for("AT OK ", wifi_uart))); The system breaks.. This line of code it's in the ESP8266_Hal.c file
@orlandocarvalho4092 жыл бұрын
Forget it!! We just did the connection !! However don't know what was the problem ... Thanks for the help and the fast response.
@ahmadroshanfar4 жыл бұрын
Hi, I'm using ESP-01 and stm32f4 discovery. When I reset my wifi module with a button, I receive the Wifi connected and Wifi got IP message in my terminal, but when sending AT command, the module doesn't any reaction to it and rx_buffer1 and tx_buffer2 haven't the value.
@ControllersTech4 жыл бұрын
Maybe you are not sending the command in the right way. Which serial console you are using ?
@ahmadroshanfar4 жыл бұрын
@@ControllersTech I'm using Arduino terminal and Gtkterm in ubuntu and Realterm in Windows. In realterm some garbage data is available in terminal. for example "u" instead of "OK" to answer of "AT". CR and LF is checked and baudrate is 115200
@ControllersTech4 жыл бұрын
Some esp8266 don't have a default baudrate 115200, you should try with other BR like 38400, or something. You should test firat by simply connecting esp to the computer usinf some ftdi
@ahmadroshanfar4 жыл бұрын
@@ControllersTech I test it before and do some projects with Arduino. 115200 is correct!
@ControllersTech4 жыл бұрын
Check if Both the uarts are set up at 115200
@ersahgucel19453 жыл бұрын
can we use this library with 3 or more usart port?
@ControllersTech3 жыл бұрын
Yes you can.. but define it just like i did for the 2 uarts
@ersahgucel19453 жыл бұрын
@@ControllersTech Thanks for the answer, have you a tutorial for MQTT with freeRTOS and GSM. I can not find a freeRTOS MQTT tutorial.
@ControllersTech3 жыл бұрын
Nope. I don't have anything for mqtt..
@ersahgucel19453 жыл бұрын
@@ControllersTech So can your ring buffer library be used on freertos?
@eduardodelarosaferrer22054 жыл бұрын
I miss you !!
@sarathkumar-tf4lr4 жыл бұрын
in this code is not working ...when am send "AT" command to esp8266 from PC terminal it's return a "AT" response to the PC terminal what is the problem occurred here.... please give the solution about this.....
@ControllersTech4 жыл бұрын
Use realterm for the serial monitor
@sarathkumar-tf4lr4 жыл бұрын
@@ControllersTech ya....i use the realterm serial monitor but did not get the correct output....then what is the solution to get the correct output......
@sarathkumar-tf4lr4 жыл бұрын
@@ControllersTech am using stm32l476rg nucleo controller
@ControllersTech4 жыл бұрын
First try without the microcontroller. Simply use any TTL device like ftdi and check the ESP response
@sarathkumar-tf4lr4 жыл бұрын
@@ControllersTech ya...i use ftdi but no response comes....pls give the right solution
@andrey75305 жыл бұрын
good luck! and ths
@nodirbekchoriev17633 жыл бұрын
Thank you )))
@naasikhendricks15015 жыл бұрын
So it worked???
@ControllersTech5 жыл бұрын
What? Can u elaborate..
@naasikhendricks15015 жыл бұрын
@@ControllersTech I asked if this would work for multiple instances
@ControllersTech5 жыл бұрын
Yes it does. That's what shown in the video buddy. U can use it to interface some serial based device. Just like you use hardware serial and software serial in arduino..
@chandreshsuthar12474 жыл бұрын
hello sir , thanks for the amazing ring_buffer uart tutorial , it works fine for me with only one uart , when i try this with my stm32f103c8t6 it gets blocked and doesn't answer , i need to erase the flash to reprogram it , can you please guide me what's wrong with it ?? Thanking You in Advance !!!