Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I'm using STM32F105R8T to send serial buffer commands to an HMI display.MAX485 chip was used for communication. There are pre-defined command buffers and updatable data buffers. Those buffers are sent through a RS485 bus at the baud rate of 9600. There are lots of commands that I should send to operate the display. I'm using 50ms time interrupt for data transmission. MCU doesn't output correct buffers when there is large amount of data, and it causes to error in the display. When I check HAL_UART_Transmit function, It begins busy sometimes, and it doesn't want to transmit data. What are the solutions that I can get to drive this display smoothly.ThanksHere's my Codehttps://github.com/akilawickramasinghe/Vega_ETX_Display_Firmware_V2
This initially an azrtos tx toggle LED test on a STM32F4Discovery boardI followed this videoMOOC - Azure RTOS workshop - 5 ThreadX lab - step1 - First thread creation - YouTubeThe attached fileSTM32F4DISCO-1.10.1 works when compile with 1.10.1After further debug with 1.11.0 it turns outs the attached STM32F4Disco-Dec2022 file crashes in HAL_INIT() because TIM6_DAC_IRQHandler() isn't generated in stm32f4xx_it.c.
I want to be able to make the STM32G474 go to sleep when certain conditions are met.I've created a small project to test the feature. The `app-freertos.c` file is like this:#include "FreeRTOS.h" #include "task.h" #include "main.h" #include "cmsis_os.h" #include "usart.h" #include "lptim.h" osThreadId_t defaultTaskHandle; const osThreadAttr_t defaultTask_attributes = { .name = "defaultTask", .priority = (osPriority_t) osPriorityNormal, .stack_size = 128 * 4 }; void StartDefaultTask(void *argument); void MX_FREERTOS_Init(void); static uint32_t rccCfgrSave; static uint32_t rccCrSave; __weak void PreSleepProcessing(uint32_t ulExpectedIdleTime) { HAL_UART_Transmit(&huart3, "pre sleep\r\n", 11, 10); HAL_SuspendTick(); HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 0xFFFF, ulExpectedIdleTime); } __weak void PostSleepProcessing(uint32_t ulExpectedIdleTime) { HAL_LPTIM_TimeOut_Stop_IT(&hlptim1); HAL_ResumeTick(); HAL_UART_Transmit(&huart3, "po
Could some one tell me explain why ?
I am trying to build an application with a SNK and DRP usbc port, using a USBPDM1 and a DRP1M1 with a nucleo g071rbI have successfully run the DRP example application, but when I try and add the functionality to my sink application stm32cubemonitor-ucpd stops seeing the board.Specifically when adding in the drp example code:from: https://github.com/STMicroelectronics/x-cube-tcpp/tree/main/Projects/NUCLEO-G071RB/Applications/USB_PD/DRP1M1_DRP// (in usbpd_dpm_user.c) USBPD_StatusTypeDef USBPD_DPM_UserInit(void) { /* USER CODE BEGIN USBPD_DPM_UserInit */ /* PWR SET UP */ if(USBPD_OK != USBPD_PWR_IF_Init()) { return USBPD_ERROR; } #if defined(_RTOS) #if (osCMSIS < 0x20000U) osMessageQDef(MsgBox, DPM_BOX_MESSAGES_MAX, uint32_t); DPMMsgBox = osMessageCreate(osMessageQ(MsgBox), NULL); if(NULL == osThreadCreate(osThread(DPM), &DPMMsgBox)) #else DPMMsgBox = osMessageQueueNew (DPM_BOX_MESSAGES_MAX, sizeof(uint32_t), NULL); if (NULL == osThreadNew(U
I need help with using pzem 004t in stm32f405 with uart communication. i have check this source willyvamp/STM32F103C8T6-PZEM004T-DHT11: HAL STM32 (github.com) but still dont get the data form uart. please help
Hi All,I use DMA IDLE Idle line and circular mode to receive usart buffer, and process data in rtos,but when I get an Idle event, sometimes RTOS read buffer will get some empty data, but wait a little bit times, the buffer will be updated, so when I read empty, I delay 500ms and read again in the task, the buffer can read data normally, have anybody know what problem is? any help will be very useful.thanks.first, read get \0 23 timessecond, data normal after delay referhttps://github.com/MaJerle/stm32-usart-uart-dma-rx-txHAL_UARTEx_ReceiveToIdle_DMA(&huart6, (uint8_t*) u6_RxBuffer, BufferSize); void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size) { if (huart->Instance == USART6) { MaxWifiSize = Size; // if Size updated, the @task will be read } }rtos task void usart_protocol(void) { static uint16_t old_pos = 0; uint16_t i; /* Check if number of received data in recpetion buffer has changed */ if (MaxW
My application has a low priority usart receive function - meaning that if characters are delayed it's no big deal. I've been using interrupts with a callback receiving one character at at time with a read always outstanding. I process flags and buffer within my code. I'm thinking of switching to freertos for the charting and interface functions. I tried the code with interrupts and callback and then figured out that the callback is on the interrupt vector level (can't be assigned to a task). So if I wanted to lower the priority of the usart read, would I be better off polling in a low priority freertos task? That way if one of the higher priority interrupts came in the mcu wouldn't be in an interrupt routine.Thanks for all your help.Jerry
I am trying to set up a sourcing power delivery port on an STM32G0 system. I have set up switching of VBUS, and when I connect up a sinking device my system detects it, sets up VBUS and starts sending source capacity messages.Log:<Connect source to port 0> USBPD_DPM_Notification - USBPD stack started USBPD_DPM_UserCableDetection - Cable attached to port 0; role=sink USBPD_DPM_Notification - USBPD stack started USBPD_DPM_SetDataInfo - Reset sink PDO on port 0 (data=0) USBPD_DPM_SetDataInfo - Received sink request of size 1 on port 0 USBPD_DPM_SetDataInfo - Received 5 Source PDOs on port 0 USBPD_DPM_SNK_EvaluateCapabilities - Selecting PDO offer 0 USBPD_DPM_Notification - Power state changed on port 0 USBPD_DPM_Notification - Request accepted on port 0 USBPD_DPM_Notification - Power state changed on port 0 USBPD_DPM_Notification - Explicit contract on port 0 USBPD_DPM_Notification - Sink ready on port 0 <Connect sink to port 1> BSP_USBPD_PWR_VBUSOff on port 1 USBPD_DPM
I have set up the USBPD lib on my system to manage USB power delivery messages and set up power contracts in both the source and sink directions. Now that this seems to work well, I also want the system to work with a USB-C only power source (non-PD). I have a power source that is capable of supplying 3A at 5V, and have connected a 10K Rp resistor between a CC line and VBUS.On connecting the source I expected (hoped) the USBPD stack to trigger a connection event, sample the CC lines and conclude that after a while of no CC responses end up in the USBPD_POWER_IMPLICITCONTRACT state based on the Rp resistor value. Instead it triggers a connect event and goes to the USBPD_POWER_DEFAULT5V state. Then after a while of no CC response it tries to hard-reset the bus and panics because the requested voltage (0V) does not match the bus voltage (5V).So my question is how is this normally handled? Is is possible to have the USBPD stack be happy with a fixed Rp resistor, and is it possible for the
Hi guys,On STM32H7, try to receive data with UART in DMA normal mode under FreeRTOS, Tx works OK but receive nothing with keli5 (CubeMX setting as reference )I use HAL library,also tried LL library but not working.Already checked DMA is initialized before UART, no access to RTOS semaphores/queues, and use UART Tx in only one task.Any suggestion?The link contains my codehttps://drive.google.com/drive/folders/1zbQeSjJ21GSl_MLdOm8hokdCSkUVaVTA?usp=share_link#[STM32 MCUs] #DMA #RTOS #[UART/USART]
Hi,I would ask the community a suggestion for clock configuration.I should use the USB ans Mass Storage Class using the SD card by SDMMC interface as memory. This function is used for 5 to 10% of my device usage, so I would decrease the SYSCLK for power consumption. Now it is set at 48 MHz. Which could the right clock configuration to save power? I tried to simply set SYSCLK at 24 MHz but Storage is not recognized any more from Windows. Should I keep SYSCLK at 48 MHz as USB?
The problem with the insert of the SSI tag, it is can insert only 920 characters but I need in 5 times more!If I change the "Lwip_httpd_max_tag_insert_len" It does not give an effect!Could someone tell me what is wrong?
Hello,ST's and all Ethernet experts, please.STM32F767, Nucleo-144, and custom boardno OS lwIP 2.1.3, IPv4 onlySTM32CubeIDEno ETH interrupts usedApplication: Industrial frontend, streaming "audio" data from SAIs via ethernet,at high data rates, for long periods of time (weeks)TCP is a must, losing packets is not an option.Audio streaming mostly uses UDP, and they use interpolationto mask lost packets - we are not allowed do that.Problem:ETH transmission: TCP header checksum is = ZERO = 0.Depending on settings below (SRAM usage, CPU clock),this happens after a few MB, or many GB of data, at 25.6 Mbps it's running sometimes for hours, sometimes it stops after a few minutes.IP4 header checksum is okay (at least not 0).All checked with Wireshark.Then the PC side stops ACKnowledging, then lwIP shuts down TCP.Checked:Same behaviour on Nucleo and custom board. Checked on 2 different PCs.LwIP stats don't show any errors."Transmit Store and Forward" is set
I've tried to create a simple project which includes 2 threads. Each thread toggles two separate pins respectively . To create a 10 ms delay, I am using tx_thread_sleep (TX_TIMER_TICKS_PER_SECOND is 100) . Everything works okay, however, I've noticed that it takes too long for a pin to be toggled the first time after reset (~1 s, see the example below). Then it works properly. If I delete tx_thread_sleep function and change it with HAL_delay, then it behaves after RESET as expected. What can cause this issue?Here is my code for App_ThreadX_Init:UINT App_ThreadX_Init(VOID *memory_ptr) { UINT ret = TX_SUCCESS; TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr; /* USER CODE BEGIN App_ThreadX_MEM_POOL */ (void)byte_pool; /* USER CODE END App_ThreadX_MEM_POOL */ /* USER CODE BEGIN App_ThreadX_Init */ tx_thread_create(&thread_1_ptr, "thread_1", thread_1_entry, 0, thread_1_stack, THREAD_STACK_SIZE, 15, 15, 1, TX_AUTO_START); tx_thread_create(&thread_2_ptr, "thr
I'm trying to implement a server with eth+lwip with stm32, but it worked well when I debug it, but it didn't work when I tried to turn it off and on without debugging, so I'm trying this and that, but I'm not even pinging itIt says that the phenomenon shown in the image occurs when the corresponding ip is not working, but the ip is set to fixed, but it is not workingYesIs there a way to solve this situation where both ping and connect worked well when debugging, but we can't do it without debugging?
As you can see by the schematic, BOOT0 gets pulled to 3.3V or ground. I pulled it to 3.3V with the switch then held the reset button for several seconds. I currently have a blink program flashed that blinks an LED. When I try to reset the board in bootloader mode, the board just keeps executing the blink program. It will let me program the board just fine the first time, but after that I can't get it back into the bootloader.To upload the program I'm using a USB to UART converter and the STM32CubeProgrammer application. The resistors on the breadboard pull the data lines up to 3.3V since it uses the pins are USART.The only issue I could think of is that there should be a resistor between the switch and BOOT0. But I did this when I assembled the next board but that didn't change anything. I still could only flash the first program then it was bricked.The last thing I can think of that might have an effect is that I compile the code in release mode. Would that have any effect? Should I a
I don't know if this is possible, but I'm trying to make an stm32 device using USB CDC, and am trying to make it more "identifiable" by the computer as something beyond just a "USB Serial Device" on a specific com port. At the moment, I'm controlling the device via a python program on a PC, but I have to hard-code the specific com port assigned to the device, and that com port could change if I just moved the device over to another machine and ran the same program. is it possible to mark a USB device with something very specific that a computer can identify beyond just being a "USB Serial Device", or would I have to make the computer check each com port for a desired response from any of the devices connected to it to see if it's the device that corresponds to the program?
Hello there,I have issues to get Ethernet working with the STM32H755ZI-Q board. I have checked out the knowlege base article with no luck yet (https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working). I just want to send a ping to the board, and get a "host not reachable" back> ping 192.168.123.73 PING 192.168.123.73 (192.168.123.73) 56(84) Bytes an Daten. Von 192.168.123.48 icmp_seq=1 Zielhost nicht erreichbar Von 192.168.123.48 icmp_seq=2 Zielhost nicht erreichbar Von 192.168.123.48 icmp_seq=3 Zielhost nicht erreichbar The arp table is shown like:> arp -ev ... 192.168.123.73 ether 00:06:77:ff:0a:13 C enp39s0 Einträge: 3 Ignoriert: 0 Gefunden: 3and sometimes the MAC is not shown (There it sais incomplete). The
..
but when i start to copy and paste these files to another location . i can not get the true speed. (while writing reading) I mean I choose HS mode (60Mb/s) but transfer speed is too low. I made everything in the readme.txt file. but i can not implement this fw. example (high speed mode). Can anyone to help me??
This is more a bug report than an actual question.I have experienced a wrong behavior of the I2C driver of STM32H743ZI MCU (Nucleo board).What's happening? The driver is simply dividing by 2 the slave address passed as a parameter to the function HAL_I2C_Master_Transmit. This leads to an absence of communication between master and slave (which is here an aardvark I2C SPI adapter), since master is transmitting to an erroneous slave address.The I2C handle is configured as follow:hi2c1.Instance = I2C1; hi2c1.Init.Timing = 0x10707DBC; hi2c1.Init.OwnAddress1 = 0; hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; hi2c1.Init.OwnAddress2 = 0; hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK; hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_ENABLE; if (HAL_I2C_Init(&hi2c1) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); } /**Configure Analogue filter */ if (HAL_I2CEx_Con
Hi, We received a custom board built around a STM32L476 MCU. I could program it with a basic "Hello World" program which aims at blinking some leds. But the leds do not blink... :( using debugger, I noticed 2 strange behaviors 1) call to HAL_Delay() makes the firmware hangs 2) at the beginning of the execution, the debugger displayes the following message: "Break at address "0x1fff51f4" with no debug information available, or outside program code"Googling for 1st message does not really help me to solve it..I then googled for the 2nd message. I read lots of post/discussion about this topic. I finally ended that the BOOT0 pin is tied to VddIO and nBOOT1 is checked so according to STM3éL476 DS, "System memory is selected as boot space"I could program the STM32L476 using the jtag/SWD connector we have on the custom board.I do have 3 questions then: 1) if i got it correclty, the bootloader is started and tries to execute or read a value somewhere.. the end is that
I wanted to use with my STM32H745 Disco Board the eMMC memory together with the Flash File System. In compare to (https://community.st.com/s/article/how-to-create-a-file-system-on-a-sd-card-using-stm32bubeide), the selection for the hardware is grayed. Unfortunately, my knowledge is not so advanced to write my own middleware. For now, I am able to read out the parameters from the eMMC card and I am able to read out a dedicated block, I found in the firmware example project "FatFs_Shared_Device" but it seems, this projects is just showing the FAT functionality, but not the middleware. The description mentioned "This application provides a description on how to use STM32Cube™ firmware with FatFs middleware component as a generic FAT file system module. The objective is to develop an application making the most of the features offered by FatFs to access the eMMC card."But how to connect the middleware functions with the FATFS is a secret for me. If someone could give me a hint, how to con
Got a problem with ethernet on my custom board with STM32H743BIT and DP83848 PHYeverything 'seems' to work, but I see no outgoing traffic from my board on wireshark.Rx working though, screenshots attached.I read an articlehttps://community.st.com/s/article/FAQ-Ethernet-not-working-on-STM32H7x3but it didnt help.Some clues anybody?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.