STM32CubeMX basics: 10.10 STM32Cube HAL labs UART - Lab UART IT

  Рет қаралды 12,411

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

Пікірлер: 17
@design4682
@design4682 3 жыл бұрын
do we need to do some changes on the hardware side? specifically for RX and TX pins?
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Hi there, thanks for your question - may we point you towards our community.st.com where you will find a team of people who can answer you directly?
@noicthebrave
@noicthebrave 3 жыл бұрын
cannot to get it to work on my end. not sure what i did wrong. i can get it to transmit to work just fine, its the receive that i keep having issues with. Any tips?
@noicthebrave
@noicthebrave 3 жыл бұрын
I take it back i got it! TY
@design4682
@design4682 3 жыл бұрын
@@noicthebrave do we need to connect RX and TX pins together?
@Roshankattel5
@Roshankattel5 3 жыл бұрын
I am having same issue with bluepill board, cannot receive callback is not being triggered.
@design4682
@design4682 3 жыл бұрын
@9.2 sec which wires need to be connected?
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Hi there, thanks for your question - may we point you towards our community.st.com where you will find a team of people who can answer you directly?
@armincal9834
@armincal9834 3 жыл бұрын
I don't know if you are Familiar with AT commands or not but I'm trying to write a firmware who's only job is to put a sim800l module on GSM mode, then get my approximate location using gprs. To do this it only needs to execute 3 AT commands using UART. Easy enough. The simplest AT command is "AT" to which sim800l must reply "AT OK" which means everything is fine on both ends. When I do transfer-it AT I get AT OK response in the Rx buffer, everything is fine, but when I try to send the next command using transmit and then receive my Rx buffers ends up including what I was supposed to transfer... Like??? :D there is only 1 data register for TX and Rx and somehow instead of sending the data it reads the register(receive works before transmit maybe?) (also my Rx now includes the response to my first command plus the next command I am supposed to send, registers don't get emptied?) I'm so confused right now. Putting delay even 4 seconds between each transfer and receive won't work either.
@stmicroelectronics
@stmicroelectronics 3 жыл бұрын
Hi there, thanks for your question - may we point you towards our community.st.com, where you will find a team of people who can answer you directly ?
@armincal9834
@armincal9834 3 жыл бұрын
@@stmicroelectronics thank you very much for your answer, I ha e since found out what the problem was! The sim800l module had echo mode turned on by default, so the problem wasn't that receive was worki g before transfer, rather the problem was that sim800l would repeat the command I was sending plus the response :D
@mauricio2866
@mauricio2866 3 жыл бұрын
What a tedious and complicated process just to set up a uart in interrupt mode
@daztheduke2
@daztheduke2 3 жыл бұрын
Have you done this BareMetal with uVision? :)
@noicthebrave
@noicthebrave 3 жыл бұрын
this doesnt work for me, did you find a better way to do this ?
@daztheduke2
@daztheduke2 3 жыл бұрын
@@noicthebrave Sorry for the confusion. I was being sarcastic which i now realise isn't helpful. What i was saying is that using the UART and HAL is a lot easier (in my opinon) than writing all the code using a BareMetal aproach. Not that it's easy to use HAL either. The problem i have personally at the moment is that my STM32 board (STM32WB) only has one USART and also a LPUSART which i'm not familiar with. I think the USART is used to 'program' the chip which makes things more complex.
@dennisyildirim2708
@dennisyildirim2708 3 жыл бұрын
Did exactly what you did, and it simply does not work. I started to wonder why these stuff always have to be this chaotic and ill documented... Code with error: /* USER CODE BEGIN PFP */ /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) { } void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { while(1); } /* USER CODE END 0 */ /** * @brief The application entry point. * @retval int */ CDT Build Console>> ../Src/main.c:74:1: error: expected expression before '}' token } ^ ../Src/main.c: At top level: ../Src/main.c:75:1: error: expected identifier or '(' before '}' token } ^ make: *** [Src/subdir.mk:33: Src/main.o] Error 1 "make -j16 all" terminated with exit code 2. Build might be incomplete.
STM32CubeMX basics: 10.11 STM32Cube HAL labs UART - UART DMA
16:14
STMicroelectronics
Рет қаралды 29 М.
STM32CubeMX basics: 13.1 STM32Cube HAL labs ADC - Lab ADC IT
21:51
STMicroelectronics
Рет қаралды 12 М.
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 95 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 12 МЛН
STM32CubeMX basics: 07.1 STM32Cube HAL theory GPIO - HAL API
20:31
STMicroelectronics
Рет қаралды 18 М.
Serial UART with STM32 Microcontroller-Transmit and Receive Data
18:44
I 3D Printed a $1,224 Chair
23:56
Morley Kert
Рет қаралды 165 М.
STM32CubeMX basics: 13.2 STM32Cube HAL labs ADC - Lab ADC DMA
11:21
STMicroelectronics
Рет қаралды 21 М.
Punch Card Programming - Computerphile
14:55
Computerphile
Рет қаралды 873 М.
ChatGPT Just Learned To Fix Itself!
5:47
Two Minute Papers
Рет қаралды 95 М.
HAL: #6 How to - USART with DMA
6:00
Web learning
Рет қаралды 42 М.
STM32CubeMX basics: 03.1 STM32CubeMX clock configuration tab - Basics
9:11
STMicroelectronics
Рет қаралды 29 М.
Linux on Windows......Windows on Linux
23:54
NetworkChuck
Рет қаралды 200 М.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 3,6 МЛН
Как слушать музыку с помощью чека?
0:36