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
Dear ST Support Team,We are using the STM platform in our motor controller for the past one year. Our controller is developed for the automotive EV application.Currently, we are facing challenges at the software and code level related to motor control performance and optimization. We are stuck with code-level improvements and require technical support to analyze and fix the issues completely.We are looking for guidance and support on:Motor control software optimizationCode-level improvements and debuggingA complete and stable software solution suitable for automotive EV requirementsWe request your support from the STM motor control software team to help us resolve these issues.Please let us know the next steps to proceed further.Regards,Govind Dhongadi
Hello,I am new to STM and have been using TI MCUs in the past for motor control. I am considering using STM for a new project. I need to be able to control 5 BLDC motors with position control. They will each have their own closed loop control but will be somewhat be intertwined. I would like to start with an STM dev board and start with the control of one motor and move to more then continue to develop my own PCB. Any guidance on MCU selection/dev board selection would be greatly appreciated. And any suggestions on example projects to start with and easily modify for 5 motors. Also, I would like to know if it is possible to use absolute encoders for the motors rather than incremental for the position feedback. Thanks you!
I am using STM32WBA5MMG in my design. This the development board schematic. Below image is from development board schematic.As per the constrains , SWDIO and SWCLK must be length matched. Also need to provide a shield.My questions are given below.SWDIO and SWCLK are not differential lines, why length matching is required for them.By shield did they mean routing SWDIO and SWCLK on top of a solid GND plane
Hi,I'm working on custom board where i have to use the USB CDC class to demonstrate the USB virtual com port feature along with data transfer and receive.We have generated the project using CubeMX 6.15 and STM32Cube IDE 2.0 but not able to detect the com port.We are using PA11, PA12, PA9 pins for USB.Kindly provide a step-by-step guide.Thank you.Ram
HelloI am working on an academic research project involving a hybrid converter topology, where a controlled shoot-through state is intentionally required as part of the converter’s operating principle.I am currently using:STM32F446REIHM16M1 inverter driver boardMCSDK (Motor Control SDK)From my understanding, the IHM16M1 gate driver enforces hardware-level interlocking and dead-time, which prevents simultaneous conduction of the high-side and low-side devices in each inverter leg. Even when overlapping PWM signals are generated at the MCU level, the driver appears to mask them internally.My question is:Is there any supported or undocumented method to override or bypass the hardware interlocking / cross-conduction protection on the IHM16M1 board?I would like to clarify whether:This limitation is strictly hardware-bound, orAny alternative configuration (timer mode, driver pin usage, or hardware modification) exists that could allow controlled shoot-through for research purposes.Thank you
Hi everyone,I’m trying to get the LwIP examples from the stm32-hotspot GitHub (this one: https://github.com/stm32-hotspot/STM32H7-LwIP-Examples) running on my NUCLEO-H723ZG, but I’m hitting a wall.The README is actually great and super clear, which is why I’m surprised I can’t get it to work. I’ve built the project and flashed it to the board, and I have it connected directly to my laptop via Ethernet.The docs say the IP should be 192.168.1.10, but when I try to ping it, I get nothing. I also took a look at the code and it looked like the IP might be set to 192.168.1.1 instead, so I tried pinging that too, still no luck.Am I missing something basic here? Is it enough to just build and flash the code, or do I need to tweak some jumpers on the Nucleo or change my laptop's manual IP settings to be on the same subnet?I’d really appreciate it if someone who has used this repo could point me in the right direction.Thanks!mpek29
Good morning,I would like to implement Fatfs to communicate with a sd card in the core M4 and with a usb mass storage device in the core M7. In Cube Mx environment I'm able to initialize what I need, obtaining a fatfs M4 initialized to communicate with sd card and a fatfs M7 initialized to communicate with a usb mass storage device. Pratically this solution doesn't work (The devices are not recognized: the sd card is correctly mounted just one time and then it is not recognized while the usb is never recognized) but, when I keep everything together in the same core, fatfs M7 (usb mass storage+sd card) works perfectly. Could you tell me If it's possible to implement fatfs in the following way: fatfs M4 (sd card) and fatfs M7 (usb mass storage)? And considering that I need to create files inside sd card and write data to them in core m4 and sending these files from sd to usb in m7, are there some variables (like sd file path etc) that I need eventually to put in shared memory ?Let m
I have a simple function with loop that checks RX pin state for 10ms, and if there was high level - breaks loop and exits. it works ok with -O0, but is broken with -Os or -O1 (-O2) or -Og - it loops forever.Here's code:uint8_t isModemOn() { uint32_t expire = uwTick + 10; while (expire - uwTick < 11) { // check RXD pin level, if low for 10ms - consider modem is off if (LL_GPIO_ReadInputPort(GPIOA) & LL_GPIO_PIN_10) { return 1; } } return 0; }and how it's appears in listing080003dc <isModemOn>: * @PAram GPIOx GPIO Port * @retval Input data register value of port */ __STATIC_INLINE uint32_t LL_GPIO_ReadInputPort(GPIO_TypeDef *GPIOx) { return (uint32_t)(READ_REG(GPIOx->IDR)); 80003dc: 21a0 movs r1, #160 @ 0xa0 //#pragma GCC optimize ("O0") // Error in -Os optimization uint8_t isModemOn() { uint32_t expire = uwTick + 10; while (expire - uwTick < 11) { // check RXD pin level, if low for 10ms - consider modem is off if (LL_GPIO_ReadInputPort(GPIOA) & LL
Dear all I am trying to follow the exmaple https://github.com/STMicroelectronics/STM32CubeH5/tree/e6985112c824fce355638ef4e7113b1bc671f999/Projects/NUCLEO-H503RB/Examples/SPI/SPI_FullDuplex_ComDMA_Slave project with STM32H563 on my own target board, I copied most of the code/DMA setup form the example and got it working, however, my requirement is more complicated than the example, the example only receives and reply 1 message after a button press, but my application needs it to be able to receive/reply messages periodically, i.e. master keep sending fixed length of message and expect slave to reply with same length of message at a fixed period. For now, after I copied example, it runs receives/replies 1 message, which I see the data on bus , but then it ends up with busy state and never recovers even wait for a long time, could anyone help please? Also, the about the DMA setting, does it needs to be in circular mode? I am sort of new to STM32 and DMA. Any suggestion is appre
Hello, I need a clear step by step guide on how to set up Pnucleo lrwan 3 end node and gateway and connect both to the loriot server. currently I have issues communicating with my END node using the AT command via terminal.My other issue is that; the PNUCLEO lrwan 3 antenna is 480MHz, but when I check the paramaters of the device using terminal, I discover that the frequency is EU-868MHz, so now I have to reconfigure the device tp the right frequency, how do I do this. I have consulted the UM2587 material but it does not appear to be so clear to me.
Hi @TDK ,I have just downloaded and installed the new version 2.0.0 of the IDE and the MX software (since it is no longer integrated). I was working on a project based on the STM32WB5MMG, and everything was working correctly with IDE version 1.19.0 and STM32Cube FW_WB V1.23.0.After opening the project and regenerating the code with the new IDE version and STM32Cube FW_WB V1.24.0, I noticed some issues: in custom_stm.c it generates two times this variables:/* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ uint16_t SizeFw_Ver = 1; uint16_t SizeDatetime = 7; uint16_t SizeStatus = 6; uint16_t SizeMonitor = 15; uint16_t SizeEnv_Data = 90; uint16_t SizeFw_Ver = 1; uint16_t SizeDatetime = 7; uint16_t SizeStatus = 6; uint16_t SizeMonitor = 15; uint16_t SizeEnv_Data = 90;2. it doesn't generate any local functions in custom_app.c:/* USER CODE END FD */ /***************************************************
We noticed that the Overcurrent warning appears even when Overcurrent Protection is disabled. Could this be related to the missing feedback capacitors C38 and C42 on the OPAMPs for current sensing? Thank you for your support.Best regardsPelino
Hello,I am trying to communicate with an SDI-12 sensor through my custom STM32L4 pcb. The communication that I am trying to achieve is from a 3.3V microcontroller. Thus, I used the SN74LVC1G240DBVT buffer to convert my UART to SDI-12 data one wire, and also I had a MOSFET which converts my 3.3V of the pin to 5V (I have checked that the hardware wiring and voltages working as expected). For my UART protocol, I have this configurations: static void MX_UART5_Init(void) { /* USER CODE BEGIN UART5_Init 0 */ /* USER CODE END UART5_Init 0 */ /* USER CODE BEGIN UART5_Init 1 */ /* USER CODE END UART5_Init 1 */ huart5.Instance = UART5; huart5.Init.BaudRate = 1200; huart5.Init.WordLength = UART_WORDLENGTH_8B; // Including parity huart5.Init.StopBits = UART_STOPBITS_1; huart5.Init.Parity = UART_PARITY_EVEN; huart5.Init.Mode = UART_MODE_TX_RX; huart5.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart5.Init.OverSampling = UART_OVERSAMPLING_16; huart5.Init.OneBitSampling = UART_ONE_BIT
I have seen recommendation for by pass capacitor to be 10 times the boot strap capacitor for Mosfet driver IC's. When i verified the schematics of mb1419-g431cbu6-c01_schematic The Boostrap capacitance value is 1uF but the By pass capacitance value is 470nF between VCC and Gnd. Request to please clarify.
There have been a few posts on this forum with the same issue, but it seems the root cause is different to this post or (probably) this one.I am using an Stm32f446re Nucleo, and trying to output a waveform from dac2 using dma and tim6. What I have tried so far: Trigger is set to Timer 6 Trigger Out event. DMA is configured in Circular Mode. I'm calling HAL_DAC_Start_DMA(...) Tried changing the data width to half word and word, neither worked. Callback functions are correctly named and defined in main.c: void HAL_DAC_ConvCpltCallbackCh2(DAC_HandleTypeDef *hdac) { HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_8); } void HAL_DAC_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef *hdac) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, 1); } I want to be able to set a flag variable to start processing the next buffer. I will paste the rest of my code, it includes a (buggy) sine wave table but I can fix that once the callbacks are handled properly. It is just something to sen
Hello,I have developed a external Loader for my custom projekt. It uses a W25Q128 QSPI conected to bank 2 and alternative Pin of CLK. (Worse!, but it is so...) So i Have no exactly example for it. Also it is a Dual Core, and no example i find have special definitions for it.I worked more days on it and it worked perfekt (now!) in a Cube Projekt.Erase, write and read (manual) and memory mapped mode are perfect.If I compile the stldr file, I can load ist in Cube programmer and stm prog utility.But then I could cry. I can't do anything. No read on QSPI and so on.....I think i will have trouble with the m4 Core. The M7 Core must wait for him.I don't know. How you can help me. What is wrong. Have you any Idea?
I'm working on a battery management system using an STM32F302 going to an AEK-COM-ISOSPI1 dev board using the L9963T transcevier which is daisy-chained to 10 AEK-POW-BMS63EN boards using the L9963E chip.The problem that I'm having is that when I send a message over the ISO SPI lines, it adds an additional 0 before it sends the message.I have attached two messages that show the leading 0 bit that is added. msg 0x55 55 55 55 55 and msg 0xFF 00 FF 00 FF. SPI settings are8 bits frame MSB first Baud rate 1000 kbits/secCPOL lowCPHA 2 edgeCRC Disabled How would I go about removing the leading zero from the message? Any help would be greatThanks
Hi there ! here i'm for another question, are a day i'm go crazy with the SPI interface . I try to comunicate with MC33HB2000EX 10 A H-bridge, SPI programmable brushed DC motor driver. The datasheet write that: So i configure my SPI : and when i send data with uint16_t spiData=0x2000;uint16_t spiRxData = 0x0000; i reset the CS pin HAL_SPI_TransmitReceive_IT(&hspi1,(uint8_t*)&spiData,(uint8_t*)&spiRxData,1); i wait the callback function and i set the CS pin no one data come out from MISO and i put on my analaizer and i don't understand why the clock start to logic high and no from logic low i don't know if is the real problem I hope someone can help me Thank you Sergio
Environment:STM32F407VGTX USB HID mouse, Full SpeedProblem:Hi, I’m using a STM32F407VGTX board. I send a USB remote wakeup signal to the host and then try to receive a resume signal from the host. The STM32 board can wake up the host (bringing it to the login screen), but it cannot trigger the USB_OTG_GINTSTS_WKUINT interrupt. I have already configured my STM32 board as a HID mouse. However, if I use a real mouse instead, it can wake up the host and successfully trigger the USB_OTG_GINTSTS_WKUINT interrupt. Is there any suggestion or workaround for this problem? void usb_remote_wakeup() { if (hUsbDeviceFS.dev_remote_wakeup == 1) { __HAL_PCD_UNGATE_PHYCLOCK(&hpcd_USB_OTG_FS); HAL_PCD_ActivateRemoteWakeup(&hpcd_USB_OTG_FS); HAL_Delay(5); HAL_PCD_DeActivateRemoteWakeup(&hpcd_USB_OTG_FS); } }
I am trying to probe TC358743 (HDMI to CSI ic) to STM32MP257f-dk. The ic is able to take input from the HDMI from my laptop (I is being checked as when i give an edid as input from v4l2 then the screen of my laptop gets extended).The problem is in receiving the stream at stm32. TC358743 outputs 2 formats - MEDIA_BUS_FMT_RGB888_1X24 and MEDIA_BUS_FMT_UYVY8_1X16. Both of them are not supported by CSI input of stm.
I'm using Seeed Studio's Wio E5 board, LoRaWAN 1.0.3 and the repository Seeed Studio Wio E5 LoRa as the base of my source code. I want my device to force a rejoin only when NVM context is not restored (e.g., after a reset or memory clear), and to resume using the previous session if the NVM context is successfully restored. I have already set LORAWAN_FORCE_REJOIN_AT_BOOT to false and CONTEXT_MANAGEMENT_ENABLED to true, and I noticed that even if NVM data is restored successfuly the device rejoins (which is wrong).
Hi everyone, I’m working on an audio project with an STM32H743ZIT6 and a MEMS microphone (MP34DT05-A). Audio is captured via DFSDM + DMA, and the DMA callback (HAL_DFSDM_FilterRegConvCpltCallback) fires reliably with fresh PCM audio samples. At the moment, I am transferring the audio data to the USB Audio IN endpoint directly inside the DFSDM callback using: USBD_LL_Transmit(pdev, AUDIO_IN_EP, buffer, packet_size); To avoid overlapping transmissions, I set a busy flag until the DataIn callback (from the USB stack) fires. Only then do I allow the next USB packet to be sent. This works in the sense that nothing crashes, but the actual audio stream never “starts” on the PC (e.g., in Audacity the recording stays silent and no data seems to flow).So now I am unsure whether my current design is fundamentally flawed. What is the correct way to link DFSDM audio → USB IN endpoint? Is it recommended to send directly from the DFSDM callback (as I do now) or push the data int
Hello everyone, I would like to ask if it is possible (and if so, how) to make both m4 and m7 get an interrupt made by the user button in in the nucleo board, since the only Pin Context Assignment options on CubeMX is either m4 or m7. Do I have to do it "manually" by writing the code to register the interrupt on the other mcu? Thanks in advance!
Hello,I am trying to figure out how to configure internal voltage monitoring use the internal tamper detection to clear the RTC when an undervoltage condition occurs. My understanding is that you have to enable the backup regulator and enable monitoring like this.SET_BIT (PWR->CR1, PWR_CR1_DBP); HAL_PWREx_EnableBkUpReg(); HAL_PWREx_EnableMonitoring();But how do I set up the tamper detection. There appears to be an inconsistency between the RM and the SFR view of the RTC registers in CubeIDE. The register at offset 0x40 in the RM is called RTC_TAFCR (pg. 1980) while in CubeIDE it is called RTC_TAMPCR and they have differnt bit definitions. Which of these is correct (thye can't both be)? I believe the internal detection is included in Tamper 3, but how do I configure that.Without working tamper detection the data is preserved in the RTC at least down to 0.4V but it stops getting updated at a much higher voltage, resulting in losing time when the device is powered on again, but no way
I need to use STM32CubeMX to generate initialization routine for two pins (7,8) on SO8 package of STM32CubeC011 MCU that switches the pin's roles BACK to STLINK mode. I created a new project on STM32CubeMX whose only task is to initialize pins 7 and 8 to PA13/PA14 SWCLK/SWDIO. I wanted to copy the GPIO initialization function MX generated into an existing application which had previously (that is, after start-up) changed the two pins to another mode; after that work is done, the two pins no longer need to be in GPIO mode and can be switched back to STLINK mode to facilitate firmware upgrade/debug/etc.Two screen captures from STLINK32MX are below (pin assignments and project specifications.)The resulting (very short) C language program generates the following code for initialization of the two pins: static void MX_GPIO_Init(void) { /* USER CODE BEGIN MX_GPIO_Init_1 */ /* USER CODE END MX_GPIO_Init_1 */ /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOA_CLK_ENABLE(); /* USER CODE BEGIN M
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.