![]() Once the PlatformIO IDE is ready, the ST STM32 development platform can be installed. The most up-to-date and detailed installation instructions can be found in the official PlatformIO IDE for VSCode documentation. In this guide Visual Studio Code is used as the editor. Some software needs to be installed before diving into the development process. It has out-of-the-box support for STM32 microcontrollers and allows working with low-level libraries like CMSIS, STM32Cube, and LibOpenCM3 as well as with popular high-level frameworks like Arduino, Mbed, or Zephyr without changing your development environment.Ī detailed overview of the PlatformIO ecosystem and its philosophy can be found in the official documentation. PlatformIO is a professional collaborative platform for embedded development that includes lots of instruments for the most common development tasks. The goal of this guide is to show you how simple it is to set up PlatformIO with Visual Studio Code and use it to compile, upload, and debug STM32Cube-based application on the STM32 Nucleo-F401RE board. ![]() This guide will help you take the first steps with programming STM32 microcontrollers using the PlatformIO ecosystem. I still don't know why I can't see any signal but it might be my scope (kind of old) or the signal going so fast that I can't catch it.Note that this tutorial is written by and maintained by the PlatformIO team. Using UART1 for both Nucleo, I managed to send data and receive data correctly. Nucleo 1 USART1_Rx pinned on Nucleo 2 USART1_Tx Nucleo 1 USART1_Tx pinned on Nucleo 2 USART1_Rx Still, can't explain why I didn't see any signal on the pin. So it is normal I couldn't see any data on my UART2_Rx data buffer. I still used UART2 on my Nucleo 2, which is connected to USB. I also can't see any signal with my scope on my Nucleo 1 UART1_Tx pin. I still didn't manage to see the Nucleo 2 UART2 IT triggered. Nucleo 1 sends data with UART1 to Nucleo 2 Nucleo 1 USART1_Rx pinned on Nucleo 2 USART2_Tx Nucleo 1 USART1_Tx pinned on Nucleo 2 USART2_Rx But I still wanted to send data with my Nucleo 1 and receive it with my Nucleo 2. That's why I managed to see "Hello World" on my console. Pinning my scope on Nucleo 1 USART2_Tx showed permanent 0V line.Įxplanation : Solder bridge were configured to transmit UART2 data with USB. Nucleo 1 sends data with UART2 to Nucleo 2 Nucleo 1 USART2_Rx pinned on Nucleo 2 USART2_Tx Nucleo 1 USART2_Tx pinned on Nucleo 2 USART2_Rx My goal was to transmit data from Nucleo 1 to Nucleo 2 with UART, here is what i tried : This function is called in my main() function before the main loop.įrom what I see on my board, SB62 & SB63 do not have the connector on top of them, and SB13 & SB14 both have the connector on top of them. GPIO_InitStruct.Alternate = GPIO_AF7_USART2 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin If (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) PeriphClkInit.Usart2ClockSelection = RCC_USART2CLKSOURCE_PCLK1 Also without results.Ĭoncerning the clock/pin init : PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USART2 I also tried to closed-loop my Tx/Rx pins to Receive data from the Tx pin. To solve the problem, I tried to use other UART/USART available (from 1 to 3), without results. PS : I also tested with STM32-Nucleo-F401RE and the result is the same so I think the problem definitely comes from me. I can send more details about my code/pin configs via cubeMX if needed. So i receive my USART signal on my computer via USB, but I can't send any data to another Nucleo (for example).Īnyone has an idea of what could be the problem?Īny function to call to instantiate something? Pinning a scope on the USART_Tx pin corresponding to USART2, i cannot see any signal transmitted (the line is always at 0V). Using the command screen on my Linux Terminal to monitor the UART signal, I receive "Hello World !!!" multiple times, so i was thinking UART communication was working. (Note : PA5 is my LED, USART2_Tx is on PA2) HAL_UART_Transmit(&huart2,Test,sizeof(Test),1000) // Sending in normal mode Uint8_t Test = "Hello World !!!\r\n" //Data to send I generated the code with CubeMX and in my main() function, i call HAL_UART_Transmit() function to send data as the following : while (1) I use STM32-Nucleo-L476RG board with USART2 enabled. I have some issues trying to transmit data with my USART pins.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |