stm32f4discovery

Receiving data from 2 UARTs, STM32F4-Discovery, HAL drivers

一笑奈何 提交于 2019-12-11 03:22:44
问题 I want to receive data from 2 sensors connected to my STM32F4-Discovery via 2 UARTs. Transmitting data from STM32 to sensors works but receiving doesn´t. Guarantee it isn´t a hardware problem. I found tutorials for 1 connected UART but not for 2 at once. I would like to use new HAL drivers and DMA for receiving. Thanks for help. UART_HandleTypeDef huart4; UART_HandleTypeDef huart5; DMA_HandleTypeDef hdma_uart4_rx; DMA_HandleTypeDef hdma_uart5_rx; uint8_t rxBuffer4 = '\000'; uint8_t rxBuffer5

Disabling interrupt in interrupt handler STM32F407

老子叫甜甜 提交于 2019-12-10 20:25:58
问题 I'm new here and I'm trying to solve my projects problem. I'm trying to send send data over UART from Raspberry Pi B+ to my STM32F407 and process that data in real-time. My problem is: How to actually synchronize main() thred and UART interruption handler not to stop for a long time my UART interruption. Data sent from Raspberry looks like (where n is number): nwnx Code: void UART4_IRQHandler(void) { if(USART_GetITStatus(UART4, USART_IT_RXNE)) { if(!flag) { processing = true; widthTemp[j] =

STM32F4 Jump to Bootloader via SoftReset and without BOOT0 and BOOT1 Pin

丶灬走出姿态 提交于 2019-12-10 10:11:20
问题 i ask because of an answer to a similar quastion which can be found here: Jump to Bootloader in STM32 through appliction i.e using Boot 0 and Boot 1 Pins in Boot mode from User flash The User "JF002" @JF002 answered "When I want to jump to the bootloader, I write a byte in one of the backup register and then issue a soft-reset. Then, when the processor will restart, at the very beginning of the program, it will read this register. This register contains the value indicating that it should

Nucleo STM32f103RB/F4 Discovery

╄→尐↘猪︶ㄣ 提交于 2019-12-08 13:32:55
问题 Has anybody used Duplex communication via VCP on Nucleo/or discovery single USART with RX TX interrupts. Would appreciate sample code to Echo back(transmit) what is received . 回答1: There are certainly some example among the STM32CubeF4 and STM32CubeF1 package. Also see this example, in which the microcontroller echos back the received bytes to the sender using UART RX interrupt: #include "stm32f4xx.h" UART_HandleTypeDef huart2; /* Single byte to store input */ uint8_t byte; void SystemClock

RS232 (UART) on STM32F4-Discovery (STM32F429ZIT6) with HAL library?

主宰稳场 提交于 2019-12-06 05:23:14
问题 Background Here is some of my background so that your guy could know what related knowledge I have or I don't have. I'm totally a newbie of this kind of embedded system. And I don't really know anything about electronics, I'm a pure software guy. My only experience of embedded system is Raspberry Pi, which is quite different from STM32F4 Discovery. I could implement a UART read / write programming by using standard Linux C library on Raspberry Pi, which is connected to a PC with an USB-to

STM32F4 Jump to Bootloader via SoftReset and without BOOT0 and BOOT1 Pin

雨燕双飞 提交于 2019-12-06 03:13:20
i ask because of an answer to a similar quastion which can be found here: Jump to Bootloader in STM32 through appliction i.e using Boot 0 and Boot 1 Pins in Boot mode from User flash The User "JF002" @JF002 answered "When I want to jump to the bootloader, I write a byte in one of the backup register and then issue a soft-reset. Then, when the processor will restart, at the very beginning of the program, it will read this register. This register contains the value indicating that it should reboot in bootloader mode. Then, the jump to the bootloader is much easier" Can someone explain that

SPI Slave setup on STM32F4 board

泄露秘密 提交于 2019-12-06 02:30:01
问题 I am trying to communicate between two STM32F4 discovery boards via SPI in Master & Slave configuration. I already have the code for the master but I am a bit confused on the changes I need to make on the SPI initialisation for the slave. I would also like to implement an interrupt whenever the master is sending data, rather than having the slave poll the RXNE register all the time. However, I am unsure of the exact configurations for the NVIC for the SPI. Below is the master's configuration

RS232 (UART) on STM32F4-Discovery (STM32F429ZIT6) with HAL library?

不问归期 提交于 2019-12-04 10:10:28
Background Here is some of my background so that your guy could know what related knowledge I have or I don't have. I'm totally a newbie of this kind of embedded system. And I don't really know anything about electronics, I'm a pure software guy. My only experience of embedded system is Raspberry Pi, which is quite different from STM32F4 Discovery. I could implement a UART read / write programming by using standard Linux C library on Raspberry Pi, which is connected to a PC with an USB-to-RS232 adapter with a voltage converter IC. My Device and development environment An STM32F429I-DISCO board

STM32F4 UART HAL Driver

北慕城南 提交于 2019-12-03 01:17:48
问题 I'm trying to figure out how to use this new HAL driver. I want to receive data using the HAL_UART_Receive_IT() which sets up the device to run an interrupt function when data is received. Problem is that you have to specify the length of data to read before the interrupt triggers. I plan on sending console like commands of varying length so can't have a fixed length. I assume the only way to do this would be to read single characters at a time and build up a separate string. The HAL driver

STM32F4 UART HAL Driver

狂风中的少年 提交于 2019-12-02 14:32:27
I'm trying to figure out how to use this new HAL driver. I want to receive data using the HAL_UART_Receive_IT() which sets up the device to run an interrupt function when data is received. Problem is that you have to specify the length of data to read before the interrupt triggers. I plan on sending console like commands of varying length so can't have a fixed length. I assume the only way to do this would be to read single characters at a time and build up a separate string. The HAL driver seems to have a problem where if you set the HAL_UART_Receive_IT() to receive x number of characters,