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 am developing an app for the STM32H562 which is configured using STM32CubeMX and uses threadx, As threadx takes over systick, I have set SYS->Timebase Source to TIM6. I have a routine that is used during startup, before threadx is running, and HAL_GetTick () returns a tick count incremented every millisecond. When the same routine is used after threadx is started, HAL_GetTick () returns a tick count incremented every ten milliseconds. Isn’t HAL supposed to use TIM6 both before and after threadx starts up?
Using the STM32CubeMX-generated code for initializing the MDF peripheral, using SITF0 with CCK0 as output clock and DFLT0 and DFLT1 both receiving rising and falling data from SITF0 respectively, the clock appears to glitch high for about 44us (in my case, with 2.048MHz CCK0 output clock and 20.48MHz MDF1 kernel clock) while the peripheral is being initialized. Pausing the clock like this could cause odd behavior for some devices. I have attached scope traces of this glitch. I’m not sure what the exact cause is here, but it can be worked around by not initializing the CCK0 output pin until after MX_MDF1_Init() has completed.
Hi,I am developing application on B-U585I-IOT02A (STM32U585), using mx_wifi component V2.3.3 (SPI transport, socket mode MX_WIFI_NETWORK_BYPASS_MODE == 0), EMW3080B module firmware V2.3.4, bare-OS shim, link associated and DHCP lease verified before every test.Symptom. MX_WIFI_Socket_setsockopt() returns -1 immediately for MX_SO_BLOCKMODE (0x1000) at level MX_SOL_SOCKET (0xfff). The refusal is value-invariant: optval 0 and 1 behave identically (0 would request the module's default state), and OptLen 1, 2 and 4 all fail — so the option name, not the payload, is rejected. MX_WIFI_Socket_getsockopt() on the same option is refused as well, so the effective mode cannot even be read back. Mainstream options on the same socket (MX_SO_REUSEADDR, MX_SO_SNDTIMEO, MX_SO_RCVTIMEO) succeed.Minimal reproint32_t sock = MX_WIFI_Socket_create(obj, MX_AF_INET, MX_SOCK_STREAM, MX_IPPROTO_TCP);int32_t optval = 1; /* 1 = non-blocking */int32_t ret = MX_WIFI_Socket_setsockopt(obj, soc
Hi,I'm developing an STM32 application that utilizes mx wifi component from B-U585I-IOT02A board support package, i am trying to configure it to utilize CMSIS_OS but it fails to build out of the box then.Symptom. Setting MX_WIFI_USE_CMSIS_OS == 1 does not compile against a CMSIS-RTOS v2 environment. The component's CMSIS layer declares and uses CMSIS-RTOS v1 identifiers that do not exist in the v2 shim (cmsis_os.h here only forwards to cmsis_os2.h, osCMSIS = 0x20001U):/* mx_wifi_cmsis_os.h */#define LOCK_DECLARE(A) osMutexId A /* v2 type is osMutexId_t */#define FIFO_DECLARE(Q) osMessageQId Q /* line 187: v1 type, v2 has none */void *fifo_get(osMessageQId queue, uint32_t timeout); /* line 238 */osThreadId thread_new(const char *name, void (*thread)(void const *), ...); /* 250 *//* LOCK_INIT's osCMSIS >= 0x20000U branch still calls v1 macros: */osMutexDef(MUTEX); (A) = osMutexNew(osMutex(MUTEX)); /* osMutexDef/osMutex are v1 *
Is there a ready-to-use starter project for the STM32F107RCT6 with LWIP, FreeRTOS, and TCP/IP already fully configured and working?
Im doing a float conversion on an stm32h7, IDE is stm32cubeide v2.2.0 and using GNU tools for stm32 14.3rel1.When i step through my code, I perform a conversion TO a float from an int32_t. The converted value (in decimal format, viewing via the Variables view in the debugger) is WAY bigger than the int32_t i put in. Here is the code along with all my attempts to eek out every piece of info i could:static void MIC_Capture_Process(const int32_t *raw){ uint32_t wr = mic_ring_wr; uint32_t rd = mic_ring_rd; uint32_t i = 0; float x = 0; float y = 0; float scaled = 0; int16_t out = 0; int16_t mag = 0; int32_t raw_at_i; int32_t raw_at_i_shifted; float raw_at_i_shifted_f_1, raw_at_i_shifted_f_2; int32_t a1,a2,a3,a4,a5; for (i = 0U; i < MIC_CAPTURE_DMA_HALF_SAMPLES; i++) { raw_at_i = raw[i]; a1 = (int32_t)&raw_at_i; raw_at_i_shifted = raw[i] >> 8; a2 = (int32_t)&raw_at_i_shifted; raw_at_i_shifted_f_1 = (float)raw_at_i_shifted; a3 = (in
Hi,I’m seeing some odd behavior on the STM32C5 when waking the uC up using the wake-up pins from standby mode.TLDR: The uC seems to ignore the configured wake-up pin polarity and wakes up on any edge. Is this a known issue with the STM32C5 controller?In STM32CubeMX2 I configured the PWR peripheral low power mode to standby with wake-up pins 4 and 5 as wake-up sources. The signal on these pins are default high and I need the uC to wake up on a falling-edge on either pins (configuration images / generated code below).To enter the standby mode in my application I call the following two functions and the controller goes to standby successfully:HAL_PWR_LP_CleanWakeupSource(HAL_PWR_WAKEUP_SOURCE_ALL);mx_pwr_enter_low_power();Now I expect the uC to only wake up on the falling-edge trigger so I tried:Wake-pin was HIGH, put uC to standby, pulled wake-pin LOW and the uC woke-up as expected. Wake-pin was LOW, put uC to standby, pulled wake-pin HIGH and the uC woke-up. This is unexpected as it is
I have been trying to use my stm32f769i disco board i have tried trigering the lcd tft display but even though i use bsp examplesalso im not able to tunr on the display .If any one have expereince in delaing with this issues ? could you help me sort this out!
I am struggling with creating USB CDC_ACM standalone using only USBX. In my project my only aim is using my PCB as COM port using with USB connection. With that later on i will upload some settings etc. with usb connection. I cannot pass first step: Windows can not see my device successfully. Often throwing Code43 and Code10 errors. And rarely successfull connection established with the same code pattern. I am not sure if i do the things correctly. In LAB videos and official documents, they achieve USB standalone only using USBX with STM32U0 family. BUt i am not sure if this concept covers the CDC_ACM Standalone. Because i am new at USB communication, terminologies messing in my mind. To sum up, i want to be sure that if i can achieve USB standalone(bare-metal) applicaiton using only with USBX for CDC_ACM (virtual COM port)?
Hi, I hope everyone is doing well. I have an application on an STM32N6 that is running a VENC JPEG encoding (each 2nd frame, snapshot) and a neural network inference (every frame, continuous). These happen on two different DCMIPP pipes. Additionally, I have two modes of compiling my application:Debug `-g3 -O0` Release `-O2` (no debug)No other flags change, because I just manually edit them, I don’t use profiles or similar modernities. In debug mode I see the application working properly as expected (almost; there are times it hangs, just like the next scenario). When it runs in release mode, the VENC JPEG encoder “randomly” picks a frame here and there to encode, so it’s very very choppy (seconds between a frame; the library returns the code: `H264ENC_HW_BUS_ERROR = -9`). I do see the NPU working as expected (according to my internal counters). Some noteworthy things, since I don’t know if those matter:AXISRAM2: Model weights are loaded into here AXISRAM3: NPU input (pipe A) + jpeg ou
The VENC peripheral on the N6 boasts a hardware handshake path with the DCMIPP peripheral, potentially allowing full compression of each frame to occur with very little active RAM. From what I can find, the DCMIPP capture starts, then the VENC is told to start encoding, and the application only then receives notifications when a frame is complete. There should be no further interaction. However, I am unable to get this working for MJPEG. The examples for this sort of streaming are all for h264, and the JPEG is thrown to the side as a one-time encoding. I have reasons on this project to use MJPEG encoding, but I cannot get the VENC to perform this handshake with the supplied example code. I have attempted to modify the JPEG Encoding Example that uses the VENC, and have successfully used the VENC for JPEG encoding of a full in-RAM frame, so I know the peripheral can work. Relatedly, the only articles on the handshake algorithm I can find is for the H264 compression.I'm looking for any wo
I just started looking at the STM32C071 family as an alternative to the STM32F042 and STM32F072 we currently use. To my disappointment the USB stack for the C071 is a total mess (dozens of files and complete spaghetti) and on top of that it seems to be written by Microsoft. So there is absolutely no way we are going to use that.Did I miss some other option for the USB device library? This USBX stuff definitely is no option at all.At first glance it looks like there are no significant differences between the USB hardware of the C0 and F0 if only used as device not host. So I am wondering if I can simply use the F0 libraries (which we have debugged and optimized…) on the C0. Or are there any hidden traps?
Hello,I was trying to run AC1 and ADC2 in Dual mode and ADC3 configured as independent one.Using HAL_ADC_Start for ADC3 doesn’t start the converter as it checks multi-mode in common ADC_CCR register wrongly not allowing to use ADC3 for ADC_DUALMODE_REGSIMULT (value 6). I prepared a patch for stm32f4xx_hal_adc.c, but not for injected channels from stm32f4xx_hal_adc_ex.c file as they have a similar issue.Could it be checked by library owner or someone responsible for the code? Firmware Package Name and Version : STM32Cube FW_F4 V1.28.3STM32CubeMX 6.14.0MCU STM32F446ZEJx Best RegardsJarosław Hill
I am working with an STM32U575, HAL version 1.5 and found the issue described below(Have checked the HAL code for the H5 and H7 and these contain the same issue)See picture below, when aborting an PSSI transfer, before checking the state on lines 1258 and 1277, the state of the PSSI is already set to HAL_PSSI_STATE_ABORT. As a result the DMA transfer is not correctly aborted since none of the two conditional paths are taken.
Using STM32CubeMX 6.18.1 and STM32CubeIDE 2.2.0 on Nucleo-STM32H563ZI under ThreadX. LPUART1 is transmitting 5-10 bytes to Nucleo-G431RB which responds with 6-10 bytes. I can see the exchange on a logic analyzer. The DMA transmits 10 bytes, the last 5 of which are all zeroes. The response starts around the third zero byte and all 6 bytes flow back to the STM32H563 LPUART1 which does not respond.I started this process with HAL_UARTEx_ReceiveToIdle_DMA(&hlpuart1, rs422rxDmaBuf, 10); __HAL_DMA_DISABLE_IT(hlpuart1.hdmarx, DMA_IT_HT);After 2 calls to HAL_UART_ErrorCallback() (using breakpoints in HAL_UART_ErrorCallback() to verify it). The first call has DMA errors, so I call HAL_UARTEx_ReceiveToIdle_DMA(). On the second call there is no DMA error so it saves some registers for printing later and I see: DMA CSR=0x00000001 DMA CCR=0x00005D00 LPUART ISR=0x00600000. So why the call to HAL_UART_ErrorCallback() ? In all this while I am still sending 5 bytes and getting a re
My FMC clock, set to continuously generated, only cycles during a bus transaction.On my STM32N657I0H3Q, I have the following setup:FMC enabled in applicationChip Select NE1Muxed PSRAMData/Address: 16 bitsClock: Burst Read WriteAddressValid: YesWait: SynchronousThen, in the configuration, I have "CLK generated continuously" set. I have confirmed all of these settings in the resulting fmc.c code. I've also verified at runtime that hsram1.Instance->BTCR[FMC_NORSRAM_BANK1] = 0x183997(Where 1<<20 -- 0x1000000 is continuous clock generation).Meanwhile, my oscilloscope shows the FMC_CLK waveform:Clearly not continuous!
Hello ST Community,I am facing an issue with my STM32F4 Discovery board after changing the Readout Protection (RDP) level from Level 0 to Level 1 using STM32CubeProgrammer.Issue DescriptionInitially, my application was working properly with RDP Level 0. I then changed the RDP level from Level 0 to Level 1 using STM32CubeProgrammer.After this change, my main application stopped running. Nothing happens after resetting or even performing a complete power cycle of the board.Steps PerformedProgrammed my application successfully with RDP Level 0. Verified that the application was running correctly. Changed the RDP level from Level 0 to Level 1 using STM32CubeProgrammer. Reset the board. Also tried disconnecting and reconnecting the power.However, the application does not start executing anymore.
We are observing an intermittent internal crash and automatic restart of the ST67W611M1 while using the T01 mission firmware with X-CUBE-ST67W61.ConfigurationModule: ST67W611M1X-CUBE-ST67W61 middleware: v1.3.0Mission profile: T01AT version: 1.0.0SDK version: 2.0.106Wi-Fi MAC version: 1.6.44BT Controller version: 1.6.128BT Stack version: 1.10.83Module build date: Mar 20 2026Host MCU: STM32U5 seriesInterface between STM32 and ST67W611M1: SPIArchitecture:Wi-Fi and TCP socket provided by ST67W611M1 T01 firmware TLS runs on STM32 using MbedTLS MQTT 3.1.1 runs on STM32 X.509 authentication is handled on the STM32 sideProblemDuring continuous TCP traffic, the ST67W611M1 intermittently generates a RISC-V exception, produces a QCC74x core dump, and restarts.The recurring exception is:exception_entry mcause=30000005 mepc:62fd0de2 mtval:842a0748 Load access faultThe corresponding ST67 firmware build ID is:551e2178cb2e0e5f41ed380892ed67064c504657The same fault signature has been reproduced multipl
… but ST documentation is still referring to it as “Azure”; eg, https://dev.st.com/stm32cube-docs/mw-usbx/2.0.0/en/docs/markup/faq.html and:and:https://wiki.st.com/stm32mcu/wiki/Introduction_to_USBX#Introduction I think this is also out of date:There are now USBX examples available without ThreadX - aren’t there?
Hello, I'm trying to do a quick test with the STM32F412G-Discovery kit and the analogue microphone input.I use this example https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32F412G-Discovery/Examples/BSPwith the menu #### AUDIO REC ANALOG ####.The problem is that the firmware crashes at the line BSP_AUDIO_IN_Record(internal_buffer, AUDIO_BLOCK_SIZE); void AudioRecAnalog_demo (void) { AudioRec_SetHint(); /* Initialize Audio Recorder */ if (BSP_AUDIO_IN_InitEx(INPUT_DEVICE_ANALOG_MIC, DEFAULT_AUDIO_IN_FREQ, DEFAULT_AUDIO_IN_BIT_RESOLUTION, DEFAULT_AUDIO_IN_CHANNEL_NBR) == AUDIO_OK) { BSP_LCD_SetBackColor(LCD_COLOR_WHITE); BSP_LCD_SetTextColor(LCD_COLOR_GREEN); BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() - 95, (uint8_t *)" AUDIO RECORD INIT OK ", CENTER_MODE); } else { BSP_LCD_SetBackColor(LCD_COLOR_WHITE); BSP_LCD_SetTextColor(LCD_COLOR_RED); BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() - 95, (uint8_t *)" AUDIO RECORD INIT FAIL", C
I am using code from STM32CubeH5/Projects/NUCLEO_H563ZI/Applications/NetXDuo/Nx_UDP_Echo_Server which I copied over to my own project running on the NUCLEO_H563ZI using STM32CubeIDE 2.2.0 and STM32CubeMX 6.18.1 with ThreadX and NetXDuo both selected.DMA is not configured in the example and yet the code calls the HardFault() when it starts to configure the DMAHAL_StatusTypeDef HAL_ETH_GetDMAConfig(const ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf){ if (dmaconf == NULL) { return HAL_ERROR; } dmaconf->AddressAlignedBeats = ((READ_BIT(heth->Instance->DMASBMR, ETH_DMASBMR_AAL) >> 12) > 0U) ? ENABLE : DISABLE; dmaconf->BurstMode = READ_BIT(heth->Instance->DMASBMR, ETH_DMASBMR_FB | ETH_DMASBMR_MB); dmaconf->RebuildINCRxBurst = ((READ_BIT(heth->Instance->DMASBMR, ETH_DMASBMR_RB) >> 15) > 0U) ? ENABLE : DISABLE;I used the debugger and tried to access DMASBMR and it told me it could not access 0x1004. Why not? What or why were part
Hi all,I am using the VENC H.264 encoder (Middlewares/Third_Party/VideoEncoder from the STM32 model zoo object detection application) on the STM32N6570-DK Discovery Kit with the IMX335 camera. The encoder is fed RGB565 frames from DCMIPP (1280x720 buffer in external PSRAM), and the output goes to a PSRAM buffer.Problem:H264EncInit, H264EncSetPreProcessing, H264EncSetRateCtrl and H264EncStrmStart all return OK. The first H264EncStrmEncode call (intra frame) then returns -17 (H264ENC_FUSE_ERROR). In the driver, this is raised when the VENC status register has ASIC_STATUS_FUSE (0x200) set. The register description in encswhwregisters.h says: "IRQ stream format fuse status bit. Format disabled by fuse."After that, later frames often fail with -7 (INVALID_STATUS), then -14 (INSTANCE_ERROR), sometimes -3 (INVALID_ARGUMENT) or -16 (HW_RESET). At times the encoder recovers after frame 0 and produces a stream; at other times it never does. The behaviour is not consistent between runs, even at 6
Hi,On the STM32G4 I was able to configure ADC1 and ADC2 in Dual regular simultaneous + injected simultaneous mode using DMA in Circular mode, so that I only needed to configure the DMA for ADC1 (Master) and the data from the regular conversion of ADC1 and ADC2 were placed in a single 32-bit variable, with the most significant part containing the value of ADC2 and the least significant part with the value of ADC1.When I try to do the same thing for the STM32G5, an error occurs in the configuration of ADC2, requiring me to configure the DMA for ADC2 as well. It doesn't make sense to use the ADC in dual mode if I have to use a DMA channel for each ADC. How can I modify the attached ioc2 file to make it work as I did for the STM32G4? And what code should I include in main.c to start DMA in circular mode using low level library?
Hello,I am investigating a low-power issue on a custom board with an STM32U585CIU6, silicon revision W, using the LDO regulator and FreeRTOS.During normal operation, the MCU periodically enters STOP2 from the FreeRTOS tickless idle hook. When the user selects power off, the application saves its state, powers down the display and enters Shutdown.The wake source is PB8 / WKUP5, input selection 2, active low. It is connected to the open-drain INT output of a TMAG5273 magnetic sensor. The sensor remains powered and is configured for autonomous Wake & Sleep measurements with a latched threshold interrupt.Original failureAfter entering Shutdown from the full application:The magnetic button did not wake the MCU. External NRST also failed to recover the device. ST-LINK could not connect, including connect-under-reset at a low SWD frequency. Cycling the board power restored operation.The NRST signal was physically checked. NRST worked normally before the failure.The original problem occurr
Hello. I'm developing a custom STM32CubeProgrammer External Loader for an STM32U575 board connected to an AT25SF641B SPI NOR Flash (8 MB).The loader is recognized by STM32CubeProgrammer and loaded into RAM correctly, but I'm experiencing a mix of issues and I'm running out of ideas.MCU: STM32U575 External Flash: AT25SF641B Interface: SPI1 + GPDMA STM32CubeProgrammer: v2.23.0 Toolchain: GCC (STM32CubeIDE)The loader is correctly detected by CubeProgrammer.CubeProgrammer executes:Init flashloader...run ap 0and after about 100 seconds reports:Init function fail with timeout A minimal Init():int Init(void){ return LOADER_OK;}works correctly.The problem appears only when initialization code is enabled.Current implementation:int Init(void){ extern uint32_t __isr_vector_start__; extern uint32_t _sbss; extern uint32_t _ebss; ERROR_T ErrorValue; SystemInit(); SystemCoreClockUpdate(); SCB->VTOR = (uint32_t)&__isr_vector_start__; __DSB(); __ISB(); ErrorValue
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.