Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi all,I'm working on a very low power custom board powered by a STM32C011D6Y micro controller. I must read an ADC input routed to F1 ball (PA3, PA4, PA5 or PA6) but I'm measuring some strange power consumption related to the input voltage on the pin.For example: - I configure PA5 as ADC_IN5 - I wire F1 directly to an external signal generatorWhen I inject with the signal generator about GND or Vdd (about 3V) on the ADC input pin, the board's power consumption seems to be fine. When I set the input voltage about at half scale (about 1.5V) I measure about 500 uA on the power supply side.All the other ports are set as analog inputs with no pulls.Trying to figure out the problem I tried to configure other ports, for example PA3 as ADC1_IN3 on the same ball but the power consumption is exactly the same. I also tried to rewire the board so that the analog input is connected to ball E2 (PA7, PA10 or PA12). On this pin I measure the same issue but with less
Hi there,I am using the full featured USART in LIN mode. The start of a LIN packet is signaled by a BREAK condition. The next byte is the SYNC (0x55). After the BREAK is detected, I enable the receiver timeout so that if the SYNC (0x55) is not received then the LIN reception must restart. This does not happen, i.e. after a BREAK with no other bytes, it does not generate a receive timeout.According to the RM, the receiver timeout starts after a valid STOP. So is the end of a BREAK not considered a valid STOP and therefore the receive timeout does not start?Thanks in advance,Pieterhttps://piconomix.com
Hello everyone,I’m working on a project where I am using STM32F407 and I’m trying to establish USB communication between my STM32F407 Discovery board and a PC. I have configured the board for USB_OTG_FS in STM32CubeMX, and I’m trying to use it as a Virtual COM Port (VCP). However, when I connect the board to the PC using the USB_FS port, it’s not being recognized as a COM port or any device at all in the Device Manager.I want to read the output of the ADC channels using the hercules software I would really appreciate any suggestions or guidance on:Getting the board to show up as a VCP in the Device Manager.Troubleshooting USB enumeration issues.
Hello, for my first project with a microcontroller I'm doing a 16 button gamepad USB HID with the aid of ChatGPT. I have no idea of what I'm doing really. I'm Using a STM32f103C8T6 and STLink V2. I made a polling version that constantly read pins and then sends a report based on "button states"; it works well, but I am interested in a more efficient way of doing it.So I got to interrupts. I made a version that triggers on falling and rising edges, then it updates the buttons_state in the callback. It works well, but the main loop is always running and sending reports every 1 Systick (1ms I think), so I guess it has almost the same efficiency as the polling method.My intention was to to use __WFI() instruction in the main loop to make the CPU wake up only on button press/release (EXTI interrupts); something like this: while (1) { __WFI(); uint32_t now = HAL_GetTick(); if ((now - last_report_time) >= 1) { send_report(button_state); last_report_time = now;
Hi STM Community,I'm developing a custom LoRa-based board using the STM32WL55CC MCU, migrated from the STM32WL55JC, and referencing the MB138 STM32WL Nucleo-64 board as a design guide.I've attached a portion of my schematic (generated in KiCad), and I would appreciate if the community could help review the following:Schematic and power supply arrangementPin configuration and peripheral mappingRadio signal path integrityCompatibility or functional issues that may arise due to migrating from STM32WL55JC to STM32WL55CCGeneral layout or connection concerns for RF and MCU sectionsS
Assuming that it is clear at the operational level on the firmware and hardware how to create the driver and fill a buffer on a monochrome display, but the real question is how to work on the monochrome gui? does anyone have experience with it? and then why are there no examples? today it is possible to find decent monochrome displays with 240x128 pixels and with scala 4 and 16 colors, but why are they not taken into consideration? I work in the industrial field and these displays are irreplaceable for robustness and readability even for critical devices. Why are there no examples? I'll start by saying that I've been looking for it for years and today I did it again after a long time and I continue to realize that nothing exists... some enlightened person enlighten me.
Hello STM32 Community,I'm working on a custom board based on the MB1389 (Nucleo-WL55JC) reference design, which uses the STM32WL55JC17 (UFBGA) package. Now, I am migrating to the STM32WL55CC in the UFQFPN package for cost and space reasons.While adapting the schematic, I noticed the following pins from the original design are not available in the UFQFPN package:PC3PC4PC5PB14PB1VSSRFVREF+I understand that the pin count is reduced in the UFQFPN package, but I need guidance on the following:Are there any internal remapping or alternative GPIOs for the above functions in the STM32WL55CC UFQFPN package?How should I handle VSSRF and VREF+, since they are critical for RF and analog operations? Can they be connected internally, or do they need external routing?Any advice or reference designs (for UFQFPN-based layouts) that clarify how to proceed with features that originally used those missing pins?For reference, I am attaching a snippet of my schematic based on MB1389, where these pins are cu
Hi, there's something confusing in the schematic for the H755 Nucleo's reference PCB schematic (MB1363).I don't mind adding that I'm getting a bit tired of confusing and contradictory documentation from ST Micro.The description of changes when configuring PSU config modes 2 and 3 are as below:In the highlighted note at lower left it says that to enable Config 3: "Connect VDD_SMPS_IND_OUT to VDD_LDO".However, looking just above at Config 2 it seems clear that VDD_SMPS_IND_OUT is already connected to VDD_LDO via the node 1V2_MCU which is always connected to both VDD_LDO and VDD_SMPS_IND_OUT.Can somebody from please confirm how this should work?My understanding is that the two modes can be summarised as follows (ignoring some capacitor changes):Mode 2VDD_LDO == VDD_SMPS_IND_OUTVDBSD == VCAPMode 3VDD_LDO == VDD_SMPS_IND_OUTVFBSD == VDD_LDOI need a quick answer please because I've a PCB layout needing to go to manufacture.Thanks
Hi,We are currently implementing ADC on the STM32G491 MCU using ADC2, Channel 15, with Vref set to 3.3V.The ADC configuration is as shown below: hadc2.Instance = ADC2; hadc2.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2; hadc2.Init.Resolution = ADC_RESOLUTION_12B; hadc2.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc2.Init.GainCompensation = 0; hadc2.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc2.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc2.Init.LowPowerAutoWait = DISABLE; hadc2.Init.ContinuousConvMode = DISABLE; hadc2.Init.NbrOfConversion = 1; hadc2.Init.DiscontinuousConvMode = DISABLE; hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc2.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; hadc2.Init.DMAContinuousRequests = DISABLE; hadc2.Init.Overrun = ADC_OVR_DATA_PRESERVED; hadc2.Init.OversamplingMode = DISABLE; if (HAL_ADC_Init(&hadc2) != HAL_OK) { Error_Handler(); } /** Configure Regular Channel */ sConfig.Channel = ADC_CHANNEL_15; sConfig.Rank =
Hello,I am trying to build a part of the project.I want my three microcontrollers to communicate with each other via CANBus.What i am trying to achieve in this part is reading the digital sensor value from my hall effect sensor and sending this information to the other controller but for now just to see if it is working i am using a Waveshare USB-CAN A,CANBus adapter before conencting the second controller to observe if the project is working so far.I am using a MCP 2551 transcevier and I also connected the 120 ohm resistor between the CAN H and CAN L.I checked the resistance with my multimeter and I get 60 ohms in between them,as i should. The problem is when I click the debugger even the LED that i connected to test how far my code goes in debug never lights up.It doesn't even blink for the first line of code int main().I don't understand the reason behind it.It might be about the CAN and adapter settings,clock configuration etc. but i can't tell for sure.Just to let you know,I
Hello,I noticed in the document RM0368 (Rev 6) for F401RE the SPI Register map (Table 93 page 611) is missing the SPI_CR2 register.I came across this topic, created in 2021 and now closed :https://community.st.com/t5/stm32-mcus-products/error-in-rm0368-reference-manual-spi-register-map-or-i-miss/m-p/225332This topic was about Rev 5, and the problem should have been fixed in Rev 6. Is my Rev 6 a too old document and it was patched in later revisions or is it still in the latest revisions as it appears that REV 6 is the latest version of RM0368 according to the F401RE product page :https://www.st.com/en/microcontrollers-microprocessors/stm32f401re.html#documentationMatt
The reason is that the update of the HAL library caused the SD card problem, which led to bus_hault after the restart. The SD card will only be restarted when there is a read/write issue. The reset process is deinit followed by init.Later, it was found that DPSM was an unexplainable setting, causing the driver to believe that there was data directly read from the fifo, but the data program was written to DPSM in conjunction with SDMMC_CK.Then I changed the driver code to seem to have solved the problem, and restarted the code by adding abort before deinit and init.1、Why does the SD card often malfunction? Is it caused by the clock waveform? Is this waveform setting incorrect for DPSM?I adjusted the frequency to 4M, but the Voltage overshoot was very large.Yellow represents CK and pink represents 3.3V voltage2、I used a soft restart for the SD card, but it seems to be of no use. Is there a way to solve the problem of the SDMMC getting stuck at a certain state due to being stuck at the DP
I'm currently working on a project involving the STM32H755ZI and setting up SDMMC1 for file operations using FatFs. While configuring the SDMMC interface, I noticed that CubeMX provides the option to enable IDMA (Internal DMA), but there's very little guidance available on how to correctly implement and utilize it, especially in conjunction with FreeRTOS and FatFs.My questions:How exactly should IDMA be enabled and configured in CubeMX/CubeIDE?Aside from enabling "Use DMA Template" and selecting IDMA for SDMMC, are there specific buffer alignment or cache management requirements (e.g., ALIGN_32BYTES(...) or MPU settings)?Is IDMA recommended or sufficient for use with FreeRTOS-based projects using FatFs on SD cards, or should MDMA be preferred in more demanding scenarios?Could anyone share a working example or reference project using STM32H7 + SDMMC1 + IDMA + FatFs (ideally FreeRTOS-compatible)?While AN5200 and other app notes mention DMA templates and performance guidance, they don’t f
Hi,I have to use the transceiver for pure RF communications and implement my own protocole.After checking several boards, I've be recommended the P-NUCLEO-WB55 but from all the doc and example I find, the transceiver is used for BlueTooth communications, which I don't need at all.Is it possible to use its transceiver RF without BLE, Zigbee, etc... as a simple 2.4Ghz range transmitter and receiver?If not, which MCU should I get, that includes a dev board offering AD, DA and pure RF ?Thanks for any light. Steve
Hello STM32 Community,I'm trying to implement CAN communication on my Nucleo F446RE board and I'm facing some challenges getting it to work properly. I've attached screenshots of my .ioc configuration and the auto-generated code from STM32CubeIDE for reference.Current SetupHardware: STM32 Nucleo F446RETransceiver: SN65HVD230Baudrate: 500kbps (Prescaler=5, BS1=6TQ, BS2=3TQ)IDE: STM32CubeIDEIssues I'm ExperiencingWhen trying to transmit CAN messages, I'm getting "TX Error" and "CAN State: RESET" messages through UART. The free TX mailboxes show as 0, which seems unusual for initialisation.What I've TriedConfigured CAN1 in normal modeSet up the pins PA11 (RX) and PA12 (TX) for CANImplemented basic transmission code using HAL_CAN_AddTxMessage()Added proper termination resistors (120Ω)QuestionsIs my CAN configuration correct in the .ioc file?What could be causing the CAN peripheral to remain in RESET state?Are there any specific initialization steps I'm missing for the SN65HVD230 transceive
I am attempting to evaluate motor control using the X-NUCLEO-IHM07M1 power board with the STM32F302R8 Nucleo board. I have installed STM32 Motor Control Workbench version 5.4.6 on my PC. However, I encounter the following issue:Error: "Device is not connected"Steps Taken:Hardware Setup:X-NUCLEO-IHM07M1 is stacked on STM32F302R8 board.USB connection is made via STM32’s USB mini port to the PC.Power supply is connected to the motor driver board.Verified jumper settings as per user manual (JP1, JP5, etc.).Software Checks:USB connection is recognized in Device Manager as STLink (driver is working fine).Attempted connection via Motor Profiler, but it failed to detect the board.Verified that COM port is correctly assigned and visible.Motor Control Workbench:Attempted to connect in the tool after selecting the correct Nucleo board and firmware version.Tried both "New Project" and “Monitor” mode — same error: “Device is not connected”.System Info:Windows Version: windows 10STM32CubeIDE: STM32C
Hi everyone, I'm trying to generate a sine wave using PWM output updated by GPDMA transfer on an STM32H5 device. I'm following this tutorial:STM32 Change PWM Duty Cycle With DMA For Sine Wave Generation However, when I try to implement it with STM32H5 (which uses GPDMA instead of classical DMA), I can't get any output at all or get the PWM to update properly. My Goal: Generate a continuous PWM output.Update the duty cycle from a sine wave lookup table stored in memory.Use GPDMA Standard Request Mode to update the TIM2 compare register (TIM2->CCR1). My Setup:MCU: STM32H563ZI (Nucleo-H563ZI board) PWM Output: TIM2_CH1 on pin PE0 Timer for DMA triggering: TIM4_CH1 DMA Mode: GPDMA Standard Request Mode (not Linked List) Circular Mode: Enabled Data Size: Word (32 bits) Transfer: Memory to Peripheral (M2P) PWM Output (TIM2_CH1):The PWM output is generated on PE0: Notes: TIM2 configured for PWM mode 1 Channel 1 is used Output routed to PE0 (verified) TIM4 Configuration(To O
Hello,I am using Nucleo-H7S3l8 board XSPI1 interface an using FPGA as slave. Is the XSPI drives only configured to work well with memories? Can other device be used as slave? I want to test FPGA by interfacing it to STM board. I am able to send the instruction that I intend to but when I configure some address then it seems to be not going correctly. Not sure what's happening but not able to capture on scope when address is configured. It seems to hang. What can be the issue? Some driver issue or missing configuration?Please suggest what might have gone wrong.Thanks,Samiksha
i am trying to use the IHM16M1 with the NUCLEO-G474RE. i have it plugged into the top of the Nucleo board via the Morphio connectors.I can supply power (12v) to the IHM16M1, but it does not seem to be powering the G474RE.I have tried JP5 on the Nucleo in both E5V and 5V_VIN mode. Am I missing something? The IHM07M1 works when connected this way, but I cant get the IHM16M1 to work. thanks.
I am using the STM32N6570-DK board to drive some sensors and show the data on the LCD. But I encountered some problems. I follow the steps below:1. open the STM32CUBEMX and choose the STM32N6 MCU, and select the secure domain only option.2. configurate the clock and set the CPU frequency at 600MHz,and set the PLL1 at 1200MHz, using the HSE.3. generate code, and import some BSP programs into the application part, the FSBL only import some basic HAL files, and I didn't add any lines into it.4. click into the stm32n6570_discovery_lcd.c, and add lines as follows:add these into the BSP_LCD_Init():RIMC_MasterConfig_t RIMC_master = {0};RIMC_master.MasterCID = RIF_CID_1;RIMC_master.SecPriv = RIF_ATTRIBUTE_SEC | RIF_ATTRIBUTE_PRIV;HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_LTDC1 , &RIMC_master);HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_LTDC2 , &RIMC_master);HAL_RIF_RIMC_ConfigMasterAttributes(RIF_MASTER_INDEX_DMA2D, &RIMC_master);HAL_RIF_RISC_SetSlaveSecureAttri
Hello, I'm trying to use this nucleo board with the camera DCMI interface. This camera has operation condition between 2V8 and 3V1.Currently, I power the camera with a external source of 2.9V but the nucleo board is in 3V3.Is there a solution to power the MCU (but still have the st-link working) to 3V or 2V8? Thank you, Simon
Can we keep VDD33USB keep NC if USB feature not using In STM32H753ZIT6?If kept NC what may go wrong?
Hi,I'm working on a BLDC motor control project using the X-NUCLEO-IHM07M1 driver board with a NUCLEO-F446RE. I'm trying to control an A2212-13T BLDC motor (1000KV) with a 12V power supply at 2.5A, and targeting around 5000 RPM, but the motor does not spin at all.I have confirmed that the jumper settings on the X-NUCLEO-IHM07M1 are set correctly for 3-shunt operation, and the firmware is properly loaded using STM's MCSDK.However, when I use the same motor and power conditions with the B-G431B-ESC1 board, the motor spins as expected.While searching the STM Community, I found several similar issues reported when users try to run motors other than the Bull Running BR2804-1700KV (used in STM’s tutorial videos). Unfortunately, most of those threads have no final solution.Is there something about the IHM07M1 or the motor parameter configuration that causes compatibility issues with common hobby BLDC motors like the A2212?Any advice or working configuration examples would be appreciated.Thanks
Hi all.Am working with the STM32H573-DK, trying to get the ethernet connection working with FreeRTOS & LWIP over DHCP.I can see with Wireshark that it's sending the DHCP discover out ok & the DHCP server is responding with an offer but the code seems to miss that packet.I know the code is receiving some ARP packets from the DHCP server.I know that the hardware works ok if I use the ThreadX example (but I need a FreeRTOS environment).My best guess so far is the DK is not receiving UDP packets? (Which is the format of the DHCP Offer)Anyone else experienced similar with this DK?
Hello Experts,i am facing a similar issue on the STM32F407G discovery board. Is there any solution or a temporary fix for this iisue?https://community.st.com/t5/stm32cubemx-mcus/re-freertos-semaphore-not-initialised-correctly-by-cubemx/td-p/780252 Changing the initial state of the semaphore to Depleted does nothing in the semaphore definition and creation:In freertos.c, inside the function MX_FREERTOS_Init(). i think the second function parameter should be zero I am trying a simple GPIO interrupt to task signaling, but the task always takes a semaphore without the GPIO interrupt the first time. I have attached the complete freertos.c file for context. This is the console screenshot to highlight the bug: I tried to manually change:myBinarySem01Handle = osSemaphoreCreate(osSemaphore(myBinarySem01), 1);tomyBinarySem01Handle = osSemaphoreCreate(osSemaphore(myBinarySem01), 0);Now the task does not take the semaphore during start up, but the moment the GPIO in
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.