Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I try to do the motor drive using a B-G431B-ESC1 board.When I connect the board, the following warning appeared.[WARNING] - MotorControlRegistersBank: Accessing register [7449] RESISTOR_OFFSET resulted in error[5] . Changing register's access accordingly to avoid getting this error againThe software version is V6.4.0.I could obtain the electrical and mechanical models by clicking "start profile" after the motor connected to the motor driver rotated.But, in the "register" tab, the status of register [7449] is "error".Could you please tell me how to solve this error?Thanks.
Hello,I generated code using STM32CubeMX for the STM32N657x0 MCU. I selected only the secure region and added a simple UART operation for testing purposes. In CubeMX, I selected only the Application (not the FSBL or External Memory Loader ), and generated the project for Keil.Now, my question is:Can I directly load the code into the board using Keil, or is it mandatory to use the FSBL or an external memory loader?I noticed that all official STM32N6 examples include an FSBL. I haven't seen an example that runs with just the application alone. So I would like to confirm this with you to ensure I don't risk damaging or misconfiguring the board.For reference i attached the .ioc file .Thank you again for your support.
Greetings,I have acquired Nucleo-U031R8 as I was searching for ULP controllers and specification of this one was good. I am currently trying to lower current consumption as low as possible. Previously, I have used Nucleo-L073RZ where I was able to achieve approx. 300uA in low power run mode and 150uA in sleep mode. I was hoping to get much lower current consumption using U0 series processor but it seems like it is consuming more power then L0 series. Note that in both controller program and other peripheral configurations are same. Can someone please suggest why it is happing and what can I do about it? Thank you so much for the help. @KDJEM.1 @LPetr.1 @TDK /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics.
I have an STM32H735 Discovery Kit and am running the example LWIP code from STM32H7-LwIP-Examples/STM32H735_Disco_ETH. This works great. But, when I add MDNS, I get a very curious crash.I enabled MDNS in CubeMX, and then created a new thread to wait for an address to be assigned by DHCP before initializing MDNS:void mdns_thread(void *argument) { mdns_resp_init(); while(!dhcp_supplied_address(&gnetif)) { vTaskDelay(1000/ portTICK_PERIOD_MS); } LOCK_TCPIP_CORE(); mdns_resp_add_netif(&gnetif, "scion", 60); /* mdns_resp_add_service(&gnetif, "_scion", "_scion", DNSSD_PROTO_UDP, 9000, 3600, srv_txt, NULL); mdns_resp_announce(&gnetif); */ UNLOCK_TCPIP_CORE(); while (1) { vTaskDelay(500/ portTICK_PERIOD_MS); } } With the thread created as: osThreadAttr_t attributes; memset(&attributes, 0x0, sizeof(osThreadAttr_t)); attributes.name = "MDNS"; attributes.stack_size = 512; attributes.priority = osPriorityNormal; osThreadNew(mdns_thread, &gnet
HiI'm having troubles programming the stm32h755zit6 on my selfmade PCB. The schematics should be right, as i am able to programm the STM32. But if i run a simple code inwhich a certain pin should be pulled up high, it just won't work. Therefore I thought about debugging the code to see whether it reaches the part inwhich the GPIO-function is called. But instead it doesnt and ends up in a error_handler. Afterwards i somehow am not able to reprogramm the STM32H755 anymore as the message following message appears:stmicroelectronics st-link gdb server. version 7.10.0 copyright (c) 2025, stmicroelectronics. all rights reserved. starting server with the following options: persistent mode : disabled logging level : 1 listen port number : 61234 status refresh delay : 15s verbose mode : disabled swd debug : enabled initwhile : enabled target no device found error in initializing st-link device. reason: no device found on target.I have no done this over and over again three time an i always had
Problem DescriptionI am having some trouble using HAL_UART_Receive_IT() to receive UART data in interrupt mode, the callback HAL_UART_RxCpltCallback() only triggers once for the first byte, subsequent bytes do not trigger the interrupt. I don't know if there is some problem with my implementation or if the problem is in STM32CubeH5 (v1.5.0). I would really appreciate some help!SymptomsHAL_UART_RxCpltCallback() executes correctly for the first received byte.Calling HAL_UART_Receive_IT() again does not fix the issue.No further interrupts are generated, even though UART data is arriving.Root Cause?I did some digging and found the UART interrupt handler (UART_RxISR_8BIT) clears the RxISR function pointer (huart->RxISR = NULL) after processing the first byte. This prevents the interrupt from being handled correctly again, even if HAL_UART_Receive_IT() is called again.Workaround: Manually Restore huart->RxISRTo workaround this, I added one line to manually reassign huart->
I am trying to switch the USB to DisplayPort mode via the PD (Power Delivery) line. I have a custom board based on the STM32G0B1CBT6, and another board based on the RTD2556, which works well for switching. I am sniffing PD communication using the LA1016 logic analyzer, and I have successfully been able to repeat all responses connected to perform the switching mode, except for sending SOP from the device to the host. All the necessary logic is implemented in the usbpd_vdm_user.c file, in the callbacks function. In the main thread, I have osDelay(2000); /* Update DP Status first */ sDP_Status[0].d.HPDState = 1; // Set HPD state sDP_Status[0].d.Enable = 1; // Set enabled /* Request attention - this will trigger message send */ USBPD_DPM_RequestDisplayPortStatus(0, USBPD_SOPTYPE_SOP, 0xFF01U, &sDP_Status[0].d32);But nothing in the log happining. Like it whaiting for something. I'm tring to send2.5380323000,Preamble2.5382400500,SOP,,2.5383050000,Header,0x2E8F,DataObject
hi, community!I need to use SDIO integrated into Stm32f407VET6 BlackBoard I followed two videos on youtube and always gave me the same problem res=f_mount(&fs,"",1); always gives me FR_NOT_READY I asked Gemini and he told me to change it to res=f_mount(&fs,"",0); when I change it the function return FR_OK but the rest of the functions not work like f_write f_read are return FR_NOT_READYI found someone in stack overflow has the same problem but without solutionI hope you can help me videos I followed : STM32F4 Discovery board - Keil 5 IDE with CubeMX: Tutorial 22 SD Card SDIO 4 Bits + DMA - YouTubeSD card using SDIO in STM32 || Uart RIng buffer || 4-Bit Mode || CubeMx - YouTubestack overflow question:stm32 - SD card issue in SDIO peripheral in Stm32f407VET6 Black Board - Stack Overflowthank you
This board has slots on either side of the phase connections to the motor. Does anybody know where i can get an edge connector that fits the board?
Hello!I am using STM32F427VIT6 and OV5640 camera to stream MJPEG to a webserver. I used DCMI DMA to get a jpeg_frame, size around 10KB to 25KB per image, with almost 30FPS and send it to jpeg buffer in CCMRAM like this.__attribute__((section(".ccmram"))) __attribute__((aligned(32))) uint8_t jpeg[32768]; __attribute__((section(".ccmram"))) __attribute__((aligned(32))) uint32_t jpegLength = 0; Then I used LwIP with raw TCP, tcp_write() function to send it to webserver but it's very laggy, sometimes return ERR_MEM in this functionLWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr;Although I spent nearly 100% of my RAM allocating for LwIP heap memory and SND buffer. Here is my LwIP mem config/*----- Default Value for MEMP_NUM_TCP_PCB: 5 ---*/ #define MEMP_NUM_TCP_PCB 1 /*----- Value in opt.h for NO_SYS: 0 -----*/ #define NO_SYS 1 /*----- Value in opt.h for SYS_LIGHTWEIGHT_PROT: 1 -----*/
Can the STM32F469I-DISCO support reading/writing a FLASH Drive on its UTB-OTG interface ?What software does it need for this ? (Pardon my ignorance - I'm a Hardware guy!).
I'm using STM32 with HAL and LL drivers (H7 and G4 families, in particular, but I think this can be a general question) and I trying to avoid being forced in recursive faults when reading a flash location with broken ECC. In my application it may happen to try to read a broken flash location.In TrapHandler I'm able to intercept the error, report it to flash driver, clear error flags, and avoid any reset.However, when returning from TrapHandler, I'll fall back on the same flash instruction which generated the fault, which will try to read the same location again, and so another fault will be generated in loop.Is there a way to continue with the execution in a portable way after encountering this fault? For a deeper understanding, this is one of the specific use case in which I would need the above behavior:When in bootloader, before jumping to application, I calculate the CRC of application flash, compare it with the one stored to another flash location, and jump to applicatio
Hi,I'm using the STM32H743, with TLV320AIC3254 audio codec to send and receive audio using the SAI peripheral in I2S mode, 16 bits (extended mode, i.e 32 bit slot), master, stereo.I'm using DMA to send/receive the data, but have come across an issue where the data transmitted by the SAI seems to have the left and right data swapped. As I understand, the even samples in my buffer should be for the left channel, and the odd samples for the right channel.As a test, I have written specific values (0x0033 , 0x0088) to the first to the first two int_16 of the output buffer. And I expect to see the first sample output with FS low, then then next with FS high. However checking the data output with a logic analyzer, shows that 1. There is an initial sample that is 0, which is not in the output buffer. 2. The left and right data are swapped.I've tried changing the FS polarity, which will fix the transmitted samples, but then the received samples are swapped.I guess it could be
I'm about to program a continously running DMA stream (using GPDMA1 (circularly)) in an STM32H503CBU6. But the start already fails. during the setup of the i2s->hdmatx pointer is zero causing the crash when it wants to get initialized.I'm in need of a running example with an I2S device configured with a continously running DMA write streamwith a length of 1 (32 word) to the I2S device. Help urgently needed, please.int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_GPDMA1_Init(); MX_ICACHE_Init(); MX_I2C1_Init(); MX_I2S2_Init(); MX_TIM1_Init
Hello everyone,I am looking for a solution for a CustomHID device on a STM32C071.I would like to implement a CustomHID device, with TreadX and USBX.Unfortunately I can only find examples for mice in the templates. It is a bit difficult to deduce a CustomHID from these.The tutorials I have looked at so far have not helped me either.I already have experience with the “old” USB_Device library (also CustomHID) from STM in conjunction with FreeRTOS.On the STM32C071 I already got TreadX to work, but when I try to implement CustomHID, nothing works anymore.Unfortunately I can't find any information on what to look out for when implementing a CustomHID on an STM.Does anyone have any idea where I can find information on this problem?A tutorial would be great, but I haven't found one yet.Greetings Greg
Hello at allTo do this, I use STM32CubeIDE and STMCubeMX to configure my I/O interfaces and serial buses, including two SPI buses to control my converters.Only the hardware configuration of an SPI bus is limited to between 8 and 16 data buses, whereas my converters operate with between 24 and 32 bits of data...However, in hardware SPI, my sync (CS) goes back after an 8- to 16-bit frame, whereas I need it to remain at 0 to meet the TI requirement.So I tried to manage the sync pin in IO mode, but it still goes back...I tried using DMA, but the CS signal delay I'm managing is too long before the start of my frame and ends long after it; I must be at about sixty microseconds, too long.Note that I'm running my MCU at 24 MHz and I want to be able to retrieve my converted data in about 10 µS.Currently, I'm using SPI bit bang, or I've configured my SPI port as IO, and I'm retrieving my values in 212 µS, which is too long...So, should I try assembler?...Do you have any advice on this? A recom
Hi, I would like to know where to write the code either in secure or non-secure folder. What is the exact purpose of this folders. I want to encrypt a CAN message and send it. I have done without enabling trust zones previously. But now I enabled the trust zone and would like to write CAN drivers, encryption key change etc. I am using NUCLEO-H533RE boards for development. Please let me know. There are examples problems but did not actually had these two folders. Thanks in advance.
Hello,I am just trying to compile the example project GPIO_IOToogle_FSBL by using the STM32CubeIDE and firmware with its patch STM32Cube_FW_N6_V1.1.0.zip (i.e., en.stm32cuben6-v1-1-1 (patch).zip) and after following the instructions per "UM3249 - User Manual - Getting started with STM32CubeN6 for STM32N6 series" when I attempt to compile I started getting these errors: 08:42:09 **** Incremental Build of configuration Debug for project GPIO_IOToggle_FSBL ****make -j16 allarm-none-eabi-gcc "D:/ST/SW/STM32Cube_FW_N6_V1.1.0/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_hal.c" -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32N657xx -c -I../../../FSBL/Inc -I../../../../../../../../Drivers/STM32N6xx_HAL_Driver/Inc -I../../../../../../../../Drivers/CMSIS/Device/ST/STM32N6xx/Include -I../../../../../../../../Drivers/STM32N6xx_HAL_Driver/Inc/Legacy -I../../../../../../../../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -mcmse -MMD -MP
I am encountering the FR_NOT_READY and FR_INVALID_OBJECT error when trying to mount the SD card and write a file in RVT101HVSFWCA0 Riverdi display. Could you please advise on how to resolve these issues?
Hello,I am having some trouble attempting to use the OEMuRoT tools/scripts to sign and encrypt my custom application built with CMake/Ninja. Application was generated using CubeMX and CMake project type was selected. Windows 11, STM32CubeProgrammer v2.19.0, though I am using Git Bash to run the scripts as I notice that e.g. there is a postbuild.sh but no postbuild.bat. I am using the -DK Discovery Kit eval board.I copied C:\Users\myuser\STM32Cube\Repository\STM32Cube_FW_N6_V1.1.1\Projects\STM32N6570-DK\Applications\ROT\OEMuROT_Appli\STM32CubeIDE\postbuild.sh into my application folder.I modified env.sh so that the oemurot_appli_path_project uses a relative path to my application folder: oemurot_boot_path_project=Applications/ROT/OEMuROT_Boot oemurot_appli_path_project=../../../../../../_hmnhwi/customer/my_customer/this_project/workspace/my_applicationThen I modified the postbuild.sh script in my application so that the path to the provisioning directory is correct, with relat
I am dealing with an I2C lockup issue where the I2C bus is locked up periodically and I need to toggle the SCL pin to free up the bus. To test my theory and make sure that the fix works I just used an osDelay(1) call. I know this is a 1ms delay but it was enough to prove that if I do that it fixes my problem. However, there is no reason to take up an entire 20 ms to complete this operation (from what I've read it's recommended to toggle 10 times to reliably unlock the bus) when 20us is enough. How would I implement a 1us delay function or is there one already available to use?
Good day,I have stumbled upon an issue with my device's bootloader that seems to be inconsistent with the ST documentation. I have an STM32G031K8T6. USART1 RX and TX are connected to an RS-232 transceiver, which is then connected to my host PC using a USB-to-RS232 cable:[STM32G03x USART1] <----> [RS232 tranceiver (MAX3232 equivalent)] <---> [FTDI RS-232 USB cable] <---> [Host PC]I would like to use the bootloader to upload firmware to the device, over this UART link. Normally, this works just fine. However, I have observed that the bootloader will not respond if it receives invalid data before receiving the valid 0xF7. To reproduce "good" behavior:Create an empty boardApply BOOT0, and power on (bootloader mode).Connect to the COM port using TeraTerm, or some other serial terminal (57600, 8 bit, even parity, 1 stop bit)Don't send any dataDisconnect from TeraTermAttempt to connect to board using Stm32CubeProgrammer (UART, 57600, 8 bit, even parity, 1 stop bit)Conne
Hi team,I am using example code GPIO_IOToggle. which is working fine.1. Tried to use below changes in .ld file as below and that also works fine when we dump code form STMCubeIDE.MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 114K }2. Then tried same with STMCubeProgrammer tool by dumping this binary at 0x8005000 address and run. Here it just keep the LED ON continuously. No toggle done.MEMORY { RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K FLASH (rx) : ORIGIN = 0x8005000, LENGTH = 114K } Here is the full .ld file for more reference/* ****************************************************************************** ** ** @file : LinkerScript.ld ** ** @author : Auto-generated by STM32CubeIDE ** ** @brief : Linker script for STM32U083RCTx Device from STM32U0 series ** 256KBytes FLASH ** 32KBytes RAM ** ** Set heap size, stack size and stack location according ** to application requirements. ** ** Set memory bank area and size i
Greetings, I am using a Discovery Kit (B-U585I-IOT02A) and I want to use the LPTIM1 to wait 5 seconds (counting x ticks), at the end of the 5 seconds enter in a Callback to do something and then restart the counter again.I want to use as clock source the 32.768Khz crystal (LSE). So, I configured the LSE clock in the RCC section of the .ioc, then I set the LSE as clock source for LPTIM1, and activated the interrupts. At the main function, I used the HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 16383) and used the void HAL_LPTIM_AutoReloadMatchCallback (LPTIM_HandleTypeDef* hlptim) callback to do something. The callback is not being called, I measured the signal at the crystal, and I can't see any clock in it. I guess something's missing in the configuration but I have no clue what it is and I can't make it work. An helping hand would be appreciated.
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.