Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
Hello,I configured TIM1 as shown in the attached image: Everything works as expected I am controlling an inductive load which oscillates heavily after the PWM is turned off. I therefore decided to immediately short the low-side MOSFET (CH1N) to ground if a BREAK or BREAK2 signal is received. I set the Channel Idle State to SET. And the behavior of BREAK/BREAK2 changed.As seen in the close-up:: A low state on BK2 does not set a high state on CH1N. Should BK1 and BK2 not be ORed?
Hello ST Support Team,I'm working with the STM32L031K6U6 (32-pin UFQFPN package) and need clarification on ADC channel mapping.Question: Is there an ADC Channel 9 available on the STM32L031K6U6, and if so, which physical pin does it map to?Context:- I'm trying to use PB1 as an ADC input- Documentation suggests ADC Channel 9 should be availableCould you please confirm:1. Which pins have ADC capability on STM32L031K6U6 32-pin package?2. Is ADC Channel 9 available on this specific package variant?3. If ADC Channel 9 exists, which physical pin does it connect to?Hardware: STM32L031K6U6 (32-pin UFQFPN package)IDE: STM32CubeIDEHAL Version: LatestThank you for your assistance.
I'm re-using a sequential I2C library that worked on a couple other ST devices with different I2C devices, but it doesn't work on a STM32F030.They are functions for I2C register operations, where we always start with a write with the register address and then a write/read, depending on the operation: // Read register HAL_I2C_Master_Seq_Transmit_IT(peripheral, address, &registerAddress,1, I2C_OTHER_FRAME); HAL_I2C_Master_Seq_Receive_IT(peripheral, address, data,size, I2C_OTHER_AND_LAST_FRAME); // Write register HAL_I2C_Master_Seq_Transmit_IT(peripheral, address, &registerAddress,1, I2C_OTHER_FRAME); HAL_I2C_Master_Seq_Transmit_IT(peripheral, address, data,size, I2C_OTHER_AND_LAST_FRAME);The write doesn't work (read works fine). The first call to HAL_I2C_Master_Seq_Transmit_IT is successful, but not the second.I've tried the write with different I2C transfer options, but none seem to work. I don't have a scope on me so I don't know what frame is being produced.Anyone has ot
Hello, I expect this to be flagged before but couldnt find during search. Is Table 116 for the stm32f43xx on page 768 missing registers for CRYP_K2LR / CRYP_K2RR at offset 0x30? TIA
Hello,I am working on a custom board based on the STM32H747 to develop a Touchgfx application as User Interface, where I am using the same QSPI Flash device as the STM32H747I-EVAL kit (MT25TL01G 1Gbit), but with a different chip-select pin wiring.On the STM32H747I-EVAL board, the external loader (MT25TL01G_STM32H747I-EVAL.stldr) is configured to use:QSPI_BK1_NCS (PG6) as the common chip-select for both banks.On my custom board, the MT25TL01G device is wired as:QSPI_BK2_NCS (PC11) as the common chip-select for both banks.I updated my firmware, CubeMX configuration, pin assignments, and the QSPI initialization, and QSPI is now working correctly inside my application firmware.However, STM32CubeProgrammer cannot flash the external QSPI because the supplied stldr file still expects the original chip-select pin (PG6).The external loader obviously needs to be rebuilt with the new QSPI pin mapping.My questions are:Is it possible to modify or rebuild the .stldr external loader for the STM3
Posted on November 05, 2012 at 11:28Revision 2 of RM0090 is available. http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/REFERENCE_MANUAL/DM00031020.pdf JW
Hello All, I am using the STM32H757I-EVAL for one of the development project for Touchgfx, 1) When-ever I am loading/debugging the project using STMCUBEIDE, only in System Mode I am able to detect the Board, but not in Flash mode. 2) With STMCubeProgrammer, I have to connect the device in System Mode, then I have to Erase the Internal and External Flash, then disconnect the Board and Bring the Device in Flash Mode and then Flash the code. Till now I am able to run the Program, But as soon as I disconnect the usb (stlink), The Previously loaded program supposed to run as the mode is still in flash, but I can see anything on screen. Could anyone please let me know the correct way to do it ? I mean I don't have to load or flash code again and again to test. The program should load from Flash after power ON- OFF-ON. Just for info 34757228 is the size of the program.
I think I have found a bug in the mentioned file (in my case the file comes from x-cube_azrtos-h7, but the problem seems to be present in other versions to).In the function fx_stm32_sd_driver() there is a check that the passed Databuffer (media_ptr→fx_media_driver_buffer) is 4 Byte alligned, if this is true then the function sd_read_data() uses directly the passed buffer otherwise it uses a local scratch buffer. But after the DMA the function needs to invalidate the cache (by calling invalidate_cache_by_addr), on the Cortex M7 a cache line is 32 Byte.This may overwrite data in the cache out side of the buffer.Correction:Set use_scratch_buffer to false only when fx_media_driver_buffer is 32 Byte aligned and a multiple of 32 Byte.
I have started a new project using STM32H573. This is using the following:Cube MX 6.16Cube IDE 2.0 - Build: 26820_20251114_1348 (UTC)The project has secure zone enabled. I have written bare metal code and shown I can run/debug code in the non-secure environment without issues, and I can invoke non-secure callable functions etc.My problem comes when I add Free RTOS and enable CMSIS RTOS v2 to the non-secure side.When I build, I get linker errors (see below).When I search the forums, there have been similar issues raised, but most are quite old posts or seem overly complex (which always worries me)``C:/Users/531023/git/TEML20/Monitor/NonSecure/Debug/../Core/Src/app_freertos.c:86:(.text.MX_FREERTOS_Init+0xa): undefined reference to `osThreadNew' C:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.100.202509120712/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/app_free
This board has STM32F103C8 MCU. I applied this patch for USB CDC interface, to successfully read/write data between STM32 and laptop via USB cable. How to make this STM32 enter light sleep mode, while allowing STM32 to maintain virtual com port connection with laptop, and only wake up when I send something to STM32 from my laptop using a terminal app? I tried debugging by putting wakeup_reason in various USB_CDC functions in USB_Device/App/usb_device.c USB_Device/App/usb_cdc_if.c USB_Device/Targe/usbd_conf.c But I didn't see wakeup_reason change after wake up. I tried two ways: // command c-strings char *cmd1 = "cmd_sleep"; while (1) { // check if there is any data received on USB CDC bytesAvailable = CDC_GetRxBufferBytesAvailable_FS(); if (bytesAvailable > 0 && (bytesAvailable <= sizeof(TxBuffer)) ) { HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); // led on HAL_Delay(10); // small delay to ensure interrupt USB library functions will fil
I've been struggling with this problem for several hours.Using bare metal, I can invoke a non-secure callable from the non-secure application.When I added FreeRTOS + CMSIS RTOS v2 wrapper, and try to do the same from a thread context, I get a hard fault when I try to invoke the non-secure callable (see below)I would assume this is related to the thread stack. I am using the following:Cube MX 6.16Cube IDE Version: 2.0.0 Build: 26820_20251114_1348 (UTC)In the secure project is secure_nsc.c, I define my API: CMSE_NS_ENTRY void ToggleBackLight(void) { HAL_GPIO_TogglePin(BACKLIGHT_GPIO_Port, BACKLIGHT_Pin); } In the non-secure project, I invoke this from a thread as follows:/* Private application code --------------------------------------------------*/ /* USER CODE BEGIN Application */ typedef void (*SecureFunc_t)(void) __attribute__((cmse_nonsecure_call)); void doBlinkyThread(void *argument) { /* USER CODE BEGIN defaultTask */ SecureFunc_t secure_func = (SecureFu
Hi,I'm trying to understand what the viable options are.my goal is to be on more recent versions of kernel/uboot because there are features upstream that I need.my preference is to be following upstream.Current situation is that i'm using stm32s fork of Linux that is resting on 6.6.x, and equivalent uboot. I see a lot of upstream activity from STM32 FOSS team, with lots of progress in linux 6.17 and 6.18. I also note that at least somethings are not upstream, such as hsem in stm32mp151.dtsi. and easy thing for me to patch on it's own, but i'm looking at the bigger picture and the unknowns of what else might not be upstream that I don't know I need etc.I'm aware that I can sift through the mailing lists and find all the upstream requests where i'm certain i could eventually curate a more complete 6.17/6.18 with respect to the MP1. I also imagine the FOSS team have this already?is there a set of patches for complete MP1 support (as i assume the stm32 linux fork is complete) that can
I got a hard time comprehending about the two interrupt lines in the manual. I can really see a "connection" between certain sources to the interrupt lines, nor can i find a register to connect them. It seems to me, that i only can decide what interrupts will fire, and what interrupt line they will go to then. But i cant think of, how i could have both interrupt lines running in paralell. I think i missed something. Is there a better information about this out there?
Hi,I am trying to add FreeRTOS to my project.Board = Nucleo-U5A5ZJ-QTrustzone = enabledFreeRTOS = in non-secure project I have Trustzone enabled, therefore a secure and a non-secure project is generated by CubeMX. I added FreeRTOS in the non-secure project. Upon building the project, it gives the following errors (the output is modified to remove additional build information and long project paths): .../GCC/ARM_CM33/non_secure/port.c.obj: in function `vPortSVCHandler_C':[build] .../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1042: undefined reference to `SecureContext_AllocateContext'[build] .../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1047: undefined reference to `SecureContext_LoadContext'[build] .../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1058: undefined reference to `SecureContext_FreeContext'[build] .../Middlewares/Third_Party/FreeRTOS/Source/por
Hello. Please forgive a 'newbie' question. Whilst I am new to STM32 chips I have been programming MCUs for many years which makes this problem even more frustrating.I wrote a program which I then uploaded onto a Bluepill (genuine processor) using CubeIDE v1.16.0 (and later Cube Prog v2.17 as a standalone) and the STLink V2 interface with the most up to date firmware. The program didn't run so I assumed that it was something that I was doing wrong (it probably still is). I went back to basics and viewed several 'tutorials' on YouTube. I then set up a minimal program to flash the onboard LED at PC13. I left all the settings of the IDE as they came when the IDE was installed. I set PC13 as a GPIO output and left all the rest of the GPIO settings as they were. I used HAL_GPIO_WritePin to write directly to the pin with HAL_Delay as the delay mechanism. So four lines of code in total all placed after the /* Infinite loop */ /* USER CODE BEGIN WHILE */ whil
Hello,I'm working with the Vibration Monitor use case available in the Example Apps of Steval SensorTile.Box MKSBOX1V1. I'm quite happy with how it works, but I would like to modify some parameters and here comes the problems (both modifying the already available apps and creating new ones from the scratch in the expert mode). The app consists of two steps, one creating the vibration profile of the monitored object (Vibration Monitor - Training) and the second finding the differences between the current vibration profile and the reference one to identify anomalous vibrations.If we give a look to the settings of this example app, which is correctly working, we can see among the the parameters of the Vibrometer Accelerometer Sensor that the Output Data Rate (ODR) is set to 6666Hz and by default it can stream data over Bluetooth (otherwise it would not work with the Android app, lighting on the virtual lamp when the Sensortile.Box vibrates). However, when I click on "modify" in order
Hello everyone,I am reaching out to the community regarding an issue my team is experiencing on the STM32MP257F, specifically within a project running on the Cortex-M33 core.ContextWe are attempting to configure SPI2 to transmit data to an external DAC using HPDMA1. While SPI2 transmission works correctly without DMA, integrating HPDMA results in no data movement—DMA does not appear to start, and SPI output remains idle.We initially relied on CubeMX for code generation, but due to several inconsistencies (e.g., peripherals marked as enabled were not properly configured, some register settings missing), we shifted to a manual initialization approach. Unfortunately, the issue persists.Technical RequirementsThe intended configuration is as follows:DMA Mode: Standard transfer (no linked list).Direction: Transmit only; no receive path required.DMA Request Source: HPDMA_REQUEST_TIM3_UPTIM3 period: 50 µsClock: 200 MHz, Period register: 9999Trigger Source: TIM15_TRGOTIM15 period: 250 µsClock:
Just received my X-NUCLEO board and I am trying to discover what the default firmware is on the shipped boards? The getting started guide appears to suggest one needs to program the module. Sid
Hello,This is a general suggestion that I would like to make. While I think it's great that all HAL libraries are available on GitHub, I would like to suggest creating a github release for the official versions in addition to creating tags. This can be done on GitHub with just a few clicks. The reason for this is the use of component analysis platforms such as Dependency Track, which make it possible to automatically track the libraries used, a task that is becoming increasingly important. Unfortunately, Dependency Track requires a release in order to track the version. While it is also possible to track this using the commit ID, for example, a release would be the better approach here. I welcome feedback and the possible realization of this suggestion.For Example ARM is doing this with their CMSIS Package: https://github.com/ARM-software/CMSIS_5-Hannes
Hello,I am using the ST25R3916B reader on a custom board to read NFC-A cards. I first experimented on the X-Nucleo-nfc08a1 expansion board connected to esp32-s3 devkit. I modified the RFAL library a bit to fit my needs and kept most registers at their default values. With this setup I was able to communicate with an NFC-A card perfectly.On my custom board, which is powered by 3V, I am able to communicate with the reader: read IC ID, read/write registers, receive interrupts. But I still haven't been able to communicate with the card. I receive no ATQA for my REQA. In fact no rxs or rxe interrupts are being raised (txe interrupt is being raised after sending direct command Send REQA). Code used on X-nucleo-nfc08a1 and custom board are exactly the same, except they have different SDA and IRQ pins.I am still checking out the hardware design to check for any issues, especially with the antenna matching circuit. In the mean time I wanted to check a few other things:1. I receive an oscil
I was able to install and open the STMCubeIDE for my macbookpro with M1 apple silicon. But cannot obtain .iop files as the STMCubeMX plugins .mx and .mcu do not unpack and get installed. I have checked my firewall and any blockages created by mac but nothing is being blocked in quarantine or privacy as well. I tried to completely delete and reinstall the software 5 times but nothing is working. As the plugins are default no manual intervention can be done as well. Please help!
Hello I have a code use CAN on a stm32U585 he work fine if the CAN bus have not disturbance But if i have to many disturbance for exemple if i make a short circuit bethen CANH and CANL when i remove the short circuit the CAN no restart to send data. I need stop and restart CAN HAL_FDCAN_Stop(&hfdcan1); HAL_FDCAN_Start(&hfdcan1); After the disturbance, the return value of HAL_FDCAN_GetState() and HAL_FDCAN_GetError() remains unchanged. How can I immediately know when there is a problem with CAN
So here is a weird thing I've noticed with a STM32U073... CubeMX shows that this CPU has the "Trace Asynchronous SW" option, but for this mcu it is no longer listed under SYS, but under its own category: "Trace and Debug" -> "DEBUG". Anyway, after enabling it, the signal shows up on the graphical pinout, with the name "DEBUG_JTDO-SWO". This is pretty much the same as i was used to with other STM32 mcu's. So when i was designing a PCB for this new STM32U073 MCU i assumed it had support for SWO (or SWV or whatever the name is). But now when I'm trying to debug this MCU, the debugger doesn't allow me to enable "Serial Wire Viewer (SWV)" in the debug configuration properties of STM32CubeIDE. The option is just greyed out. So I did some more digging in the datasheet for the STM32U0, and I'm starting to wonder if it even has support for SWO/SWV? Can anyone enlighten me? Is this just a problem with the debug config in STM32CubeIDE, or does the STM32U0 have no SWO/
Hi there! I'm looking to interface a dual channel 12bits ADC (TI ADS4222) with an STM32N647L0.Using a 58MHz sampling clock, I will generate two 58MSPS data streams feeding into my STM32. The acquisitions will be short, so the raw data will be around 1 MB per channel.I'm wondering whether I can use both the DCMI and DCMIPP interfaces simultaneously to handle the two ADC channels and feed the NPU.Has anyone already tried this? What is the maximum pixel clock for each interface? I'm not sure which application note applies to these devices. Thanks for your help Quentin
Hello,I am working on a custom mixed communication implementation using USART in single-wire half-duplex mode with TX-only operation, level inversion, and interrupt-driven transmission on an STM32G0B0 (RETx package).During testing, I observed the following behavior:When the USART is configured in CubeMX as Single Wire (Half-Duplex) with TX inversion enabled and the line is internally pulled up, no data is transmitted.However, when using asynchronous mode with the same inversion settings, transmission works normally.My questions are:Is this behavior expected when using USART Half-Duplex mode with level inversion and a pull-up on the line?Has anyone experienced this behavior on the STM32G0 USART peripheral?I plan to use USART3, USART4, USART5, and USART6 simultaneously under an RTOS environment, all configured the same way (single-wire, inverted signal, interrupt driven). Under these conditions, should I expect similar transmission issues on all USART instances?All selected pins support
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.