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
Hello Everyone,I am working on a UVC project using the STM32U5G9ZJT6Q MCU, capturing 8-bit data via DCMI and streaming it over USB UVC to VLC or Windows Camera. To achieve higher FPS, I need to increase the USBD_VIDEO_EPIN_HS_MPS (High-Speed Max Packet Size) above 2500.However, when I try to set USBD_VIDEO_EPIN_HS_MPS beyond 2000, the image does not display, and no data appears in Wireshark.Is there a way to increase USBD_VIDEO_EPIN_HS_MPS above 2500 reliably, or are there specific configurations needed to support higher packet sizes?Any guidance or insights would be greatly appreciated.Thank you in advance!
Hello I'm developing RTOS environment of dual-core in STM32H757.Using the functions osThreadResume and osThreadSuspend now I'm programming the context swtiching.Recently, I found a good approach : context switching using the functions osEventFlagWait, osEventFlagClear, and osEventFlagGet. For the IPC(Inter-core Processing Communication) and time complexity, is the existing approach better, or is the new approach better?# The existing approach : using osThreadResume / osThreadSuspend# New approach : using osEventFlagWait / osEventFlagClear / osEventFlagGet Friendly regards, Tau
Hi I am using Memory Protection Unit on a Nucleo-G474 board and trying to adapt the MPU feature to existing software.I found in the pm214 that we can change the CONTROL register to enter or leave privileged mode. I tried to enter and leave privileged mode and it worked.My question is as following:Does this CONTROL register have something like a lifetime cycle ? Can I frequently update the CONTROL register, say 10,000 times a second and expect it will work for the next 10 years ? Thank you very much.
Hi, I see these functions have essentially the same functionality, is there any recommendation on which to use? I understand snprintf has the advantage of formatting other data types into the string, but for simple string = string functionality, does it matter which is used? I notice doing UnicodeChar a = UnicodeChar b also works.
My project is fully working with touchgfx and FreeRtos; however, I need to add in a printf("%f") statement. Whenever I use %f i get the following error: assertios "REENT malloc succeeded" failed: file "/build/gnu-tools-for-stm32_12.3 .rel1.20240926-1715/src/newlib/newlib/libc/stdlib/dtoa.c", line 239 I have used printf("%d") fine. I tried following others advice of generating a new project and copying over the sysmem.c file to the new version of sbreak, but when I do that my project no longer works as expected.Is there another way to fix specifically the printf issue without having to risk the integrity of the rest of my project?
Hello STM Community!,I'm trying to implement USB CDC ACM in standalone mode(without using ThreadX) on STM32H563ZI board. I have tried this with ThreadX and got it working.I have modified the Ux_Device_HID_CDC_ACM example project, by removing ThreadX, HID and UART part to make it CDC standalone for my requirement. But its not working.I have referred to these links:https://community.st.com/t5/stm32cubemx-mcus/usbx-standalone-on-stm32h5/td-p/705341I'm having few issues in these lines of code, it's showing Macro usage error, syntax error...can anyone explain the issue.after the line 87, from ux_device_stack_tasks_run.c file, its going to hard fault...as shown,I would greatly appreciate it if anyone who can debug the mistake in this process and could guide the further steps to take.Your insights and guidance would be invaluable to me. Thank you in advance for any assistance you can provide!Please find the attached, project folder for further info.
To:STTwo-32ST Employee Dear STTwo-32, Thank you very much for your reply for the last post (2024-12-02 10:42 PM): STM32H7B3I-DK__Build Errors__MX_I2C4_Init__have void (void) I have updated the software, and now using the STM32CubeMX V6.13.0, STM32CubeIDE V1.17.0 and the STM32CubeH7 V1.12.0. So far, do not see the build errors asked before; thank you! But having the following new build errors, and do not know what to do:(Copy from the Console of STM32CubeIDE after build)In file included from C:/STM32H7BWorkshop2020/STM32H7B3I-DK/Drivers/BSP/STM32H7B3I-DK/stm32h7b3i_discovery_ts.c:51, from <command-line>:../../Core/Inc/stm32h7b3i_discovery_ts.h:73:37: error: expected unqualified-id before numeric constant 73 | #define TS_I2C_ADDRESS 0x70U | 
I recently began using the B-L462E-CELL1 module for IoT applications, connecting it to a Raspberry Pi 4. My goal is to establish LTE-M Cat 1 communication using a Truphone eSIM.After watching the features video, I followed all the recommended guidelines. Instead of TeraTerm, I opted to use Minicom on my Raspberry Pi for interfacing with the module.Currently, the eSIM is active on Truphone's platform. However, the "SIMSold" status is stuck at "NwkSearch." This is the screen I have : The error message is : "NO_SUITABLE_CELLS_IN_TRACKING_AREA"So, may be I'm not in the truphone TAC, or a misconfiguration? Can someone help me to find a solution ? Kind regards.
After experiencing more problems in legacy codes, we found that STM changed HAL drivers without any notice. THIS CAN BE BLOCKING. Example : ((uint32_t)((pFilterConfig->BroadcastFilter == DISABLE) ? 1U : 0U) << 5) | is NOW ((uint32_t)((pFilterConfig->BroadcastFilter == ENABLE) ? 1U : 0U) << 5) | in HAL_ETH_SetMACFilterConfig() Only workaround: SPEND all the time it needs and check all drivers carefully for changes. stm32h7xx_hal_eth.c has dozen of changes, impossible to compare files and get differences easily.
Hi Folks, I'm stuck with an intermittent error on an array value ( array[0]) , which is sometimes overwritten to value "0" instead of the necessary value.I'm not able to find the source of this problem, is there any way to debug and intercept which instruction is actually overwriting this specific array location?The array should be written at turn on, and then never modified.Using standard debug, it seems the writing routine is never called after initialization, but after some time, array[0] is overwritten with "0"MCU is STM32U595 and code is written on STM32Cube in CNo hardfault appears nor other unexpected behaviour, except for this array[0] value Best Regards,Anton
Hello,I'm trying to get SPI to receive data from an ADC in a periodic interval, and must not use interrupts, as the whole application is already pushing the upper limit of what the MCU can handle. The code below is just a rough test, adapted from what I found in another thread in this forum. However, I still can't get it to work. Timer runs, DMA and DMAMUX seem to get configured, but nothing happens on the SPI CLK. Any ideas? void acq_configure_adc_transfer() { uint32_t circular_buffer[10]; __HAL_RCC_DMAMUX1_CLK_ENABLE(); __HAL_RCC_DMA1_CLK_ENABLE(); __HAL_RCC_SPI1_CLK_ENABLE(); __HAL_RCC_TIM1_CLK_ENABLE(); DMA1_Channel1->CCR = 0x0; //Disable DMA stream DMA1_Channel1->CPAR = (uint32_t)&SPI1->DR; //Set source memory region DMA1_Channel1->CMAR = (uint32_t)&circular_buffer; //Set peripheral data register as destination DMA1_Channel1->CNDTR = sizeof(circular_buffer) ; //Number of items to transfer //NVIC_EnableIRQ(DMA1_Channel2_IRQn); //Enab
Hi all,I have had an issue out the box where if i run the Nucleo-H723ZG Uart3 for debugging would stop communicating correctly, i tracked the issue down to the buad rate set incorrectly, after a few hours of adjustments i found that if the prescaler for D2PPRE1 are set to anything other than 1 the buad rate would be incorrect.After stepping thought the code if found that on uart setup the incorrect pclk would be provided which inturn set the incorrect dividers for the uart. I have fixed the issue by editing the lookup table D1CorePrescTableThe IC how runs at 550mhz and the uart and other peripherals are running correctly. I have checked the date sheet and all the registers, mask and positions are correct. What is the correct fix for this?
Hello all,While searching online, I came across this specification regarding USB FS:For full-speed communications, the data rate is specified to be 12 Mbps +/- 0.25%.I've decided to test this specification by connecting a STM32F415 MCU to a PC using a virtual com port.Instead of using the local 12MHz crystal, I've connected an external function generator which allows me to deviate from the center 12MHz frequency.I was trying to go up and down the 12MHz Reference, until I could see a loss of communication between the MCU and PC.The actual deviation was +/-700KHz from the 12MHz reference!!! which is very far away from the above specification of +/- 0.25%Can anyone explain the difference between the specification and the actual test?Thank you all,Nir
MCU: STM32L476RGT6Hello,I am able to communicate with the MPU6050 via I2C with DMA and read the WHO_AM_I register, but only one transmit and receive transaction occurs even though I put my transmission and receive code in a while loop.When using regular I2C transmission (no DMA), multiple transactions are performed (as expected). This tells me that there may be some flags I need to reset or functions I need to call between transmission. However, when comparing my code to this example, I could not tell what I was missing.My code is getting stuck on line 61 here. That tells me that an internal process is occurring, so the MCU is never ready for another transmission.Below is my driver code. What am I missing?Thanks.#define MPU6050ADDR 0b11010010int main(void){ uint8_t WHO_AM_I[1] = {0x75}; HAL_Init(); SystemClock_Config(); I2C_Init(); DMA_Init(); while (1) { if(HAL_I2C_Master_Transmit_DMA(&hI2C, MPU6050ADDR, WHO_AM_I, 1,100) != HAL_OK) Error_Handler(); while (HAL_I2C_GetState(&hI2
Hello I'm migrating my STM32F072 project to the STM32L072.In my original project (F072) I can jump to the DFU bootloader by software via a function located before SystemInit.I tried to convert this to be used by L072 by changing the address of bootloader program to 0x1ff00004 it's not working.Is it due to the dual memory bank? Is there a way to get it working?Thank-youAndré
Hi Community, I am using the Nucleo-H723ZG board for data receiving from the camera by utilizing the spi and processing the data then transforming the data through UDP to another program. The program can run for several hours without problem. But then it will suddenly lead to a HardFault problem caused by the wrong pointer to an invalid address inside the function of ethernet_input(struct pbuf *p, struct netif *netif) in the ethernet.c. The ethhdr is pointed to an invalid address and causes the HardFault: ethhdr = (struct eth_hdr *)p->payload; The address as I checked is a reserved memory somewhere, which can not be accessed (please also see the photo). The HardFault is very difficult to get, as it takes hours to run the program. Thanks for the help in advance.
Hello, I'm using a STM32U5GJ-DK1 with the same SPI setup, I can measure the SCK output on SPI2, but I can't do it on SPI3. *This post has been translated from Chinese to comply with the ST Community guidelines.
Dear ST Community I recently purchased two sets of Nucleo-DRP1M1+NucleoG474, and now I want to implement FRS functionality on these two boards. Currently, I have set one of the default power roles to Source, enabled FRS_TX, and the other to Sink. After connecting the two devices together, FRS switching cannot be triggered, and when I was debugging on the Sink side, I found that the FRS interrupt in the code on the Sink side is in a blocked state, and I don't know how to turn it on. Best regards.I added the FRS macro definition, but there is a function error inside that I cannot find
Posted on January 16, 2018 at 15:48In RM0390 rev.3, in Figure 347. SPDIFRX States, sync_done internal signal is mentioned (and nowhere else). Isn't it the same as SPDIFRX_SR.SYNCD, at least from the programmer's point of view? If so, please replace sync_done by SPDIFRX_SR.SYNCD in that figure, which removes unnecessary confusion (and also allows to remove the note in that figure).JW
Hi there, follow the attached picture, an easy question for you, for me an effort. left side:Compiling procedure for a simple 32-bit binary file, ARMright side:program code - board LED should turn onresult:turn on LED - failed Questions:AIn my opinion it is a failure regarding the "header-handling".I work with the present CMSIS-files.Are there hints to integrate the header in a right way?Are there program failures?BDo you know an exactly openocd-instruction to reach the same result as with stlink-gui? Regards,timbo2023
I'm trying to develop an application for the STM32H750 using USBX to implement two classes on the same USB device: CDC ACM and MSC. I've managed to get each one working individually, but I'm having trouble combining them. When I connect it to a PC, no driver is assigned to the CDC, although it's recognized as both a mass storage and communication device. Has anyone encountered this issue before? Is there any example I can use as a reference?
First of all I am not sure if this is the right location. It wasn't: you posted under MPUs; moved to MCUs.I have a custom PCB with an STM32H5 chip embedded.This PCB needs to be a USB Host for a sensor that uses USB. If I connect the sensor to my laptop the sensor works fine, but when I have the sensor connected to the PCB. I doesn't work as expected.We used an logic analyzer to see if there was any difference in the messages that were being send, but we don't see any difference, except for the address. In the images below, you can see the images. image(3) is the image from Laptop to the sensor. image(4) is the image from PCB to the sensor.I used this library https://github.com/STMicroelectronics/stm32-mw-usb-host/tree/8b21b5c4a6b8df42ad46b9df63bb87c47bd7b2f5 as I want to be able to use FreeRTOS and not be stuck with ThreadXDo you have any idea where I could look or what we might have done wrong or something we missed. I also included a .zip of the code as we have it right now.If there
I'm trying to trigger ADC using an high resolution timer with period 500 KHz. The board is STM32F344. ADC is using DMA. I'm using FreeRTOS CMSIS V2. System clock 64MHz. So, two issues immediately came up: 1) After launching the timer using HAL_HRTIM_SimpleBaseStart_IT , all the tasks get blocked giving up the control to the HRTIM. I lowered down the HRTIM period to 200Hz and the system got working again, although this behavior is weird: my tasks priorities are 24 and HRTIM 5. I tried to clear the update flag on the ISR handler as described in one of the posts here in the community but with no success. I always have troubles running hardware timers on FreeRTOS.2) ADC conversions show up too fast and wrongly in the debugging window. Although the conversions are being triggered too fast for a human or even the debugger, we can still see some readable raw data on the debugging window. My raw ADC measurements are swapping from 0 up to 100-ish very fast, but when I stop t
HelloI have a custom board with a STM32H730 and SD Card connected to the SDMMC peripheral, quad lines. I'm using the FatFs file system as added in CubeMX.My question is why does the file write rate drop after the first file (open/write/close) unless I mount/unmount each time?I create a new file and write 1KB of data, its takes about 12ms for the first file. But for subsequent files I create and write the same 1KB of data it then takes around 160ms.But if I call mount() and unmount() each time when creating and writing the 1kB file, it takes ~12ms each time.The test program below outputs File 20 x 800 Byte Write with mount/unmount each time.> elapsed time = 641 msFile 20 x 800 Byte Write without one mount/unmount.> elapsed time = 3522 ms void CFileSystem::TestWriteSpeed() { char wbuff[800] = {0}; char fname[32] = {0}; UINT bytesWritten {0}; FIL file; uint32_t timens; printf ( "File 20 x 800 Byte Write with mount/unmount each time.\n" ); timens = osKern
Hello everyone, I encountered a problem while using STM32L431 for RS485 development. I used the ISO7041 isolation chip, and in the initial state, the DE pin is low, while both TX and RX are high. The current issue is that when I turn on the power, reset, and plug in 485, both the transmission and reception of 485 are normal. However, when I unplugged and inserted 485 again, an FE error occurred. Why is this? Is it because the voltage level does not match after inserting 485?Debugging found errorsflags=2, which should be FE errors。Here is some of my code: int main() { HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_LPUART1_UART_Init(); HAL_GPIO_WritePin(DE485_GPIO_Port, DE485_Pin, GPIO_PIN_RESET); initSqQueue(&uart[_LPCOM].Rx, lpuartRxBuff, sizeof(lpuartRxBuff)); initSqQueue(&uart[_LPCOM].Tx, lpuartTxBuff, sizeof(lpuartTxBuff)); __HAL_UART_ENABLE_IT(&hlpuart1, UART_IT_RXNE); __HAL_UART_ENABLE_IT(&hlpuart1, UART_IT_IDLE); while(1) { Process_Modbus_R
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.