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
Board / softwareSTM32N6570-DK (MB1939), STM32N657X0H3Q STM32Cube FW_N6 V1.4.1, ThreadX + USBX from the package (not X-CUBE) STM32CubeIDE, load-and-run development flow (ELF downloaded into internal SRAM by the debugger; no FSBL, no XIP, no external loader) USB2_OTG_HS configured as Host_HS on CN17, internal HS PHY OTGPHY2 clock = RCC_USBPHY2CLKSOURCE_HSE_DIRECT, 24 MHz HSE crystal CPU 600 MHz, AHB 200 MHz USBX: UX_MAX_DEVICES 8, UX_APP_MEM_POOL_SIZE 98304, USBX_MEMORY_STACK_SIZE 65536, only the CDC-ACM class registeredWhat worksA USB 2.0 mass-storage device (HP, VID 0x03F0 / PID 0x2003) enumerates reliably and repeatedly:[usb] idVendor : 0x03F0[usb] idProduct : 0x2003[usb] bcdUSB : 0x0210[usb] bMaxPacketSize0 : 64[usb] speed : HIGH[usb] state : ADDRESSED[usb] -- interface 0 class 0x08 (mass storage) 0x06/0x50[usb] ep 0x81 BULK IN mps 512[usb] ep 0x02 BULK OUT mps 512UX_DEVICE_ENUMERATION_FAILURE here is e
I found an ADC regression on `STM32H563RG` after upgrading from `STM32Cube FW_H5 v1.5.1` to `v1.6.0`.Setup:- MCU: `STM32H563RG`- Old package: `STM32Cube FW_H5 v1.5.1`- New package: `STM32Cube FW_H5 v1.6.0`- CubeMX: `6.17.0`Symptom:- I sample multiple external channels on `ADC2`, including `ADC2_INP0`.- Before the upgrade, `ADC2_INP0` measured correctly.- After the upgrade, `ADC2_INP0` no longer reflects the actual GPIO input voltage, while the other ADC2 channels still behave correctly.This is not a sampling-time or rank-order issue. The problem follows `ADC2_INP0` specifically.The regression appears to come from a change in the LL helper for Channel 0 GPIO switch control.In older FW_H5 code, `LL_ADC_EnableChannel0_GPIO()` always set `ADC1->OR.OP0`, regardless of the ADC instance passed in.In FW_H5 v1.6.0, that helper was changed to set `ADCx->OR.OP0` instead. On STM32H563, that breaks `ADC2_INP0`.What fixes the problem in my testing is:- still enabling Channel 0 GPIO switch cont
I am not sure but if this is a minor issue or should be fixed when working with STM32U083CCT6 MCU and those line is inside stm32u0xx_hal.c file.Note: I can not add picture or drag it i dont know why. * @brief Configure the Flash prefetch and the Instruction cache,* the time base source, NVIC and any required global low level hardware* by calling the HAL_MspInit() callback function to be optionally defined in user file* stm32g0xx_hal_msp.c. In the automatic generated comment lines it state that it was in stm32g0xx_hal_msp.c. If those kind of minor issues should be reported somewhere else , i use that place if i come accross the same situation again.(I am working with stm32u0xx by the way via CubeMX selection and code generation)
I am noticing a particular issue while measuring the internal temperature sensor using ADC on an STM32H743. Since my Vref tends to vary with temperature, I am internally sampling the Vref to measure the correct reference to the temperature sensing unit. In the main codeblock that calculates the temperature from the ADC values, I am using the built-in calibrated values for 30C and 110C. Please see below. My ADC is setup in the following way. static void MX_ADC3_Init(void){ hadc3.Instance = ADC3; hadc3.Init.Resolution = ADC_RESOLUTION_16B; hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE; hadc3.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc3.Init.LowPowerAutoWait = DISABLE; hadc3.Init.ContinuousConvMode = DISABLE; hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV4; // 64 MHz / 4 = 16 MHz // --- CRITICAL POLLING SEQUENCE CORRECTIONS --- hadc3.Init.NbrOfConversion = 2; hadc3.Init.DiscontinuousConvMode = ENABLE/*DISABLE*/; // Pauses sequence after each rank hadc3.Init.ExternalTrigCon
I have many timers working on out H743VIT6 board, so only have Tim2, 5, 12 and above available.I have many forms of of timer triggered DMA working, but in this case as the system is near to max capacity, I need a DMA event scheduled for 52uS in the future WITHOUT using IRQs which are not time-stable enough for the purpose.So I found that timer 16 in table 98 of the RM0433 manual is show connecting to timer 2, but in CubeMX timer 15 shows no trigger source!So I though I would set up timer 5 to count down 52uS and trigger its DMA stream to write a half word to CR1 of Timer 15, that was setup to pace its own DMA stream. Now I can get tier 15 triggering and DMA transfering it I enable it via the end of event cllback for timer 5, but DMAing to CR1 of an diabled timer doesn’t seem to work.It’s a very complicated problem! // Arm one amplitude bank, started by a TIM5 countdown delay to trigger DMA write to enable a target timer with DMA streamHAL_StatusTypeDef ArmOneBank(uint32_t *pwm_values,
Board: custom STM32N657Z0H3Q (not a Discovery/Nucleo)Flash: Macronix MX25U12835F, 16 MB, Quad (x4), 1.8 V, no DQSTools: STM32CubeProgrammer 2.22.0 and 2.23.0, LinuxWe need to program the external XSPI NOR flash (FSBL + application) using only USB serial boot / DFU, with no ST-LINK connection.This is a product requirement, not a bring-up convenience. On our board, entering development boot requires BOOT1 = 1, and BOOT1 (PA6) is wired as DCMIPP_PIXCLK and actively driven by an on-board FPGA. We cannot reliably force that pin without contending with the FPGA driver. USB serial boot needs only BOOT0 = 1 and BOOT1 = 0, which is the FPGA-idle state, so it is the only strap combination that is safe on this hardware. We attempted to relocate BOOT1 via OTP19 dev_boot_port/dev_boot_pin, and that attempt left the board permanently inaccessible. That is a separate open thread with no resolution so far: https://community.st.com/stm32-mcus-products-25/stm32n657-after-programming-otp19-dev-boot-port-
I am currently developing a USB Mass Storage application using the STM32H563ZI with the following architecture:PC ← USB ← NUCLEO-H563ZI ← SD CardThe SD Card and USB Device have both been tested separately, and each works correctly on its own.However, after integrating the two, I would like to use USB MSC to expose the SD Card connected to the STM32H563ZI as a removable storage device on the PC. The PC is currently unable to recognize the SD Card properly.I would like to ask if there is any example code or reference project for the STM32H563ZI that demonstrates USB MSC with an SD Card.Thank.
STM32F303 official SVD v1.3: Missing TI1_RMP field in TIM16_OR registerHello ST team,I found a missing bit-field definition in the official STM32F3 System View Description (SVD), version 1.3.Affected file: STM32F303.svdOfficial download:https://www.st.com/en/microcontrollers-microprocessors/stm32f303rc.html#cad-resources1. Issue descriptionThe TIM16 peripheral includes the OR register at offset 0x50, but its SVD definition does not contain any <fields> element:<register> <name>OR</name> <displayName>OR</displayName> <description>option register</description> <addressOffset>0x50</addressOffset> <size>0x20</size> <access>read-write</access> <resetValue>0x0000</resetValue></register>2. Reference manualAccording to RM0316 Rev. 10, Section 23.6.17, page 767, the TIM16 option register contains the following field: Register: TIM16_OR Address offset: 0x50 Field: TI1_RMP[1:0] Bit p
Main goal is to measure the RMS value of the mains, first question is can i perform the calculations using floating point or fixed point? The RMS requires the sqrtf function, can i use the function due to its number of cycles?
Hello everyone,I’m working with the STM32U5G9J-DK2 and trying to implement a Bootloader + XIP (Execute-In-Place) application architecture using the external flash.Target setup:A minimal bootloader running from internal flashThe main application linked to and executing from external flash (memory-mapped at 0x90000000)The main motivation is to free internal flash and validate this approach for a future MCU with very limited internal flash.What I’m specifically looking for help withProper CubeMX / .ioc configuration for the bootloaderWhich peripherals must be enabled (RCC, PWR, ICACHE, OSPI, etc.)Which peripherals should not be enabled to avoid conflicts with the XIP appAny STM32U5-specific gotchas when initializing OSPI for XIPProper configuration of the application projectRecommended changes to the application .iocWhat initialization should be removed from the app (HAL_Init, clock, OSPI, FLASH, etc.)Reference samplesSTM32Cube examples that demonstrate a full bootloader + XIP app flow on
Hello together,my Problem ist that I can find randomly (a few times per hour) timestamps which are delayed by 1ms, after that the delays consist and kind of add up. The cause for this is probably the SysTick_Handler firing 2x in a row and increasing my Uptime_ms timestamp. But here the extended information: I have a STM32H7 connected to a ADC via SAI. As I want precise time measurements my Code for capturing the time in the SAI_IRQ is the following: { uint32_t primask = __get_PRIMASK(); __disable_irq(); SAI_isr_systick = SYSTICK_VALUE; SAI_isr_uptime_ms = hfwtmr_Uptime; __set_PRIMASK(primask); // restore PRIMASK state}with:#define SYSTICK_VALUE (SysTick->VAL)volatile int64_t hfwtmr_Uptime = 0;volatile int64_t SAI_isr_uptime_ms = 0;volatile uint32_t SAI_isr_systick = 0; For setting up the Systick HAL_InitTick() is used. As the STM32H7 is running with 480MHz the systick gets loaded to 480000 every time. A screenshot auf the call hierarchy is added after the code segmen
As far as I can tell from the naming, this is the file which is supposed to cover both the non-suffixed and J-suffixed STM32C552Rxx. However, I can’t see any, e.g. mention of the PE2..PE5 pins which are present for the J-suffix.I still would very much like to see the ‘C5 family covered also by the “old style” xml in the Open pin data.JW
I am working on a project involving communication between an STM32H753 and an FPC2534. I have successfully connected the two components, and the system works as expected; however, it stops functioning when I enable the I-cache and D-cache on the STM32H753. Could you explain why this happens?
Hello,I have a STM32U585. I’m trying to use SAI to transmit and receive I2S audio as a slave. The I2S master is an external codec that’s configured for stereo 16bit 16kHz audio. Mic/input from codec->MCU and speaker/output from MCU->codec. The first stereo sample received on the codec is routed to the left speaker and second to the right. This works as expected for the mic. For the speakers, sometimes even samples will play on the right side and odd on the left. I’ve loaded the DMA buffer with dummy values 0xAAAA and 0x0000 to demonstrate. MISO is the signal of interest here. I’d like 0xAAAA to be on Ch 1 consistently.Expected SamplesUnexpected SamplesThis occurred about 50% of the time. It’s observable for the entire runtime and doesn’t correlate with how long the software has been running. I suspected a sync issue SAI/DMA so I implemented a quick hack to poll the GPIO to start the DMA transfer after the falling edge of WS to help sync. This improves reliability from 50% to 90%.
Hello,on a shared SPI bus (one master, several slaves, one NSS line per slave, the "Standard multislave communication" topology of RM0456 §68.4.5), an STM32U5 SPI slave with hardware NSS sometimes ends a transaction early. EOT is raised 112 or 126 bytes (frames) before TSIZE, with no UDR, OVR, MODF or FRE flag. The slave then stops driving MISO, so the master receives the last ~110 bytes as 0x00, while on the slave the HAL reports a normal "transfer complete". The data corruption is silent.When it happensEach slave prepares its next transfer on its own, with HAL_SPI_TransmitReceive_DMA, which sets SPE as its last step, and then raises a "ready" GPIO for the master. So the call sometimes falls while the master is clocking another slave: this slave's NSS is high and SCK is toggling. That is the only case in which the failure appears.With only one slave active (no foreign traffic on SCK) it never happens. It is the instant SPE is set that matters, not the DMA setup. Our workaround: prepar
In the topic “STM32U5G9J-DK2 application example \"Fx_NoR_Write_Read_File\" is not working” there is a problem described which I fear still is present today. The ticket mentioned there is 180260, can someone please check if the patch mentioned is available by now?Thanks.
Hello everyone,I measure a voltage on a STM32L496 using the internal ADC and found the following issue:Setup:The voltage is scaled down via a high-impedance voltage divider (2 x 470kOhm). To avoid distortion by sampling, the voltage divider has a 100nF capacitor. Thus, the capacitive load while sampling is low and the breakdown is 1/20000 → i.e. way lower than the ADC’s resolution. So I do not have to care about source impedance limitations as described in the datasheet (Maximum ADC RAIN).Other data:VREF=VDDA=3.3V (stable) Voltage range of ADC input signal: 0 - 3V (never >3.3V)Effect:I experience a large voltage breakdown when I configure the ADC, via CubeMX generated function MX_ADC3_Init (same happens when I use ADC1). I found, that within MX_ADC3_Init the channel gets configured and the ADC sequencer register ADC_SQR1 is set (I only sample that one channel with the high-impedance voltage divider). As soon as ADC_SQR1 is set, the voltage breaks down, from anything >2.5V to appr
Hi everyone,I'm using UART Receive-to-IDLE with circular linked-list GPDMA on an STM32H7RS and ran into a problem where reception stopped with HAL_DMA_ERROR_DTE.The DMA node and RX buffer are both in DMA-accessible, non-cacheable RAM and aligned to 32 bytes.The DMA handle and queue structure are in normal BSS. Everything is global/static and zero-initialized.I checked the queue/node connection and the source address in LinkRegisters[3], which correctly pointed to UART RDR. The node address reconstructed from CLBAR and CLLR was also correct when checked.However, these were the actual DMA register values in the working and failing cases: Working FailingCBR1 0x00000080 0x0000049BCSAR 0x40007824 0x00000005CDAR 0x24001960 0x200065A0After the DMA error, UART error handling stopped reception and disabled the IDLE interrupt, so I stopped getting HAL_UARTEx_RxEventCallback() calls.What fixed it was adding __DSB() inside HAL_DMAEx_List_Start_IT(), after the CLB
Hi there, I am trying to to set up IEEE 1588 PTP time synchronisation with the Netx Duo IP-Stack. I want to port the STM32N6 example (https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_PTP_Client) to my STM32H563 / Nucleo-H563ZI.To my understanding, the H5 Series support PTP and should be able to run the example. The programm runs and prints out the MAC-clock, but the time does not increment and stays always on the same value of 0 seconds and 0 nanoseconds.I also tried to examine the PPS Signal on PG8 with an oscilloscope but as there is no running MAC clock, I get no PPS Signal.To fix this issue I tried different clock increments, thread-priorities. My guess is that the PTP clock in the MAC and the PPS output have to be activated seperately, but I wonder how? Thanks
I’m using an Infineon SEMPER NOR flash (JEDEC manufacturer ID 0x34; S28HS512T) with the STM32H7S78-DK XSPI2 interface. The bootloader uses STM32 External Memory Manager’s SFDP NOR driver, configured as EXTMEM_LINK_CONFIG_8LINES. The device has a hybrid sector map, and I’m updating mapped sectors from firmware stored on an SD card.The updater compares each logical sector, erases sectors marked for update, then writes the corresponding firmware data. Block-protection setup reports success: CLPEF (0x82), writes to CFR3V and STR1V (0x71), and a DYB unprotect write (0xE1) all return HAL_OK.For sector index 33, at address 0x00040000, size 262144 bytes, erase returns EXTMEM_OK (the measured duration was 0 ms). The subsequent write fails before any page-program command is sent: the driver’s initial WIP poll times out after 5 seconds.FW erase begin idx=33 logical=0x00040000 cmd=0x00040000 size=262144FW erase end idx=33 ... status=0 elapsed_ms=0FW write begin idx=33 addr=0x00040000 ... bytes=262
Hi everyone,We are facing an issue with the RTC on our custom hardware based on the STM32N655X0 MCU and would appreciate any suggestions to help us identify the root cause.1. Project OverviewWe have configured the RTC in our application, and maintaining the correct time across power cycles is an important project requirement.Our firmware is stored in external flash. During development, we use J-Link for programming, and we have also implemented firmware flashing through USB using an FSBL with DFU support.Both flashing methods work successfully. However, we have observed unexpected RTC behaviour after flashing and subsequent power cycles.2. Issue DescriptionAfter flashing the firmware, if we remove the main supply (VDD) and power the board back on after a few minutes, the RTC does not account for the elapsed time correctly.For example, if flashing completes at 12:25 PM and we power off the board immediately, then power it back on at 12:30 PM, the RTC does not reflect the five-minute int
I am experiencing a critical issue with the hardware video encoder (VENC) on the STM32N6 when processing low-light frames.Setup: Sensor: IMX335 connected to STM32N6 Capture Pipeline: DCMIPP configured in 1080p@15FPS capturing and writing to RAM in RGB565 format. Encoder Input: The same RGB565 buffers are passed to the VENC. Storage: The encoded H.264 stream is saved directly to an SD card. The Problem:When the camera enters a dark environment (very low-light conditions) and I manually reduce the Gain/Exposure to very low values (where the image should be almost completely black), the video recorded on the SD card starts to progressively brighten up until it becomes completely white (a "flashbang" effect).When playing back the file on a PC, the transition from black to fully white takes about 1-2 seconds (accumulating over several frames).Key Observations & What I've Already Tested: DCMIPP Output is OK: I have a live preview on an LCD screen displaying the input buffers direct
Hi all,I'm recording 16 kHz mono audio from the on-board digital MEMS mic (MP23DB01HP) of the STM32N6570-DK using the BSP's MDF path (MDF1, filter 0, PE2 MDF1_CCK0, PE8 MDF1_DATIN0, GPDMA1 channel 0, SPI mode, falling edge). The recording runs next to a camera/ISP pipeline, an NPU model and an H.264 encoder, so I want the audio path to cost as little CPU as possible and sound clean.Current setup (BSP defaults for 16 kHz)Kernel clock: IC8 from PLL4 = 50 MHz (HSI-based), PROCDIV = 2, CCKDIV = 12, so the PDM clock is about 2.08 MHz CIC: Sinc4, R = 32; reshape filter on, ÷4 (total decimation 128) Gain +2 (about +6 dB); HPF 0.000625 × fPCM (about 10 Hz) Async continuous acquisition, circular DMA into a 16 KB bufferWhat I triedI built a test firmware that records one clip per MDF configuration (5 s each, one config per boot) and compared them offline. Configs: Sinc4 vs Sinc5 R = 32 (gain steps −7, −8, −9), HPF at 10, 20, 40 and 152 Hz, a PLL4 retune to 81.92 MHz with IC8 ÷ 10 for an exact 2.
Greetings,I am working with nucleo_c5a3zg board and I am using zephyr RTOS for my project. I wanted to interface the sd card and try to do some data logging. I had a adafruit data logger shield which can fit on nucleo_c5a3zg board and there is a shield support in zephyr. When i build and uploaded the code i am getting a error that CMD8 is not supported. During debugging i found out that there is no state change on MISO line. Just to check if my code is wrong i tried same code with nucleo_f446re board and it works fine.Following is the capture from saleae loggic for necleo_c5a3zg board. I can provide other details like code, .dts file, etc.If someone can help me solve this issue it would be much appreciated.
Hi,I have this toolchain and need to generate a SBOM:STM IDE v1.18STM IDE GNU Tools for STM32 13.3.Rel1STM32Cube FW_L4 V1.18.1, specified in `\*.ioc` fileSTM32_USB_Device_Library (v2.0_Cube)STM32CubeMX 6.14.0FreeRTOS (10.3.1)How could I turn this into a SBOM?I tried scanning the folder strucutre with syft but this did not work. I then tried to manually make a syft Json file, but when testing for vulnerabiliteies (like e.g. here ) i could not find them. I am not sure how to specify the above components, such that they get recognized by the automated search engine (Grype).I found a statement from ST, that SBOMs will be provided for their products, but I could not find said lists for my toolchain. Some repositories on the GitHub Repositores contain `sbom_cdx.json`. However, I struggle to connect my Toolchain components to the repositories on Github (there are over 700 and for example "stm32cubeIDE" returns 0). Any help is appreciated! Related Links:Wikip
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.