Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
my mcsdk ver is 6.3.2,I want to driver my BLDC moto with steval_esc001v1,but the moto will stop and shake after 3-phases speed up. as the motor shake,and bus voltage(current) shakes.i want to know the Possible causes and how shuld to solve it.my motor is a2212, 2200kv ,7pole pairs,7.4V - 12.6V。appendix is my stwb6 filesthanks a lot。
Hello everybody, I am currently trying to trigger a DMA request with TIM12. I have configured the timer in PWM Input Mode on CH1. While for every other timer there is available a DMA request, there is nothing for TIM12 except the one bellow(in RF0399): Is there any trick to come around from it? I found some older discussion but i didn't have any luck:How to trigger SPI DMA transfer using TIM12 TRGO on STM32H7 Timer events as DMA triggers - Improving the current situation in CubeMX/HAL Thanks in advance for your time!
Hi!I have the following code:uint32_t currentTicks; do { currentTicks = handle->controlData.ticks; // controlData.ticks is volatile // copy a lot of data from handle->controlData ... } while(currentTicks != handle->controlData.ticks);handle->controlData.ticks (and the other data fields) are regularly updated, triggered by an interrupt, which could happen during copying of this data. The idea is that if the while check is false, just copy all the data again, since during the previous copying of said data new data must have arrived and the copied data would therefore be inconsistent.We are running on an STM32H7 and the data is in DTCMRAMFor this to work, is a Memory barrier instruction required or could there be any other pitfalls?
My hardware design has finalized STM32H563 MCU (from ST Microelectronics) to interface 5-port managed Ethernet Switch (KSZ8795 from Microchip). I'm tried to use orix board library code but unable to make it run.I have following questions,1. Is KSZ8795 intended to work with Microcontrollers as opposed to microprocessor which used Linux/Windows as a de-facto OS.2. Is KSZ8795 compatible with STM32H563 MCU?3. Is KSZ8795 driver port available for FreeRTOS?
I made a mistake and set PC2 as an ADC input and PC3 as an GPIO_EXT. The IDE does not warn you when setting the pin to GPIO_EXT, it only shows the warning in the ADC, so I missed it since the ADC was already set.The question is, is there anyway to make this work. The issue I am seeing is the ADC is reading incorrectly. The GPIO_EXT works fine. Thanks.
Hi everyone,I’m trying to control the backlight brightness of the display on my STM32N6570-DK using TIM8, channel 2 complementary (CH2N) in PWM mode (it's correct?).Current setup:TIM8 clock: 100 MHz (APB2 peripherals)Prescaler: 49Auto-reload (ARR): 99 → theoretically 100 brightness stepsPWM mode: PWMN (CH2N)Output: connected directly to the display BL pinTimer started with HAL_TIM_PWMN_Start(&htim8, TIM_CHANNEL_2)Problem:PWM only works when using very high PSC and ARR values (e.g., PSC=512, ARR=3126), but then the PWM frequency is very low (~60 Hz).With proper values for ~20 kHz PWM and 1000 brightness steps (PSC=4, ARR=999), the display is either fully on or fully off — no intermediate steps are visible.The display pin seems to accept only CH2N, not CH2 normal.Questions for the ST community:Is there an “official” way to drive the STM32N6570-DK backlight using PWMN with linear, visible steps?Are there any STM examples for backlight PWM on this DK board using TIM8_CH2N?Thanks in adv
Hello ST Support Team,While reviewing the current sensing configuration of the EVSPIN32G4-DUAL board, I noticed a mismatch between the schematic and the description shown in Motor Control Workbench.In Motor Control Workbench, the current sensing section explains the presence of resistors related to the current sensing configuration.However, when I check the EVSPIN32G4-DUAL schematic, it is difficult to identify where these resistors are located, or which components correspond to the description shown in the tool.Could you please help clarify the following points?Which specific resistors or components in the EVSPIN32G4-DUAL schematic correspond to the current sensing resistors described in Motor Control Workbench?Is the current sensing implemented as single-shunt or another configuration, and where is this reflected in the schematic?Is there any additional documentation or reference design note that explains the current sensing implementation more clearly?I would appreciate your c
Hello, I am making a new project by importing the .ioc file of example code "Ux_Device_CDC_ACM" of STM32U5G-DK2. All the .c files of USB_stack and Azure_RTOS are also copied from the example project. Both, example project and My project, look same. My project builds also successfully. But no COM/ACM port is being formed after loading the project to STM32U5G-DK1 whereas, COMM port is being formed with Example project. What can be the reason ? Please help. NOTE: USB Device mode Example project in repository is provided for STM32U5G-DK2 and not for DK1. So. we are trying to make a USB Device code by referring to this DK2 example. With regard, Sudarshan Chaudhary
Hello,I am trying to get the audio data from ADF1. Therefore I use the GPDMA as shown in this example: https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U575I-EV/Examples/MDF/ADF_AudioRecorder. I am developing on a B-U585I-IOT02A.My problem is, that I seem to receive only 0x7FFF. I am not sure I do not receive valid or realistic values. Unlike in the example I want to put the received data in a TX_Queue later and handle them in another task.Please find my code attached below. I would be very grateful for hints and suggestions.Thank You!K.S. MDF_HandleTypeDef AdfHandle0; MDF_FilterConfigTypeDef AdfFilterConfig0; DMA_HandleTypeDef handle_GPDMA1_Channel10; MDF_DmaConfigTypeDef DMAConfig; int16_t RecBuff[REC_BUFF_SIZE * 2U]; volatile uint32_t DmaRecHalfBuffCplt = 0; volatile uint32_t DmaRecBuffCplt = 0; extern DMA_QListTypeDef ADFQueue; void SystemClock_Config(void); static void SystemPower_Config(void); static void MX_GPIO_Init(void); static void MX_G
Is there a difference in firmware or other features between two batches (GQ20D 9U CHN2331E) and (GQ24G 9U CHN44811)? The 1st batch number is not booting everytime compared to the 2nd batch number, when pulling Pin26 high. The fault carries if I swap chips.
Hello everyone, as part of a project, I would like to control a NEMA 17 or 23 stepper motor via UART. A TMC2209 driver is being used, and the software environment is STM32 CubeIDE. For reasons we cannot explain, we are unable to get the motor running. I am open to any tips that could help us get the motor working. The code can also be provided if needed. Thanks in advance for all feedback :)
Dear All, I just stat to evaluate the MC SDK. My platform: MC SDK v6.3.0, NUCLEO-H563ZI, X-NUCLEO-IHM08M1. Have anyone know what's the difference between "Dead Time" and "SW Dead Time" as follow figure?Per it's default configuration, (SW dead-time is 850ns, dead time is 1000ns), what is the exact value of dead-time to the power stage?Best Regards,
Question moved from this post. If I have two devices on the same PCB. say an F7 and an MP157, can the CAN_TX of one be connected to the CAN_RX or the other without a CAN transceiver? Similar to UARTs on the same PCB. Maybe series resistors would be required, or pull ups?
I try to get the HSE working on a Nucleo-U385RG-Q board by the standard settings in the STM32CubeIDE, but can't get it to work. I changed the default soldering connections per the UM3062 User manual to SB19 and SB21 Off, SB20 Off, SB3 and SB4 On. I monitored the HSE by redirecting it to the MCO pin (PA8 / D7). but got no signal. I monitored other clock signals, like the external LSE and the internal high speed oscillator via the MCO pin and had no problem to get a signal out.Though the Cube's settings should start up the HSE, it didn't, and even when I added a line of code (RCC->CR |= RCC_CR_HSEON;) to enable the HSE oscillator, I did not get anything.I have no problem to get this working on a Nucleo-C092RC board, so I wonder whether there is something wrong with the HSE oscillator on the Nucleo-U385RG-Q or with the soldering settings recommended in the manual.I would appreciate any feedback, because I purchased more than 100 of these boards to use in an experiment, and I
Hi,STM32G484 is running well with FreeRTOS.The only thing left is to transfer the USB communication into the RTOS-task.Is it possible to redirect the function pointer, which is used now, to another function?Greetings,ErX
Hi, I am using L476 controller with MCSDK 6.3.0 to control the BLDC motor, able to control the motor with Motor pilot application. However, i need to control the motor using serial communication IDEs like Realterm or Putty.I referred the document "Motor Control Protocol Suite" but didnt succeed in understanding and implementing the same. Please share some examples of the commands.I want to use command service only not the ASPEP. Looking forward for the support as soon as possible.
Hello, I have a question about STM32H7S3A8I6 MCU.https://www.st.com/resource/en/application_note/an5935-getting-started-with-stm32h7rx7sx-mcus-hardware-development-stmicroelectronics.pdfLooking at Table 2 of the description in the PDF above, for graphics, STM32H7S3xx specifies GPU2D as N and GFXMMU as Y.https://www.st.com/resource/en/datasheet/stm32h7s3a8.pdfLooking at Table 21 in the following PDF, there are UFBGA 169 SMPS GFx and UFBGA 169SMPS GP. Can I look at the pin number with GFx? and Is the library in the photo for the STM32H7S3A8I6 MCU?
I'm trying to migrate a project from HAL back to SPL as it's less of a haul than porting our code I have to integrate to HAL. The HAL program compiled but at some point during my porting process I'm now getting link errors ONLY for _fstat and _isatty, not any of the other functions defined in the assert.cThe assert.c is the same between a working SPL based project we have and the new one I'm creating, so nothing has changed there. If I implement _fstat in my main.c it still complains that it can't link.Linker Error:c:/program files (x86)/gnu arm embedded toolchain/10 2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu arm embedded toolchain/10 2020-q4-major/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+dp/hard\libg_nano.a(lib_a-fstatr.o): in function `_fstat_r':fstatr.c:(.text._fstat_r+0xe): undefined reference to `_fstat'I've also tried changing and linking against the soft-fp version of the
I have tested the LoRaWAN_End_Node example on a B-WL5M-SUBG1 board and I measure power consumption of 1.7uA when the processor is in STOP mode between transmissions. This is exactly what I expected to see.I designed a very simple custom board based on the B-WL5M-SUBG1 design, downloaded the same .elf file to it, and it communicates with my LoRaWAN gateway as I expect. However I measure ~300uA current draw while it is in STOP mode. I have compared my custom board schematic to that of the B-WL5M-SUBG1 several times looking for a difference that would account for that much extra power consumption and I just have not found it.I am using STM32CubeMX v6.16.0, STM32Cube FW_WL V1.4.0, and the part is STM32WL5MOCH6TR. I have attached the schematic of my custom board.I am hopeful that someone can see what I have missed.
Hello,I am using an STM32H743 microcontroller. UART8 is configured at a baud rate of 460800 with DMA enabled. The UART output is logged by a USB logger which creates a FAT32 text file.The transmitted data contains mixed data types such as integers, characters, strings, floats, and doubles. To combine the data, I format it into a string using snprintf.I am facing a strange issue:When I format the string using a comma after the first integer, and the second integer variable is zero, the value recorded in the USB log becomes 8 instead of 0.When I replace the comma with a semicolon, the value is recorded correctly as 0.Additional observations:This issue only occurs when the data is generated by the STM32.If the same formatted data is sent from a computer or another hardware source, the issue does not occur.If I log the STM32 UART output directly on a computer terminal, the data is correct.The problem only appears when using the USB logger with STM32 UART DMA output.Could you please advise
I have a bunch of following warnings:c:/programs/ARMtools/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F1xxxx/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h: In function 'void LL_GPIO_SetPinMode(GPIO_TypeDef*, uint32_t, uint32_t)': c:/programs/ARMtools/EmbeddedBSPs/arm-eabi/com.sysprogs.arm.stm32/STM32F1xxxx/STM32F1xx_HAL_Driver/Inc/stm32f1xx_ll_gpio.h:343:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 343 | register uint32_t *pReg = (uint32_t *)((uint32_t)((uint32_t)(&GPIOx->CRL) + (Pin >> 24))); |in several LL headers.Can this please be fixed in some suitable way? One way to do that might be to replace the 'register' specifier by a macro, which would be defined based on the __cplusplus standard preprocessor macro and its value. A simple version would be to add#if __cplusplus >= 201703L #define register #endifto each header where this occurs, but I am not a C++/build-environment specialist so don't know whether thi
Hello everyone,We are experiencing an issue with a product that integrates an STM32H562ZG microcontroller.Our development environment consists of IAR Embedded Workbench 9.70.1, with the project configured using CMake.Currently, we are observing unexpected behavior during debugging. Specifically, after downloading the firmware using IAR and ST-Link V2 and starting the debug session, the application immediately jumps to NMI_Handler().Unfortunately, even after modifying the code, reflashing the microcontroller, and restarting the debug session, the firmware still ends up in NMI_Handler().Performing a full chip erase and reprogramming with IAR resolves the issue, it becomes inefficient and problematic for debugging because any time the code is modified a full chip erase is needed to make all work.We have seen something related to ECC flash check but we don't know if can be a hint.In our case ICACHE is not activeted (disable by default from CubeMX project). If you needs some other det
Hello everyone,I am using SPI2 of STM32F103RCT6 to communicate with an AT45DB641E DataFlash device. I am trying to understand why the effective SPI data rate is significantly lower than what I expect based on the configured SPI clock.Hardware setupMCU: STM32F103RCT6 (Cortex-M3)SPI instance: SPI2SPI clock: 9 MHzData frame: 8 bitsSPI mode: 2-line unidirectional (full-duplex hardware)NSS: Software-controlled GPIOCore clock: 72 MHzCustom PCB (STM32 + AT45 connected directly)Schematics attachedTest descriptionI am reading the status register of the AT45DB641E.Once the read command is sent and SS is held low, the flash continuously outputs two status bytes as long as clock pulses are provided.I measured the execution time of HAL_SPI_TransmitReceive() by placing timestamps before and after the function call, using the DWT cycle counter (DWT->CYCCNT) available on the Cortex-M3.Here is the code used for testing, the tx and rx buffer are globally defined of size 5000 and datatype uint8_t: /*
Hello I am currently doing a project where I am using a STM32Nucleo-C092RC to generate a PWM signal the only problem is that my peak to peak voltege is only 160 mV. Is there any way to fix it so it is or is my board broken?
I would like to use the single USB internal PHY on the STM32H735 to connect to a 2 port hub chip (like the Microchip USB2422) so that I can connect to both a USB stick for firmware upgrades as well as a cellular module. I started connecting everything up and then I came across a multiple sources saying that you can't connect USB Hubs to the internal PHY and you have to use the ULPI interface to connect to an external PHY, but none of the sources really explain why other than saying the internal PHY isn't capable of High Speed operation, and the USB software from ST doesn't allow for hubs. I don't understand what this has to do with interfacing with a hub IC when I'm perfectly fine with operating at Full Speed. So I have a few quesitons:1) Can I use a USB Hub (like the USB2422) as long as I'm OK with it operating at Full Speed only? Is it technically possible to connect these devices and get them to work?2) Will the USB Host middleware provided through STM32CubeM
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.