Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi everyone,I’m building a coffee machine project using STM32C071 (C0) mainly because it has USB. I need USB Host MSC to:Mount a USB flash drive (FAT)Read/write files (params/logs)Firmware update from USB driveThe “official” ST stack seems to be ThreadX + USBX + FileX. Since there’s no USB Host MSC example for C0, I used an STM32L4R5 example (much larger RAM) as reference and adapted it.Issue: To pass ThreadX/USBX init, I kept increasing stacks/pools until I’m using ~20 kB of RAM. Then, when I plug the flash drive, enumeration fails with out-of-memory errors (e.g., UX_DEVICE_ENUMERATION_FAILURE / allocation failure).Questions:Is ~20 kB RAM just to init (and still fail at enumeration) expected for USBX Host MSC + FileX, or does it strongly suggest misconfiguration?Is there any official guideline/table (ST/Azure RTOS) for typical/minimum RAM for USBX Host + MSC + FileX (FAT)?Is there a practical RAM “floor” to enumerate + mount FAT + read/write files (single device, no HUB)? Like “below
We are using an STM32G070 with 64 Pins.The clock comes from an external 32,...kHz crystal. For clock calibration, we enable the RTC calibration output PC13.Whenever this is active, reading the state of the input PA4 always returns false, although we activated the pullup. Measuring the pin gives us the expected 3.3VDisabeling the calib output makes PA4 readable again. We compared the PA4 port setting with/without calib-output, they are always the same. Do you know about this issue? I found an errate entry concering PC13, but not our situation. Best regards,Peter
We are facing an intermittent EWGF (Error Warning Flag) issue during CAN communication at 1 Mbps on multiple STM32 MCUs. The same hardware and software setup works reliably at 500 kbps without any CAN warnings.MCUs UsedSTM32L443VCT6STM32L443CCT6STM32F437ZGT6All devices communicate together on the same CAN bus.Issue DetailsWhen CAN bit rate is configured to 1 Mbps, the EWGF bit in CAN_ESR register gets set intermittentlyCommunication does not stop immediately, but error counters increase over timeAt 500 kbps, the issue is not observedSame CAN transceivers, wiring, and termination are usedCAN ConfigurationCommon SettingsCAN peripheral clock: 24 MHzGPIO speed for CAN TX/RX pins: High speedSame clock source and configuration across all MCUsFor Bit Rate 500KHzCANx->BTR = CAN_TSEG1(12) | CAN_TSEG2(1) | CAN_BRP(2) |CAN_SJW(0); For Bit Rate 1MHz (Tried for different TQ , but still getting CAN warning)TQ per bit = 8 TQCANx->BTR = CAN_TSEG1(5) | CAN_TSEG2(0) | CAN_BRP(2) |CAN_SJW(0);&
Hi, Can i use the NUCLEO-N657X0-Q board as custom ASIC over an Octal SPI style bus? Thanks Atchaiah
Hello, I need a circuit schematic for the NUCLEO-L010RB development board, specifically for lighting up the LEDs.
I am working with a custom board that uses the STM32H7S38T chip. I am trying to use the SPI flash example from Zephyr to write to and read from the BY25Q16ES NOR flash. I am using the XSPI interface in normal SPI mode. I can read out the JEDEC ID (0x9F) as 0x684015, which matches the value given in the datasheet. When reading the SFDP (0x5A), the MISO is pulled high after the dummy cycles. Have I overlooked something? The flash datasheet clearly states that the SFDP is available. Zephyr Debug output: ------------------------------------- [00:00:00.000,000] <dbg> flash_stm32h7: stm32h7_flash_init: Flash initialized. BS: 32[00:00:00.000,000] <dbg> flash_stm32h7: stm32h7_flash_init: Block 0: bs: 8192 count: 8[00:00:00.000,000] <dbg> flash_stm32_xspi: flash_stm32_xspi_init: XSPI Init'd[00:00:00.100,000] <dbg> flash_stm32_xspi: flash_stm32_xspi_init: Reset Mem (SPI/STR)[00:00:00.100,000] <dbg> flash_stm32_xspi: HAL_XSPI_StatusMatchCallback: Status Matc
Hi,On the STM32H563 Nucleo, I was able to flash an application using the UART bootloader.However, the application does not execute when triggered with the GO command.If BOOT0 is pulled low, the same firmware runs successfully.But Go command executes properly but the firmware is not runningThe firmware i am trying is led blinking application
So i have the stm32G0 usb-c disco board. https://www.st.com/en/evaluation-tools/stm32g071b-disco.html I've flashed the latest USBPD_Analyzer software on the device and i have the latest UCPD monitor project. The semi problem is that it's kind of frustrating that in SPY MODE by default the mico doesn't show as a USB device. I only see the usb micro usb connection when i'm in Snk Mode. Is there a reason why in spy mode the USB connection to the PC from the micro doesn't show up? So what i have to do is. Start in Snk mode. Connect to the PC via the micro usb connector and connect to the UCPD monitoring program. Then i can switch to SPY MODE then i can attach my devices to it. Which can kind of be flakey some times.
[PN]: NUCLEO-G431RB with EVLDRIVE102BH and custom motor [VERSION]: Version: 6.4.1 Build: 250722.104358[TOOL]: Motor Control Pilot[DETAILS]: Hello All, I have been working on getting a sensorless FOC driver to work. So far I am able to get the rotor to align and move under open-loop control and occasionally it can switch over to closed loop control. When the motor switches over and runs it is fairly stable. My main issue is that I am unable to get the motor to reliably make the switch from open loop to closed loop. When it fails I often get a speed error with FAULT_OVER. I am using the STO+PLL Observer and I have gone through the current loop tuning and I think that looks good, the speed loop could use a little more work once this is resolved, but if the issue is with the observer I don't want to spend too much time on it yet. I output the BEMF-A and BEMF-B signals through the DAC to an oscilloscope, and when the startup fails I see both the amplitude and the frequen
Greetings, I am looking for pointers to material describing recommended ways to interact with built-in flash memory for general data reading and writing.DS9716 indicates there are several memory-mapped regions that could suffice, but maybe block 6 (starting at 0xC000 0000) seems like a safe bet, since it is "Not used"?Since this is for data storage and retrieval only, not instruction storage and retrieval, is there any need to mark the region of memory in some way in the loader script?Also, I noticed the HAL functions have some flash-based functions (UM1725) - there is some good info in there but again I'm not sure what memory target would be best for these functions.Apologies if this has been written up somewhere already. I see several "lab" type resources on the web for demonstrating how to do this, but I haven't seen a recommended practice in the official documentation or the knowledge bases here.
I am using ST MotorControl Workbench 6.4.1 with the STM32G431CBUX** MCU for a motor control project. When configuring the current sensing module for Three Shunt Raw Currents topology with the option Internal OpAmps + External gain network, the code generation fails with an RCSConnect error.But when I choose the option Internal OpAmps + Internal PGA eveything is good.I am looking to understand:1. Is the Internal OpAmps + External gain network configuration officially unsupported for STM32G431CBUX in MC SDK 6.4.1?2. Or is this a hardware resource limitation (e.g., insufficient internal op-amps, pin conflicts) specific to this MCU that blocks this configuration?
Not sure what is going on, im unable to toggle an IO and im not sure why...This is a very simply custom board, it uses I2C, CAN and USB. I've configured everything in CubeMX and double checked the pinout and gerber files several times but i can't find anything wrong. I've double checked the voltages on VDD and VDDIO2, both are 3.3V. I've tried configuring PD2 as Push-Pull and Open drain with and without pull-up but i get no change on the pin when measuring with my scope.PD2 is connected to the CAN STBY pin that has an internal pull-up, the pin remains high when the PHY is connected and low when the PHY is disconnected. This would indicate that there is no short on the board and that the electrical part is fine. I have physically probed the connections on the board and they are correct.What am i missing, do i need to configure something else? Below is the minimum CubeMX project. I2C and the EXTI work fine but PD2 does not. int main(void) { /* USER CODE BEGIN
Hi all,I’m running into an issue with LPTIM1 when using LSE as the clock source. The exact same configuration works perfectly when I use LSI or PCLK, but with LSE the code gets stuck waiting for the ARROK flag after writing ARR.The code blocks forever at:while (!LL_LPTIM_IsActiveFlag_ARROK(LPTIM1)) {} So it looks like the ARR register update is never acknowledged when LSE is the clock.Important notesLSE is definitely running — it’s already used elsewhere in the system without issues.We are looking for low power applicationwe using STM32U073CBT6Clock configurationLL_RCC_SetLPTIMClockSource(LL_RCC_LPTIM1_CLKSOURCE_LSE); LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_LPTIM1); LL_IOP_GRP1_EnableClock(LL_IOP_GRP1_PERIPH_GPIOC); NVIC_SetPriority(TIM6_DAC_LPTIM1_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 3, 0)); NVIC_EnableIRQ(TIM6_DAC_LPTIM1_IRQn);LPTIM configuration/* Make sure timer is disabled before config */ LL_LPTIM_Disable(LPTIM1); /* Select clock & prescaler FIRST *
I referred to this article: “Bootloader jump to Application HardFault - STM32H563.”I am also using the STM32H563, and used the following function to jump to the application, but the jump does not succeed. My test program is very simple. After creating an STM32H563 project, I only configured the UART to print messages so I can identify which program is currently running./* Bootloader */ typedef void (*pFunction)(void); void relocate_exe(uint32_t app_addr) { uint32_t appStack; uint32_t appResetHandler; pFunction appEntry; appStack = *(volatile uint32_t *)app_addr; appResetHandler = *(volatile uint32_t *)(app_addr + 4); appEntry = (pFunction) appResetHandler; __disable_irq(); SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; SCB->VTOR = (uint32_t) app_addr; __set_MSP(appStack); //__enable_irq(); appEntry(); } int main(void) { HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_USART3_UART_Init(); char msg[128]; sprintf(msg, "Bootloader!!!(%x)\
Hello ST Community, My MCU Part No. is STM32F103C8T6.My MCU Firmware Package is STM32Cube FW_F1 V1.8.6 and This Package CAN Communication is Working Fine and When Ever i Change one GPIO Pin and Generate the Code then CAN is Not Working What is The Problem Behind it ? If Any body Idea About That ? Thanks In Advance .
Hello,I have written a custom bootloader for my stm32u5 project and have been testing it for the last few months with multiple working firmware updates. To give some context, I transfer an encrypted firmware image to an external flash chip over CANfd from the currently running firmware. The next time the device boots, the bootloader looks for a new encrypted image on the external flash and if found it will decrypt the image, delete the internal flash where the application lives and then flashes the decrypted image. It will then de-init some peripherals and jump to the new application, fairly standard implementation. All of this has been working flawless until I set RDP = 1(DC) in stm32cubeprog. Also need to mention that I have set both passwords for RDP regression a while ago, I just have not been setting the RDP level beyond 0.With RDP = 1 the device will boot as it should, and I can send it a firmware update. I will power cycle the device and it will per
Unsure if this has been answered before, however, upon activating the Cube-AI Core and application software pack, the remains static, ie it stays blacked out with a gear icon next to it referring me back to the software packs screen, which already shows a green status icon.However, if I reload the .ioc file, the green status of the X-Cube-AI in the software packs installation tab shows it having never been activated.The files exist in the repository pathway, I am logged into ST, so I am unsure as to the cause. This also seems to occur with other software packs.Any assistance would be appreciated.
Can someone tell me, in “auto calculate” mode of the “observer + PLL (sensorless)”, which method or theory is used to calculate the parameters G1, G2, P, and I?
Hi everyone,I'm working with an STM32F103CB in my project and would like to know the default Brown‑Out Reset (BOR) threshold set for this MCU. Additionally, I’m looking for guidance on how to configure the BOR threshold to a custom level.Any help or pointers would be greatly appreciated!Thanks in advance.
Hello everyone, I am facing a confusing behavior with USB SOF events on two identical STM32 boards and I would appreciate any insight. Hardware 2 × NUCLEO-H743ZI2 Same MCU revision (checked device ID, revision ID – identical) Same USB connection to the same PC (USB OTG FS, device mode) Software Exactly the same firmware binary programmed on both boards STM32 HAL + CubeMX generated project USB CDC device (USB OTG FS) No conditional compilation, no board-specific code What I want to measure I wanted to check: Whether USB SOF events are really occurring every 1 ms Whether SOF can be considered a reliable timing source So I implemented a very simple counter in the SOF callback: #if (USE_HAL_PCD_REGISTER_CALLBACKS == 1U) static void PCD_SOFCallback(PCD_HandleTypeDef *hpcd) #else void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd) #endif { sof_eventc++; USBD_LL_SOF((USBD_HandleTypeDef*)hpcd->pData); } Additionally: TIM2 is configured as a 1 Hz timer In t
Hardware Details: Custom Hardware based on the B-G431B-ESC1, 3 phase, Hall sensored FOC,MCSDK: 6.4.1The maximum speed of the motor is 3000 RPM. I have run the motor using motor profiler software and the profiler shows the maximum speed is 2500, Rs = 0.1 Ohm; LS=0.0002Pole Pairs = 5I could achieve the speed of 2500 using FOC, Hall sensor i used Over modulation, Modulation index : 93%. PWM frequency 12KHZ. I am unable to go beyond 93% MI.The problem is i need to achieve speed of 3000 as per motor specifications and customer requirement and this speed is achieved with another standard controller. Few comparisons: DC bus current when i run is 2.6A compared to 3.1 A of standard controllerPhase current is 5A, compared to 10-15A. What changes can i do to reach 3000 RPM without flux weakening. Does motor profiler use Over modulation and showed 2500 RPM?
Hi guys,I'm try to use Camera FPC 22 pin cable with UVC mode. But it turn out screen are all black and error in console terminal is below========================================x-cube-n6-camera-capture v2.0.0 (3308d6b)Build date & time: Jan 22 2026 09:34:57 Compiler: GCC 12.3.1HAL: 1.3.0========================================Start streaming YUV2 | 224x224@30fpsassertion "ret == CMW_ERROR_NONE" failed: file "Src/app_cam.c", line 173, function: CAM_Init I used binary from "x-cube-n6-camera-capture-main"I also try to re-compile with github project "STM32N6-GettingStarted-ImageClassification Application"with header with cmw_camera.c USE_VD56G_SENSOR , still not success,(debug then found that driver StartStreaming can ctx->write8 but not response at function about PollReg8(..);Anyone have get experince how to make it work?
I am currently testing motor operation using the EVSPIN32G4-DUAL board.I am using the motor’s Hall sensors for speed feedback.In the Speed Sensing Configuration, under Auxiliary Sensor, should the Speed Sensor Mode be set to Hall Sensor in this case?Could you please confirm whether this setting is required for proper speed sensing when using Hall sensors?Thank you in advance for your support.
How to integrate motor suite and motor pilot for STM32F405RGT6 and run motor. I have custom power board and logic board. i tried making one but STM32F405RGT6 is not available in list and don't have idea what i can choose has alternative which has same spec and pin count has STM32F405RGT6. is there anyone who can help me develop.
Hi, I am using StevalESC001 board and MCSDK latest version to implement FOC on a custom motor. I am facing a few issues while testing it with load. I am unaware of what might be the cause of these issues if anyone could direct me towards what might be happening it would be helpful. First of all, during the startup motor sometimes starts spinning in anticlockwise direction that too at a very high speed. This behavior is random, I haven't yet identified any pattern into it, and it becomes more frequent when testing with load. I also noticed that sometimes Iq value shown in motor pilot is -10A initial which seems wrong, shouldn't it be 0 initially?Another issue is with the Actual RPM and the RPM shown in motor pilot, the RPM shown by motor pilot is 300 to 500 more as compared to actual RPM the motor is spinning at. The difference increases as we increase the throttle. Also, motor seems to reach its capacity at only half throttle. It is producing only 600 g of thrust w
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.