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 having a very annoying issue with an STM32U5G9ZJ and a Newhaven NHD-4.0-480480AF-MSXP-CTP display using an ST7701SN over 2-lane MIPI DSI.The basic communication works, but I cannot get any video onto the display.What worksThe panel responds correctly to LP short DSI commands:Reset works. ST7701 registers can be read. The initialisation sequence runs successfully. 0x29 Display ON works. 0x23 All Pixels On makes the display white.So the panel and the LP DSI communication are working.What doesn't workAs soon as I try to send RGB888 video over HS DSI, the display stays black.I've tested this both using the LTDC/framebuffer and the internal pattern generator. The latter was to rule out the framebuffer/LTDC completely.The pattern generator starts successfully and the DSI registers show the video engine and both data lanes entering an active HS state, but the panel still stays black.I'm using:2 DSI lanes RGB888 Burst video mode 480 × 480 480 packet size Continuous clock Automa
1.I would like to connect 6 Industrial Sensor which support (4-20ma) or (0-10 Volt ) to STM32H723ZGT6.Guide me both Manual circuit or any IC which can perform below TVS / series protectionPrecision shunt / scalingRC anti-alias filter2.How i can connect and what need to be done for io protection from Reverse polarity and Surge protection
Hi,I am using STM32G431CBU6 with HSI16 as the only clock source (no external crystal on the board), and I need to budget the resulting frequency error. I have a few questions about DS12589 Rev 2 (October 2019), Table 44 "HSI16 oscillator characteristics", page 107, and Figure 23 on the same page.Q1 (main question) — Are fHSI16 and Δtemp(HSI16) additive, or is Δtemp inclusive?Table 44 lists two separate parameters:Symbol Conditions Min Max fHSI16 VDD = 3.0 V, TA = 30 °C 15.88 MHz 16.08 MHz Δtemp(HSI16) TA = 0 to 85 °C −1 % +1 % For a single device over the 0 to 85 °C range, is the worst-case total frequency error:(a) −7500 ppm − 10000 ppm = −17500 ppm … +5000 ppm + 10000 ppm = +15000 ppm (i.e. the two parameters add), or (b) ±10000 ppm (i.e. Δtemp already includes the initial tolerance at 30 °C)?This makes a large practical difference for bit-timing budgets, so I would like to be sure.Q2 — Is a typical temperature coefficient (ppm/°C) available?Figure 23 shows mean/
Hello,I am using an STM32N657 on a custom board.I need to use PA6 as PIXCLK, so I would like to move the BOOT1 function from the default PA6 pin to PN10.According to the STM32N6 BootROM/OTP description, I understood that BOOT1 can be remapped using OTP19 (BOOTROM_CONFIG_10): I programmed OTP19 with 0x15200000 in STM32CubeProgrammer to change BOOT1 from PA6 to PN10.Before programming OTP19, I could connect to the MCU normally through ST-LINK/SWD using PA6 as BOOT1.However, after programming OTP19 to 0x15200000, I can no longer connect to the MCU.The same issue has occurred on more than one custom board.My test conditions are:MCU: STM32N657 I/O supply voltage: 1.8 V BOOT1 remapped to: PN10 OTP19 programmed value: 0x15200000 PN10 is held HIGH before and during reset ST-LINK detects the target voltage During connection, STM32CubeProgrammer can sometimes identify Device ID 0x486, but then reports that the connection to device 0x486 is lost The board works and SWD connection is available bef
Hello ST Team,We have a custom STM32N657Z0H3Q board on which BOOT1 is routed to PN10 instead of the default PA6.To configure the Boot ROM to sample BOOT1 from PN10, we programmed OTP Word 19 (BOOTROM_CONFIG_10) as described in RM0486 Rev. 4, Section 5, Table 18:dev_boot_port [24:21] = 9 → Bank N (PN) → 9 << 21 = 0x01200000 dev_boot_pin [28:25] = 10 → Pin 10 → 10 << 25 = 0x14000000 OTP19 = 0x15200000Steps FollowedBefore programming, we read OTP through SWD. OTP19 was 0x00000000, with status 0x00000000, indicating that it was unprogrammed and not write-locked. SWD/ST-LINK access was working normally. We programmed OTP19 with 0x15200000 using STM32CubeProgrammer v2.23.0, without enabling the lock option. The tool reported: "OTP words programming done successfully" After the next power cycle/reboot, the device no longer enters Development Boot. Instead, it boots from Flash, and our FSBL and application start running normally. SWD/debug access is no longer available.Same
Hi all,My MX_SDMMC1_SD_Init() is failing and dropping into Error_Handler() on a custom STM32U575RGT6 board.I traced it down to SD_PowerON() failing — it returns HAL_SD_ERROR_UNSUPPORTED_FEATURE. Digging deeper, this happens because one of the internal response-check calls (SDMMC_GetCmdResp1() / GetCmdResp2() / GetCmdResp3()) is returning SDMMC_ERROR_CMD_RSP_TIMEOUT (the CTIMEOUT flag gets set) — basically the card isn't responding to one of the commands sent during power-on/init.i have checked HAL_SD_InitCard() clock divider formula where HAL correctly computes ClockDiv = 21 for 16 MHz kernel clock also measured SDMMC_CK on oscilloscope and getting 381.7 kHz which is within spec (≤400 kHz)we have external pull ups at all pins of sdmmc plus when i run on this fun SDMMC_CmdAppCommand i can see activity on CMD line but i didnt get any response on that line.the clock i’m giving is HSE PLL1P to SDMMC clock mux which is 16Mhz final
Hello guys. I’m currently trying to implement a CI/CD pipeline on my project, using a dedicated RPi device (Raspbian) as a test-bed. I use a python script to generate the cmake.txt file and then the arm libraries and ninja to build the .bin file and the programmer cli to flash it onto my device. The thing is that my approach works for now, but trying to include external packages like CMSIS dsp, or user provided libraries is such a huge pain. It works for now that the package is a very specific one, but this might change in the future, with the inclusion of new packs/libraries.So my question is, what is the best way -- Generate the cmakelist file that also includes the external packs/librarie. Is there a possibility to use an extension on Vs code server installed on my RPi ? -- Link said packages/libraries. I currently have a copy of a specific version of the Board FW files where most of the middleware files are, my imported libraries and the external CMSIS packs. Any advice would be we
Greetings,I am not quite a USB, or USBX, expert, but I do have a question.I have a custom HW design utilizing the H573, and the USB FS port, which according to the datasheetsupports a max of 8 configurable endpoints.We have a USB Hub chip integrated into the HW design, and hoped to support 4 USB devices behindthe hub. Assuming that each device is a 2.0 USB Flash Drive (Sandisk, or whatever vendor),and each USB Flash drive consumes 3 endpoints (control, IN and OUT), this is twelve endpoints just forthe flash drives.The number 8 (endpoints), is fixed in STM32H5 hardware? Am I correct in saying that the four flash drive application will never work? ThanksKen
Hello,I have recently tested the timing of DMA reading data from GPIO on an STM32H755 and found that the required input signal hold time is shorter than what is described in AN4031. I would like to ask whether my understanding is incorrect or if it is due to architectural differences in the chip.Test platform and configuration:Hardware: NUCLEO-H755ZI-Q, using the CM4 core, CM7 idle.System clock: SYSCLK = HCLK = PCLK2 = 8 MHz, APB2 timer clock = 8 MHz.Timer: TIM1 configured in PWM mode, CH1 outputs a 1 MHz square wave with 50% duty cycle, and the DMA request for the CC1 event is enabled.DMA: Using DMA1_Stream0, peripheral address is GPIOA->IDR, data width half-word (16 bits), peripheral address not incremented; memory address points to an SRAM array, half-word width, address incremented. FIFO disabled.External signal: A signal generator produces a 1 MHz PWM signal connected to PA0, and the phase is adjusted so that its edges align with the edges of the TIM1_CH1 output.Test method:Sta
Where can I find STM32H5F5J-DK demonstration firmware full source code?
I’m trying to set up flashing firmware and initializing the RTC clock on a blank or chip erased STM32H747Xi using the STM32Cube CLT package that contains the STM32_Programmer_CLI.exe command line tool. I can’t seem to write to the critical registers for RTC. Is there a procedure to set the RTC? If so, can you list the steps needed to do so?Thanks,Johnas
Hello, hope you all are doing well.I am unable to transmit messages over CAN using DMA on my STM32G431RB Nucleo board. My JLink didn’t show any errors in my code flow, but my logic analyzer did not register any CAN messages on the TX pin (PA12), and the output stays high. I also tried using a CAN adapter to read the messages which wasn’t fruitful. How can I debug this? I used this tutorial for reference: Thank you in advance!CanManager.cpp#include "CanManager.h"CanManager::CanManager(FDCAN_HandleTypeDef* hfdcan) : mHandle(hfdcan){ mFilterConfig.IdType = FDCAN_STANDARD_ID; mFilterConfig.FilterIndex = 0; mFilterConfig.FilterType = FDCAN_FILTER_RANGE; mFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO0; mFilterConfig.FilterID1 = TX_ID; mFilterConfig.FilterID2 = 0x7FFU;}HAL_StatusTypeDef CanManager::Init(){ HAL_StatusTypeDef ret = HAL_FDCAN_ConfigFilter(mHandle, &mFilterConfig); if (ret != HAL_OK) { return ret; } ret = HAL_FDCAN_Start(mHandle);
I am testing Rhino encoder motors(ig32) 100rpm on an STM32H723ZG Nucleo-144.my actual connections are: Motor driver PWM → PC6 → TIM8_CH1Motor driver DIR → A0 → PA3Encoder A → D5 → PE11 → TIM1_CH2Encoder B → D6 → PE9 → TIM1_CH1my confirmed the CubeMX configuration shows: TIM1 Encoder Mode = TI1 + TI2PE9 = TIM1_CH1PE11 = TIM1_CH2So the encoder is a genuine quadrature encoder, and I have intentionally kept TI12 rather than switching permanently to TI1.2. Motor encoder specificationRhino RMCS-5031 datasheet.The datasheet specifies:Gear ratio: 1:174 Encoder type: Quadrature Output-shaft CPR listed as 9048 Base Hall sensor count: 13The relationship is:13×174=226213\times174=2262and with 4× quadrature decoding:2262×4=90482262\times4=9048So the manufacturer's 9048 figure and my observed quadrature counts became an important part of the investigation.3. my original problemI originally wanted the motor to:rotate exactly one output-shaft revolution and stop based on encoder counts.i initi
I am trying to use a STM32G0B1CBT3 for standard (non-FD CAN communication).The device is running from a 8 MHz HSE oscillator.This is the clock topology I am using: As you see the CCS is disabled and the CAN clock and the system clock is running on 64 MHz.In some cases my CAN frames are transmitted with a bitrate faster than expected:The edges some times falling totally to the sampling points, the calculated bit times are lower than 4 us: Putting the correct and incorrect frames the difference is more visible: I have tried to route the HSE to the MCO to see how stable is it, but I have not detected any deviation which could cause this deviation.I also tried to run an overnight test to send a CAN frame continuously and capture the waveform and calculate back the bit times are quite identical: Any hints, ideas would be welcome!
Hello everyone, I have the following use case: I want to receive raw data via Ethernet, which works fine, but I have a problem: When I send 100 bytes, I only receive 14 bytes in my software on the MCU (STM32H7S3L8). I was able to fix this by settingAutomaticPadCRCStrip to DISABLE. Now I receive 104 bytes, which is also not the desired behavior. After a little research, I found out that the 4 bytes are CRC, so I continued searching. After some searching, I found the CRCStripTypePacket property and set it to ENABLE, but unfortunately this property has no effect. What do I need to do to get my 100 bytes but not the CRC? Do I need to set something else? Is this a bug? Please help me, I'm stuck.Thanksstm32h7rsxx-hal-driver 1.2.1Best regards,Paul B
Hello,I have a Nucleo-L432KC with a dead microcontroller, but the STLink IC is ok.I wanted to use the STM32F103 to develop some USB code, so I removed the broken L432 and populated the reprogramming header for the SWD, CN2.I connected there a STLINK-MINIE to erase it, but CubeIDEProgrammer cannot read back anything.At the first connection I was able to erase it (maybe just partially?), because now it is not recognized anymore as ST_Link device and the LED has only a faint red color.I also connected the reset to the STLINK-MINIE and tied the BOOT0 to 3.3V.Is there anything else I can try to fully erase and then re-program the F103? Thanks,Marco
In testing the LoRaWAN_End_Node_LBM application supplied with STM32CubeWL-1.5.0 release I found that the output power is substantially lower than the same test setup with the LoRaWAN_End_Node application supplied with STM32CubeWL-1.4.0. This testing was conducted only using the US915 region setting.First I found that the EIRP was being defined as 16 dBm in Middlewares/Third_Party/LoRaWAN/smtc_modem_core/lr1mac/src/smtc_real/src/region_us_915_defs.h when it should be 24 dBm.#if defined( LR11XX ) || defined( SX1262 ) || defined( SX1268 ) // region is 30 dBm but radio is 22 dBm ERP (+2 to EIRP) #define TX_POWER_EIRP_US_915 (24) // define in dbm #else // region is 30 dBm but radio is 14 dBm ERP (+2 to EIRP) #define TX_POWER_EIRP_US_915 (16) // define in dbm // TODO must be checked, SX126x dependent for the max power #endifSince the project compiles with the preprocessor symbol -DSX126X the #if condition fails and the maximum transmit power is capped at 14 dBm ERP rather tha
Hello, I am working with X-NUCLEO-WB05KN1 together with NUCLEO-U083RC. I had previously tested U0 consumption in Stop mode and I got around 1.5uA (using 3.3V supply and LSI). From the datasheet it says that STM32WB05KZ should be an ultra low-power MCU, however I am using the Beacon app from the X-CUBE-WB05N software package and I am getting measurements of around 37mA. Is this related with the SPI firmware (DTM binary) flashed into the shield to run the example? I would like to achieve a consumption on the uA scale, do I need to make my own firmware to the chip? If so, is there any example and how to communicate with my U0?I am supplying 3.3V into the CN6 pin 4 and measuring with a multimeter so the ST-LINK is now being powered.BR
I am working on an STM32H7-based project where I continuously poll sensor data over SPI in DMA mode. Everything works as expected for the first few hours, but occasionally the SPI bus freezes and triggers a timeout error (HAL_SPI_ERROR_TIMEOUT).Resetting the SPI peripheral manually recovers the communication, but I want to identify the root cause instead of using a soft-reset workaround.Has anyone encountered similar bus lockup issues with STM32H7 SPI DMA implementation? Any tips on proper flag clearing or clearing the FIFO buffer safely would be greatly appreciated!
Hi,I am trying to flash my STM32U5G9J-DK2 via TouchGFX Run Target button. The mk file returns this error:* STM32CubeProgrammer is not found. Make sure the STM32CubeProgrammer is installed in its default directory. ** You can download it at https://www.st.com/en/development-tools/stm32cubeprog.html * I am 100% sure that STM32CubeProgrammer is installed at the right directory that is required by the mk file.The problem happens even when trying to flash an exemple app after selecting the right demo board in TouchGFX Designer.Anyone encountered this issue?
I am using STM32CubeMx to calculate the i2C timing for i2C master. The i2C kernel clock is 200MHz. I2C speed frequency is 400KHz. Coefficient of digital filter 0, Analog Filter Enabled. If Rise time and Fall time were set to 0, TimingR = 0x109035B7. With this setting, Tpresc = 10ns, Tsclh = 1840ns, Tscll = 540ns, Tscldel = 100ns, Tsdadel = 10ns, Tsclh + Tscll + Tscldel +Tsdadel = 2490ns. Actual SCL clock is measured ~2500ns. If Rise time and Fall time are set to 300ns( I2C Fast mode max tr and tf), TimingR = 0x40FA1531. With this setting, Tpresc = 25ns, Tsclh = 1250ns, Tscll = 550ns, Tscldel = 400ns, Tsdadel = 275ns, Tsclh + Tscll + Tscldel +Tsdadel = 2475ns. Actual SCL clock period is measured only ~2000ns (Tsclh ~650ns, Tscll ~1350ns).Why is SCL clock period too low in the latter case? Should SCL be stretching low for Tscldel +Tsdadel?
Hi,I am using the following hardware setup: NUCLEO-G474RE X-NUCLEO-IHM09M2 STEVAL-IPM20B DC bus: 400 V Motor rated current: about 5 Apeak STM32 Motor Control SDK / Motor Pilot 6.4.2 I have loaded the Motor Profiler firmware generated by Motor Control Workbench.My question is:Can I use the Profiler function in Motor Pilot 6.4.2 to automatically measure the motor parameters with this hardware configuration at a 400 V DC bus voltage?My main concern is that the DC bus voltage is relatively high. I would like to confirm whether the Motor Profiler supports this voltage range with the STEVAL-IPM20B, or whether the profiling procedure should be performed at a lower DC bus voltage first.Are there any recommended voltage/current limits or additional precautions when using Motor Profiler with STEVAL-IPM20B?Thank you.
Hello there, I’m working on a device that in its normal operation uses the MSC.But I want my clients to also be able to update the device via USB using DFU.#define USBD_PID_FS 57105#define USBD_PRODUCT_STRING_FS "STM32 DownLoad Firmware Update"#define USBD_CONFIGURATION_STRING_FS "DFU Config"#define USBD_INTERFACE_STRING_FS "DFU Interface"#define USBD_PID_FS 22314#define USBD_PRODUCT_STRING_FS "STM32 Mass Storage"#define USBD_CONFIGURATION_STRING_FS "MSC Config"#define USBD_INTERFACE_STRING_FS "MSC Interface"I found these differences and made a work around, CubeProgrammer is detecting a DFU device when a button is pressed:void MX_USB_DEVICE_Init(void){ /* USER CODE BEGIN USB_DEVICE_Init_PreTreatment */ //check to enter DFU mode if(HAL_GPIO_ReadPin(USR_BUT_ENTER_GPIO_Port, USR_BUT_ENTER_Pin) == GPIO_PIN_RESET){ if (USBD_Init(&hUsbDeviceFS, &DFU_Desc, DEVICE_FS) != USBD_OK) { Error_Handler(); } if (USBD_RegisterClass(&hUsbDeviceFS, &U
Hi, I have a lot of SVG files in my project, so much so that I had to move them to my external flash. Now, I know I can move SVG files to external flash by adding a section to my linker script: ExtFlashSection : { */SVGDatabase.o(.rodata.*) } >EXT_FLASHHowever it would be simpler to simply set this in TouchGFX Designer itself just like I can choose the location of PNGs.As seen in the image below. I can select a Section for PNGs, but not for SVGs.Is this something that can/will be added to TouchGFX in the future?
I’m trying to use ADC oversampling and noticed that temperature value is distorted in that case.I have configured ADC with 7 external inputs, temperature sensor input and Vref input. Vcc/Vcca is 3.27V, sampling time is 7.5 cycles.When oversampling is disabled - I’ve got averaged raw value 2115 for analog input (voltage 1.64V), 1005 for temperature sensor and 1582 for Vref. When oversampling is enabled (no matter 2x or 16x, with shifting to same count of bits as added by oversampling) - I’ve got 2115 for analog input, 1107 (!!) for temperature sensor and 1584 for Vref. So, only temperature sensor input value differs. And, as result, I’ve got 63*C instead of 33*C when oversampling is enabled.What’s wrong with oversampling? Can it be fixed by some kind of settings? Or I must forget about it and use software oversampling instead?I’m using latest CubeIDE 2.2.0 and CubeMX 6.18.1 with latest libs 1.6.3.
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.