Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I am using a Nucelo-429zi board for development and my custom PCB schematic is based on this board. I am experiencing a problem where about 10% - 20% of the time after a hardware reset the PHY will fail auto-negotiation. The green led does not come on and the amber led blinks. This happens even when on the debugger and the MCU is not allowed to run. I only have one Nucleo board so I cannot try another to see if the problem is unique to this board.Is this a known problem? seen before?What could it be? Possibly the clock circuit?
I am using STM32U575 (MCLK = 160 MHz) with ADC1 in scan mode (4 channels).ADC conversions are triggered by TIM3 TRGO and results are transferred by DMA in circular mode.Continuous conversion is disabled.TIM3 is configured to trigger ADC every 100 us (10 samples per ms).ADC results are copied to a snapshot buffer in HAL_ADC_ConvCpltCallback().In the application task, ADC values are read from this snapshot buffer every 100 us.However, I observe repeated ADC values (e.g. A, A, B, B…) instead of updated data at each 100 us read.Reducing the application read rate decreases the number of repeated samples. Is this behavior expected when using ADC scan mode + DMA circular?What is the recommended way to ensure ADC data is updated strictly at 100 us intervals(1 ms / 10 samples) without repeated values?Should ADC data be processed only in the DMA transfer complete callback,or is there a better synchronization method? Related code: //task for (uint8_t i = 0; i < POINTS_PER_MS
Hi there,I'm attempting to use an STM32 U5 device to interface with another device over SPI, and am trying to do it using 48 bit SPI frames supported by this device.An illustration of what I'm trying to accomplish is below, the key is to be able to transmit and receive 48 bits of SPI data, and then cycle the CS (aka NSS) line between frames. I've successfully accomplished this by putting the SPI driver into 16 bit mode, and using the HAL to send 3 16 bit frames at a time, but this is proving to be pretty slow in terms of how fast the U5 can execute the 10 or so frames required. I do know the content of all the MOSI data at compile time, so I was wondering if there's a good way to use DMA (possibly with the linked list setup) to do this and move some of the load off the CPU, but so far I can't find a solution that allows the transmission of the 10 48-bit frames while also cycling the CS line between frames.Does anyone have any recommendations?
Hello all, I've come here for a issue I failed to debug. My setup is as follows: I have a NUCLEO-F767Z development board and im debugging/programming it through the onboard STLINKV2 with SWO enabled. I am simply just trying to get a USB device to enumerate. I have configured the USB_FS host to the drive VBUS through pin PG6 where the USB power switcher is on the nucleo. My clock configuration is shown in the attached image. When plugging in a USB mouse (that works on my PC) through a USB A Female to USB Micro Male adapter, the SWV console prints forever: USB Device Connected USB Device Reset Completed ERROR: Control error: Device not responding USB Device Connected USB Device disconnected USB Device Connected USB Device disconnected USB Device Connected USB Device disconnected USB Device Connected USB Device disconnected USB Device Connected USB Device disconnected USB Device Connected USB Device disconnected USB Device Connected USB Device disconnected USB Device Connected USB D
Hello all,I am planning to purchase the EVLSERVO1 to control an industrial three-phase PMSM servo motor (rated 220V AC) for a hobby project. I will be running it at a lower voltage and accept the speed loss.The motor has a 17-bit absolute encoder using RS485 physical layer (protocol is currently unknown, likely proprietary, which I plan to reverse engineer).The EVLSERVO1 manual states: "The 120 Ohm termination resistors R84/R85 must be removed if termination is embedded at encoder side." My encoder has a built-in 100 Ohm termination resistor.While I understand the manual's instruction to prevent double termination, I would prefer not to modify a new board if possible.If I leave the resistors on the board, the parallel combination results in a ~54.5 Ohm load. Given that I plan to use a short cable (< 1 meter), is the EVLSERVO1's transceiver robust enough to drive this lower impedance without signal collapse? Or is the "must remove" warning critical because the board uses 3.3V logic a
Doing the set up in MXI have four ADC channels on APB2 with PCLK2 at 84 MHz sampling 4 microphones.The recommended audio sampling rate stretch from 44.1 kHz up to 96 kHz, so initially I'm happy anywhere in that range for now. I have set the clock pre-scaler to divide PCLK2 / 4 so the ADC clock is at 21 MHzI have 12 bit resolution which takes 15 ADC cycles but then in the "rank" section of the parameter settings there is a pull down for sampling time for each channel. I'm guessing that the value I pass in the "rank" section is what I would use to get the final sampling rate.e.g. if I chose 84 cycles for each channel then I would have a sample rate of 250 kHz per channel giving a sample rate for all conversions of 62.5 kHz?Or do I add the sample time to the resolution time e.g. 84+15 giving a sample rate of ~212 kHz per channel?
I am using a UX_Device_Audio2.0-based project on H7. When I play a stereo file (actually dual mono), the right channel plays correctly, but the left channel contains a mix of left + right.When I play mono file, the right channel is much louder while the left is extremely quiet.Could this be a codec configuration issue (mixer/settings), a USB audio packet scheduling problem, or something else? I can't seem to find a fix yet.
I am trying to complete one – just one – ADC conversion without using DMA. This is sort of a one-off sampling after power-on, and subsquently the regular sequence conversion with DMA is to take over. But I don't get that far.I'm trying to sample ADC1 channel 15, but never get a high EOC flag. To be absolutely certain about how the ADC is set up, I've read these register values via STM32CubeProgrammer:ADC1_CFGR = 0x80000000In short: Injected queue disabled; contiuous and discontinuous modes off; hardware trigger disabled; DMA disabled.ADC1_CFGR2 = 0In short: BULB disabled; gain compensation disabled; oversampling disabled.ADC1_SMPR2 = 0x0003E000In short: Channel 15 sampling time 640.5 clock cycles; channel 14 sampling time 247.5 clock cycles.ADC1_SQR1 = 0x081C23C0In short: First conversion channel is 15. Number of conversions is 1. All other bits should be irrelevant.ADC1_CR = 0x10000005In short: ADC voltage regulator is enabled; ADC is enabled: ADC is converting (apparently)ADC1_ISR =
I use external ADC (slave) with pins with dual function. And when SPI don't work , on MISO pin can check and "end of conversion". This is when SPI pin NSS is high.So: can I activate pin first like SPI "alternative pin" (pin is input - MISO) and like GPIO input using pooling or like "EXTI line". Best Regards
Hi, Im using STM32g0b1 ADC in continous mode.I am continously converting channels 0,1 and 2. Everything works perfect when clocking the ADC with PCLK/2.SYSCLOCK is 64MHzPCLK is 64MHz so ADCCLOCK is 32MHz.I get End-of-Conversion Interrupts correctly and each 3rd EOC interrupt I am getting an End-of Sequence interrupt. If I use PCLK/4 (ADCCLOCK 16MHz) the timing for conversions is seemingly as intended (everything takes exactly double time), however channels get mixed.I found that End-of Sequence interrupt occurs every two conversion (instead of every three conversion) and I can no longer match Conversion results to channels.In fact channel 2 conversion result ends up as first, second or third result within a series. Remark: I started to check for End-of Sequence interrupt only after getting above problem. Is there restriction about clocking the ADC?
I'm driving a customized LCD with STM32F469IIT6. However the image was shifted occasionnally. This issue is very hard to reproduce as it occurs 3time max a day. I'm pretty sure that the sync configs are correct. I noticed that the lane byte clock is close to its limit. Is there any advises or instructions ti solve this? I can give you more details about the issue.
I work on the STM32U5G9J-DK2 and what I noticed, the RTC doesn't accepted properly hour value which is greater than 12. Than calendar doesn't work, don't actuallize and the hours going UP for example from 23 to 24 and from 24 to 25 and so on... It's really strange bcos on the STM32F407 it work flawlesly without any problem. The solution is using 12 hour format write and sign AM/PM by RTC_TimeTypeDef.TimeFormat value 0 = AM, 1 = PM. Then calendar is properly running and if anyone like me want use 24 hour time format it need realised by software.Or if anyone know for this MCU other method to use 24H format by hardware you could be posting below.
Learning on how to code 4x4 keypad with F411RE I came to need to learn timer in order to generate an interrupt (saying simply C function should be called lets say every 1 second) I created STM32 project CubeIDE+CubeMX selected TIM3 (in Timers) -> set Clock Source to InternalClock, set Prescaler ( PSC... ) to 8399 ( googled, found example ),set Counter Period to 9999 and set NVIC checkmark for TIM3 (enabled) Saved IOC file and CubeMX generated some code for me.In stm32f4xx_it.c file I added void TIM3_IRQHandler(void) { /* USER CODE BEGIN TIM3_IRQn 0 */ /* USER CODE END TIM3_IRQn 0 */ HAL_TIM_IRQHandler(&htim3); /* USER CODE BEGIN TIM3_IRQn 1 */ HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin); /* USER CODE END TIM3_IRQn 1 */ }and running the code I expected to see blinking LED ( at least wanted no matter 1 sec or 0.5 sec )but nothing happensDid I miss something ? ( I'm learning this stuff )
At present, as of the last Hal version as far as I know, obk cannot be used in a non trust zone project.FLASH_TYPEPROGRAM_QUADWORD_OBK fails because the NS bits aren't set, among other issues.Is this by design, IE obk can't be used by non TZ, or is this just simply not a completed or fully fixed feature? Here is what I'm doingI've edited HAL_FLASHEx_Erase like#if defined (FLASH_SR_OBKERR) else if ((pEraseInit->TypeErase&~(FLASH_NON_SECURE_MASK)) == FLASH_TYPEERASE_OBK_ALT) { /* OBK erase to be done */ FLASH_OBKErase(); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(FLASH_TIMEOUT_VALUE); } #endif /* FLASH_SR_OBKERR */And my code is:int keyStorageSavePrivate(char* key) { uint32_t status; uint32_t len = strnlen(key, KEY_STORAGE_SIZE - 16); int ret = 0; static uint32_t FlashWord[4]; if (len >= KEY_STORAGE_SIZE - 16) { return 1; } len += 1; // Add string 0 HAL_FLASH_Unlock(); HAL_FLASHEx_OBK_Unlock(); if (len & 0b
Problem When i call * USBPD_PE_SVDM_RequestAttentionI get a OK message response but the callback never gets called. * USBPD_VDM_SendAttention Curious to know if there's any good way to debug this? Current debugging stepsI have a STM32G0-Disco board setup to capture the messages over USB-PD and display them with ST's USB-PD monitoring software. So i know the attention pin is not currently activating. I have a breakpoint to make sure that USBPD_PE_SVDM_RequestAttention is being called. If i wait a few seconds and then trigger it to call USBPD_PE_SVDM_RequestAttention again i get a BUSY error. So i figure it's trying to send it, it just can't? My projectI'm using this as my base with a stm32G071- nucleo board. I grab the CC lines from usb with a breakout board that passes the USB datalines through. * https://github.com/STMicroelectronics/STM32CubeG0/tree/master/Projects/STM32
Initially a comment on the How to program an STM32 with another STM32 using an embedded bootloader Knowledge Base article.Moved to the forum for better visibility & discussion.STM32G071 --> STM32F072 Hello Mr Montanari,Thanks a lot for your article.I carried out the following test with Host: STM32G071KBT6 and devices: STM32G071KBT6 or STM32F072RBT6. In both cases, I encounter a problem when reading the Flash (0x4002200); the response is NACK (STM32G071) or ACK followed by NACK (STM32F072). Could you indicate potential solutions to resolve this problem? Thank you in advance.
I am using STM32WBA5MMGH6TR in my project for sending data received from a sensor. BT is used for transmission.The data will be transmitted to a central node.This is a battery operated device. The signal chain is given below.Sensor--> ADC-->STM32WBA5MMGH6TR.Could you please review the attached schematic.
Hello, I am using the following official example as a reference:https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5x9J-DK/Applications/USBX/Ux_Host_HUB_HID_MSC I tried to use the Ux_Host_HUB_HID_MSC project on STM32U5G9J-DK2 as a base and adapt it to my application (ThreadX + USBX + TouchGFX). However, despite using this example, I am still facing compilation errors related to STM32 USB Host initialization. Main errors: _ux_hcd_stm32_initialize not declared hhcd_USB_OTG_HS not declared MX_USB_OTG_HS_HCD_Init() implicitly declared These errors occur in app_usbx_host.c, when calling ux_host_stack_initialize(). This seems to be related to a STM32 USB HCD (USB OTG HS) configuration issue or missing / non-included source files compared to the official example. Could you please advise: which STM32 USB Host source files must be included? whether a specific CubeMX configuration is required for USBX Host on STM32U5G9J-DK2? or if some parts of the official
Hi everyone,I have developed a software using mbed OS on a Nucleo-144 board (STM32F767ZI), and everything works well.Now, I am powering my board from an external power supply, and I moved the JP3 jumper to VIN position.However, the board is stuck. The program correctly starts only if:the board is connected to the PC through a USBthe reset button is pressedI read several posts, and I tried all the proposed solutions: update the ST-Link firmware, place a jumper between the NRST and 3V3 pins, also removed the SB111 0-ohm resistance between NRST and RST, but nothing works.One interesting thing I have is this: if I manage to start the program (using USB connection or reset button), powering off and on again the board in a very short amount of time make the nucleo works fine. However, if I power it off and wait a few seconds, then the board is stuck again until the reset button is pressed or USB connection provided.Any help on this?Thank you very much.
Hello everyone, my programme on Nucleo-F767ZI do not run when I power ON by external power supply. I force to press reset button or power supply st-link by usb cable.I searched some solutions such as: BOOT0 to GND; or turn on bit POR = 1 in RCC_CSR, but nothing worked. I don't want to use external circuit to reset.Anyone can share with me some useful solutions to solve this issue?
Hello, I am currently using an STM32U5G9 and would like to connect a microSD card via SDMMC1 to expand data storage. My Zephyr device tree contains the following node: &sdmmc1 { status = "okay"; pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9 &sdmmc1_d2_pc10 &sdmmc1_d3_pc11 &sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>; pinctrl-names = "default"; disk-name = "SD"; bus-width = <1>; clk-div = <8>; }; As shown above, bus-width = <1> indicates 1-bit (1-line) mode. I would like to use 4-bit mode, but after changing this value to <4>, the microSD card can no longer be accessed. How should this issue be resolved, and what additional configuration or considerations are required to enable 4-bit SDMMC operation correctly on STM32U5 with Zephyr?
Good day,I'm trying to get motor profiler running on an X-Nucleo-IHM17M1. The only compatible Nucleo board I have is a F303RE.To enable the motor profiler application, it requires the selection of 3 shunt current sensing. According to this link, it seems that both the IHM17M1 and F303RE support 3 shunt current sensing.Yet, when I try and configure the project, only single shunt is available. This is not the case for the other Nucleo boards.That said, I do receive the following warning when creating the project.Is there any solution for this, or should I use a different Nulceo board?
Hello,I am working on a project using mbedTLS and Keil MDK to make an HTTPS server running on an STM32F777. To speed up encryption/decryption, I am trying to make use of the CRYP coprocessor (mostly focusing on speeding up AES GCM calculations). My implementation is based on the example given here: https://github.com/STMicroelectronics/STM32CubeL5/tree/master/Projects/STM32L562E-DK/Applications/mbedTLS/Crypto_Selftest.However, when I try to run with my alternative AES GCM implementation, the CRYP coprocessor does not calculate the same tag as mbedTLS. This causes the SSL handshake to fail. I've attached my files for the GCM alternative implementation here. Am I missing something with the way I'm presenting my data?
Hi, I'm working with LoRa on STM32WL5MOC for a custom board and comparing performance with the dev board. I've measured RSSI and SNR at different distances. - Custom board vs Dev board RSSI, SNR values are noted for reference. How do I improve the custom board's RSSI? Are there specific design or config tweaks (like antenna matching, RF switch, etc.) to boost it? Using STM32WL5MOC reference for the custom board. Any insights would help! Thanks
Hi everyone!Just finished a dual boot system but during testing I bumped into a weird issue. With BFB2 bit unset firmware starts smoothly but when it is set, it ends up in some bootloader loop although it should switch to opposite bank (FB_MODE = 1) and run second firmware code. It looks like bootloader is waiting for update as it initialized I2Cs, CAN1 and USB.System option word for this case is 0xFB7FF8AA (nBoot0 = 1, nSWBoot0 = 0, nBoot1 = 0, BFB2 = 1). Actual Boot0 pin is connected to ground (along with quartz generator). Initial stack values of both bank firmware are within SRAM range (it is mandatory to start firmware correctly).What is most interesting, another board based on the same chip but slightly different on connected periphery works perfectly. It seems, the bootloader somehow disregards options and starts to check periphery to update but catches only noise (induced by unconnected pins or by sensor outputs) so it hangs.Is there something I missed?Regards
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.