Developer support experience survey - We value your feedback
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
Hi All,I'm using STM32G4 with TIM1 for motor control. The BKIN hardware protection works correctly - when I pull the BKIN pin (PB10) low, the motor stops, and when high, it runs again with AOE enabled. However, the break interrupt never fires and HAL_TIMEx_BreakCallback is never called. I've verified that TIM1_BRK_TIM15_IRQHandler exists in stm32g4xx_it.c, NVIC is enabled. The break flag never gets set even though BKIN is functioning. What could prevent the break flag from being set while the hardware break feature still works?I want to print diagnostic using BKIN callback routing but it doesn't work.I've attached IOC timer configurations.Best regards
Using Nucleo-U545RE-Q, SPI2 Full-duplex Master, default GPIO selected by STM32CubeMX v6.15.0 with LL selected for implementation.Config clock for max 160 MHz and prescale SPI by 8 for 20 Mbps. Add GPDMA Ch2/3 for SPI2 TX/RX.I double checked the output configuration code generated by the CubeMX against the Cube_FW_H5_V1.5.0 Examples_LL: SPI_TwoBoards_FullDuplex_DMA_Master_Init, and it matches exactly but for peripheral selection. Jumper-wire PC1-to-PC2 (CN7.36-to-CN7.35) for simple SPI loop-back test. With this configuration, the loop-back works when I implemented the SPI full-duplex transfer by LL blocking code. But trying to use the GPDMA channels results in no data, no DMA IRQ for TC or DTE, no SPI IRQ for anything. Below is the simple code to try to get a transfer going, there is initialization code that enables all SPI and DMA interrupt sources and handles the IRQ by clearing the flag and setting the local global booleans that you see below. Note that this is setup f
Development environmentMotor control workbench Version: 6.4.0STM32CubeMX Version: 6.16.0STM32CubeIDE Version: 2.00.0Controler/Driver: B-G431B-ESC1 kitI want to drive a 30W BLDC motor using the B-G431B-ESC1 kit.I'm currently following the instructions in the UM2516 user manual on the ST website:Chapter 6, "Connection and first execution of the electronic speed controller (ESC) program"6.1 First case: daughterboard not removed3. Generate and upload the firmware code into the STM32G431CB MCU with the available IDE tool.I selected the "B-G431B-ESC1" sample project in MC WorkBench, ran "Generate the Project," then launched "CubeMX" and then "Code Generate" to generate the project.Up to this point, there were no issues.After opening the project in "CubeIDE," I tried to run "Build," butthe "Build" commands were not enabled.I don't know what the problem is.Is there a more detailed guide for using the "B-G431B-ESC1"?(The UM2516 documentation is insufficient.)Please help
Hello ST Community, i have problems to get the VNF1048F chip to run. It goes every time to the fault state and can not find out, why this problem occurs.The documentation for this chip is not really good and there is not sample application (Source Code) where i can look to find a solution for this problem. Does anyone have some sort of source code how to implement a sequence that this chip is working? I would appreciate any kind of help, to get this VNF1048 chip running.Thank you very much and best regards, Markus
Dear ST Team, I'm trying to deploy models on STM32N6570-DK, and there is the issue:Followed tutorial below:stm32ai-modelzoo-services/object_detection/docs/README_DEPLOYMENT_STM32N6.md at main · STMicroelectronics/stm32ai-modelzoo-servicesEncountered error message below:(st_zoo) PS C:\Users\ricky\git\stm32ai-modelzoo-services\object_detection> python stm32ai_main.py --config-path ./src/config_file_examples/ --config-name deployment_n6_ssd_mobilenet_v2_fpnlite_config.yaml C:\Users\ricky\anaconda3\envs\st_zoo\lib\site-packages\mlflow\utils\requirements_utils.py:12: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources 2025-11-30 21:33:53.440551: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cuda
Im new to C programming and even more, programming with a MCU. I have started a project and it was compilable for a while but suddenly, i ran into issues with include errors in data generated code. This is the error code:02:16:11 **** Incremental Build of configuration Debug for project TSCU_ER26 **** make -j7 all arm-none-eabi-gcc "../Drivers/CMSIS/RTOS2/Template/cmsis_os1.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_PWR_LDO_SUPPLY -DUSE_HAL_DRIVER -DSTM32H7A3xx -c -I../Core/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/CMSIS/RTOS2/Template/cmsis_os1.d" -MT"Drivers/CMSIS/RTOS2/Template/cmsis_os1.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Drivers/CMSIS/RTOS2/Template/cmsis_os1.o" arm-none-eabi-gcc "../Drivers/CMSIS/RTOS2/Source/os_systick.c" -
In the H562 CubeMx setting the flash option bytes only allows flash number of sectors up to 7. If you look at the FLASH_EDATA_EraseProgram example in the H5 firmware bundle you will see it sets the number of sectors to 8 before calling FLASH_OB_EDATAConfig function. this function decrements by one before ORing the sector enable bits. Because CubeMx only allows up to seven when it generates code you do not get the full EDATA range. And if you set 1 in cubemx I guess you do not get any???
I believe there's a bug in the stm32h7rsxx_hal_dma code for dealing with repeated blocks in interrupt mode. This bug probably exists in other STM32H7 devices as well.With a typical repeating transfer, in *NON* interrupt mode, the DMA transfer completes successfully, and the DMA state ends up in HAL_DMA_STATE_READY, ready for another request. All is well.However, in interrupt mode, the DMA transfer completes successfully (all data is correctly transferred), but querying the DMA state in the DMA Transfer Complete callback, you'll get HAL_DMA_STATE_BUSY. In fact, it will remain in this state forever.Looking at the stm32h7rsxx_hal_dma.c code, the block starting at 1154 ("Transfer Complete Interrupt management"). There are really only two cases where the HAL_DMA_STATE_READY can be set:1) LinkedList mode (not relevant to us)2) "Normal transfer" where CBR1 == 0. (i.e. not a repeating block transfer) In a repeating transfer, CBR1 contains the repeating config, and is generally not 0 (it's call
Hi,I have a custom board with an STM32L031C6 and I'm trying to read the internal temperature. The board is battery powered at about 2.6V and the vdda is the same.If I read the ADC channel with vrefint, it returns a value of about 850, which, when passed to the function __LL_ADC_CALC_VREFANALOG_VOLTAGE(adcVal[4], LL_ADC_RESOLUTION_12B), returns a calculated VDDA of 6V, which is obviously incorrect.Using this vref to calculate the internal temperature obviously results in a value that's out of range.The same thing works correctly on a NUCLEO-C031.What am I doing wrong?Thanks!
Where can I find the meaning of the returns from connectDfuBootloader? I'm getting -16 back and would like to know what it means.
Hello,I am new to STM32F746-Disco and I was trying to develop an application starting from TouchGFX.It went all good in developing a touchGFX app and use the generated .ioc and so on to configure a project but I've tried afterwards to configure the ethernet stack LWIP and so on but I was never able to communicate and ping the ethernet device.I've tried on my local to run the ethernet example and I was able to properly ping the device but never been able to do it in the project configured with touchGFX.The strange thing is that I can partially see some comunication such as ARP messages and so on but then the ethernet stack is not capable to reply to ping message. here a snapshot of the communication between my PC and the st board. Does anyone might now what could be wrong in my configuration?I've attached the .ioc
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
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.