Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi everyone,I'm new to embedded programming and trying to understand how SVC (Supervisor Call) works on ARM Cortex-M.I wrote a small program that triggers an SVC call, and in the SVC handler, I try to extract the SVC number by accessing the PC that was stacked during the exception. It works fine sometimes, but other times it causes a BusFault, seemingly at random due to printf in my statement. I changed the syscall.c script and configured the SWO.This is my code below, #include <stdint.h>#include <stdio.h>int main(){__asm volatile("SVC #0x08");printf("Returned from svc call \n");while(1);return 0;}__attribute__ ((naked)) void SVC_Handler(void) {__asm volatile("MRS R0, MSP");__asm volatile("B SVC_Handler_cl");}void SVC_Handler_cl(uint32_t *pEStack) {uint16_t* PCC = ((uint16_t*)(*(pEStack + 6))) - 1;printf("opcode := %u \n", *PCC);}Now here's the weird part:If I don't use printf() in main, things seem okay.If I do use printf() there, I often get a BusFault, pa
We are experiencing issues when using system bootloader on STM32H7 MCUs. Enter to the bootloader is correct - when BOOT0 pin is held high and reset is performed, MCU enters system bootloader. We use USB DFU for communication with bootloader and PC can recognize DFU device correctly, we can connect, perform FW update. However when trying to jump to the application the issue appears:with STM32H743 rev Y (bootloader version 0xD2) jump to application works with addresses 0x8008ACC or 0x8000123with STM32H753 rev V (bootloader version 0x90) jump to application doesn't work with any addressFrom the program counter read-out it seems that MCU is stucked in system bootloader at address 0x1FF0AAF0, however DFU device disappears from Device manager. The idea is to be able to run the application without need to perform manual reset of MCU. What could be the issue? Thank you in advance
Hello all.Personal emotional outburst (just jump it if you don't work for stm):I can't understand how it's possibile, but every single time I trust STM and go for an update, everything stops working and I have to loose hours of my life trying to fix it up.I am totally annoyed and I will never, ever, not even for money, use again stm in my projects or suggest stm to someone else. This is now starting to be ridicolous, it is the fifth time at least in the last three years that we are facing this problems with the STM cube IDE, programmer and touchGFX designer. COULD YOU PLEASE VERIFY YOUR SOFTWARE BEFORE TO POST IT???!!!?!?!?!?!?#hateyouall Issue:Coming into the issue: I have just updated to 1.18.0 and then to 1.18.1 the STM32Cube ide, and now I can succesfully dubug our product only once, then I get the error:"Could not verify ST device! Please verify that the lastest version of the GDB-server is used for the connection".and I have to reboot the PC to be able to debug once again.is
I'm using the internal temp sensor on a C011 chip *actually the STM32C0116 dev board) and trying to get an approximate reading in C, using __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS macro.I understand that this won't be very accurate, but it seems that when I use the T_CAL1 value stored in ROM the result actually gets significantly worse. Here is my code:#define VDDA_APPLI ((uint32_t) 3300) #define TEMPSENSOR_TYP_CAL1_V (( int32_t) 760) #define TEMPSENSOR_TYP_AVGSLOPE (( int32_t) 2530) #define TEMPSENSOR_CAL_VREF ((uint32_t) 3000) int32_t get_last_temp_reading(void) { uint16_t t_cal1 = *TEMPSENSOR_CAL1_ADDR; return (int32_t)__LL_ADC_CALC_TEMPERATURE_TYP_PARAMS(TEMPSENSOR_TYP_AVGSLOPE, //TEMPSENSOR_TYP_CAL1_V, t_cal1, TEMPSENSOR_CAL1_TEMP, VDDA_APPLI, raw_value, LL_ADC_RESOLUTION_12B); } My raw_value is 787. When I use the typical datasheet value of 760, I get a result of -20. If I use t_cal1 (which has a value of 1048) I get -134What is going on? OK, I don't expect m
Hello :)I'm trying to get the mentioned display expansion board working with my NULCEO board. I already downloaded the X-DISPLAY examples and found a configured ioc file for an H723 so I replicated all the settings to match my H745 one.Unfortunately the software fails already with a call to BSP_LCD_Init() -> LCD_Probe() which then tries to read the ID from the st7789v which returns something else than expected and then goes into the error handler. Also there's no datasheet for the display I don't know if the ID I'm getting is something else valid or just garbage.I've CubeMX version 6.12 but the X-DISPLAY software packs highlights it's only compatible with version 6.7 to 6.8. So maybe that's also an issue?At the moment I've absolutely no idea how to investigate this issue further. My expectations were that it's easier to setup ST hardware when they're listed as compatible.Thanks for your help in advance.
I am using the STM32H743VIT and trying to integrate using LTDC. The Display Type options in CUBEMX only allow 16 or 18 bit RGB. I know there is no LTDC_R0, so I assume that is why there is not option for 24 bit RGB; however, we were just planning on tying the LSB R value low to work around this issue. Is there any information on how to set this MCU up for 24bit RBG even though CUBEMX does not allow it? Thank youEDIT: I am using the 100 pin LQFP package
We’re working on a custom board based on the STM32U5 series. We've already developed the low-level drivers, and now we’re moving on to the firmware application layer. We’re currently evaluating RTOS options and considering FreeRTOS and Zephyr.Some questions we have regarding Zephyr:What is the current maturity level of Zephyr in terms of STM32U5 support? Is it considered stable for production use?Is Zephyr officially supported by ST?Specifically:Does ST actively contribute to the official Zephyr repository?Are STM32U5 boards and drivers maintained by ST within that repo?What is the relationship between Zephyr drivers and STM32Cube HAL?Does Zephyr reuse or wrap the STM32 HAL drivers (e.g., from STM32CubeU5)?Or does it provide a fully independent hardware abstraction layer?Our development environment is currently based on STM32CubeIDE v1.18.0, and we’ve been using CubeMX to generate initialization code.Can Zephyr be integrated into this workflow?Is there any way to use Zephyr “on top” of
Hello community, In my project requires upto 16384 points of FFT(Fast Fourier Transform) . I found out that I can’t perform this number of FFT points using arm CMSIS DSP library since it is limited to 4096 point Max. Due to this I have to use external library So I dont have any external library idea guide me to achive this on the micro-controller (STM32H745ZI).CMSIS DSP It works well up to 4098 point. I need to perform 16384 point so any library files,links , ideas or any video links could helpfull...
Hello ST Community,I am currently working on programming an STM32G070RBT6 via UART using an FTDI interface connected to my PC via USB. Initially, the STM32 CUBE programmer successfully uploads the program once, but subsequent attempts to upload fail. In order to upload the program again, I need to connect via SWD, erase the full flash using the ST-Link utility, and then I can upload the program.Here’s what I’ve verified so far:The boot pin is high.The nRESET pin is functioning as expected (goes low when pressed).When once program is uploaded it runs as expected.code:HAL_GPIO_WritePin(TEST_GPIO_Port,TEST_Pin,GPIO_PIN_SET);/* USER CODE END 2 */ /* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE */ /* USER CODE BEGIN 3 */HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_SET);HAL_Delay(500);HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET);HAL_Delay(500);}/* USER CODE END 3 */}To troubleshoot, I have tested two different hex files for a simple
Hi,I want a GPIO pin to trigger an SPI transfer. The way that I have figured this should work is:PG3 -> TIM23 -> DMA2 -> SPI1 Here is basically what I have so far:/* Includes --------------------------------------------------------------------------------------------------- */ #include "TypesDefinition.h" #include "SpiHad.h" #include <algorithm> #include <stm32h7xx_ll_spi.h> #include <stm32h7xx_ll_dma.h> #include <stm32h7xx_ll_gpio.h> #include <stm32h7xx_ll_bus.h> #include <stm32h7xx_ll_system.h> #include <stm32h7xx_ll_exti.h> #include <stm32h7xx_ll_tim.h> namespace mopf::sys { /* Static members --------------------------------------------------------------------------------------------- */ static SpiHad* g_SpiHadLocal; SpiHad* const& g_SpiHad{g_SpiHadLocal}; SpiHad::SpiHad(std::function<void()> SpiCallback, std::function<void()> EotCallback) : ISpiHad{}, m_SpiCallback{SpiCallback}, m_EotCallback{Eot
Hi currently i am using STM32H735G-DK i need to implement Azure IOT using ThreadX 1. From CubeMX i have generated Drivers for MQTT,DNS,Cloud,DHCP,mdns,sntp in the cloud files where i can update my connection strings of my cloud Configured Asset I have already created one Azure Asset I need to add those details in cloud folder I have attached file folder structure for your reference2. I referred an example in git hub https://github.com/Azure-Samples/iot-middleware-freertos-samples/tree/main/demoswhere all examples are related to WIFI3. is it possible via Ethernet connectivity instead of WIFI 4. If it is possible what will be changes we need to do so that I can connect to Azure IOT
Hi , This is the first time I am using USB on STM32F401CCU6 blackpill.I am thinking of developing stereo microphone.To start with I am USING STM32CUBEIDE for development .Selected the STM32F401CCU6 in MCU and have configured the clock to 84Mhz.In Communications , USB_OTG_FS --> selected DEVICE ONLY.In Middleware , AUDIO Class is selected.The descriptors are modified correctly and the device is detected as microphone.Have not used the AUDIO UNIT FEATURE descriptor.For now to keep it simple, I have not selected any ADC for input.To debug I have configured the GPIO PC13 as output and will toggle as per my debug purpose.The endpoint EP1 0x81 is used for the microphone data transfer to PC.The DATAOUT call back is commented since , it will not be used, have made a dummy transfer in the DATAIN callback in the file usb_audio,.c found in middleware folder. Have implemented a non blocking GPIO pin toggle every 1000ms in the datain callback.Even after the device is detected correctly , I
It has worked at times but at others is becoming all 0xFFFF or whatever values become written into unused areas.Currently it loses memory every time.My code reads a block of settings and looks at one location to check if it's zero, which indicates no 'priming' of the settings is required. If not zero the settings are primed with default values with that bit cleared to zero. All locations are written to in the block, zero if not used. They are uint64_t values. Changes to settings all include that bit as zero, so the priming won't occur again. But on each startup that location is above zero.I've tried adding __NOP() lines and delays immediately after writing also.While the device is operating the settings are saved, but at power down they become overwritten. The flash writing code isvoid WriteSettings(void){HAL_FLASH_Unlock(); FirstPage = GetPage(FLASH_USER_START_ADDR); NbOfPages = GetPage(FLASH_USER_END_ADDR) - FirstPage + 1; /* Get the number of
Hello every one .this is my first post so excuse me if i do something wrong.I try to establish Uart Asynchronous line between two stm32f303k8 .one of them use basic timer to send 8 byte uint buffer every 200 mili-sec and the other use HAL_UART_Receive_IT first in the "/* USER CODE BEGIN 2 */"and circularly recall it again in HAL_UART_RxCpltCallback.So my problem is that after the first reception i get overrun error and when i enable overrun in the CubeMX i see that after the first reception the first byte are the last byte of the previous message and all other bytes are shifted right .**I attached image of my UART configuration (same for both of them)Sender variables :uint8_t m_tx_buffer[8] = {0}; uint8_t flag = 0; Sender while(1): if (flag == 1) { flag = 0; HAL_UART_Transmit_IT(&huart1, m_tx_buffer, sizeof(m_tx_buffer)); m_tx_buffer[5] ++; } Receiver variables : volatile uint8_t s_rx_buffer[8] = {0}; uint8_t s_tx_buffer[8] = {0}; u
Hi,when building the Doxygen documentation locally, numerous warnings appear. Especially, errors like this:stm32g4xx_hal_driver/Inc/stm32g4xx_ll_lptim.h:605: warning: Found unknown command '@rmtoll' stm32g4xx_hal_driver/Inc/stm32g4xx_ll_lptim.h:601: warning: found documented return type for LL_LPTIM_ConfigOutput that does not return anything stm32g4xx_hal_driver/Inc/stm32g4xx_hal.h:431: warning: unable to resolve reference to 'SYSCFG_FASTMODEPLUS_PB8' for \ref command Is there a Doxygen configuration for HAL?What needs to be changed/added in the Doxygen default settings? ThanksThomas
I am looking at the definition ST gives for each of the Xfer options, but so far none of them really are making sense to me. First off, what is Sequential usage vs non-sequential usage and how does this apply for the following:I2C_FIRST_AND_LAST_FRAMEI2C_FIRST_FRAMEI2C_FIRST_AND_NEXT_FRAMEI2C_NEXT_FRAMEI2C_LAST_FRAMEI2C_LAST_FRAME_NO_STOPI2C_OTHER_FRAME
Hi everyone, I am trying to use the m5 stack hall sensor to measure the speed and distance that an athlete is going. I want to attach the hall sensor to the drum of the machine and measure it. I am having some trouble with getting zero values even when I move the magnet. The source code I found was arduino but I changed it for it to work on the STM32IDE. I am using TIM4 for my timers and PB7 to read in the digital values, also it is good to mention that i have the PB7 as a GPIO EXTI. Can anyone look at the code and see if something is wrong? /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software
I am working on a project using the STM32U5G9ZJT6Q MCU, where I am trying to receive data from an 8-bit DCMI interface using GPDMA in circular mode or normal mode. The data is being captured from an 8-bit parallel bus, and I am using GPDMA to transfer this data into memory. However, I am facing issues with the DMA interrupt not triggering and the data not being received properly.I have configured the DMA in circular mode and linked it to the DCMI, but it seems that the DMA transfer is not functioning as expected. I’ve tried various configurations, but I am still unable to get it working.If anyone has worked on a similar setup using the STM32U5G9ZJT6Q and has successfully received data from DCMI using GPDMA in circular mode or normal, I would greatly appreciate it if you could share your code or any insights on how to properly configure and troubleshoot this.
Hi,I am trying to use SAI instead of I2S6 since the BDMA seems to not trigger even after proper configuration.I am using SAI for the first time so I am completely unsure about this config: /** * @brief SAI1 Initialization Function * @PAram None * @retval None */ static void MX_SAI1_Init(void) { /* USER CODE BEGIN SAI1_Init 0 */ /* USER CODE END SAI1_Init 0 */ /* USER CODE BEGIN SAI1_Init 1 */ /* USER CODE END SAI1_Init 1 */ hsai_BlockA1.Instance = SAI1_Block_A; hsai_BlockA1.Init.AudioMode = SAI_MODEMASTER_TX; hsai_BlockA1.Init.Synchro = SAI_ASYNCHRONOUS; hsai_BlockA1.Init.OutputDrive = SAI_OUTPUTDRIVE_DISABLE; hsai_BlockA1.Init.NoDivider = SAI_MASTERDIVIDER_ENABLE; hsai_BlockA1.Init.FIFOThreshold = SAI_FIFOTHRESHOLD_1QF; hsai_BlockA1.Init.AudioFrequency = SAI_AUDIO_FREQUENCY_22K; hsai_BlockA1.Init.SynchroExt = SAI_SYNCEXT_DISABLE; hsai_BlockA1.Init.MonoStereoMode = SAI_STEREOMODE; hsai_BlockA1.Init.CompandingMode = SAI_NOCOMPANDING; hsai_BlockA1.Init.TriStat
Hello,I am working with the STM32-Nucleo-H7S3L8 board.I am using the template project from the repository, which includes the Boot project, Appli project, and the External Memory Loader project.The clock was configured in the Boot project.I want to change the clock prescalers from within the Appli project, but I can't manage to do it.After I added code to update the clock, nothing happened—I verified this by checking the RCC registers.My question is: why can't I change the clock configuration from the Appli project?
"I followed along with this video, but I have some questions. How can I correctly retrieve the ADC array values via UART communication? And why is the UART value coming out as garbage in this video?"https://www.youtube.com/watch?v=_hX6pN2jgYMhttps://rristm.github.io/tomas_materials_v2/RRISTM/stm32u5_workshop/master/2_gpdma_handson_list_mode_mx.md/17 I think it's a clock issue. How can I fix this?
Moved from Feedback forum - the Feedback forum is just for questions about the forum itself. Hello, I have a problem with the Ux_DEVICE_HID_CDC_ACM example for the B_U585I-IOT02A. Basically, i cannot transmit anything due to an error with the initialization of the variable current_flags in the file tx_event_flags_get.c . what happens is that when you try and get the value of current_flags = group_ptr -> tx_event_flags_group_current, the value is always 0 and is never updated during the communication killing the transmission. Has this ever happened to anyone? how can i solve it? Thanks
I have purchased STM32H757I-EVL board for working. I have not found SDK for this board. But as one of site suggest downloading STM32CubeH7 package, I did same. In this package I couldn't find example project for STM32H757I-EVL board.So, I have start working with STM32H743I-EVL example code and compile Thread Creation example. Now I am flashing generated .elf file to STM32H757I-EVL board but this application is not working, and LED is not blinking. I have soldered resistor for LED that is only change on board. I have checked schematic for both board and found it is pin compatible. Now I am stuck to go further. Please anyone found this type of issue or help on this. Meanwhile I will try further and debug issue.Example code path is STM32CubeH7\Projects\STM32H743I-EVAL\Applications\FreeRTOS\FreeRTOS_ThreadCreation\STM32CubeIDE.
Hi, I am using the STM32H7A3 board to implement the virtual serial port function for USB, and I want to use FS mode. However, there is no macro definition related to FS mode in STM32H7a3xx. h. Do I need to manually add it? And I checked the demo in the development package, but there is no demo of H7A3 regarding the virtual serial port. Can you provide it? Currently, I am referring to the USB virtual serial port demo of stm32H743l for porting, following the HS mode, but the computer does not recognize the USB interface.
My project:https://easyupload.io/m/aqdlx7 Hello, I created a proprietary board with stm32H757IITx. Unfortunately, I have problems with data transfer between M4 and M7.... I am using SRAM4, configured MPU and used github project:GitHub - adailtonjn68/STM32H7xx_inter-core_data_share Unfortunately, but I have a problem all the time in the M7 to upload the data that the M4 is supposed to receive.... When I debug the M4 it works without a problem and the data is placed correctly.The problem always arises here, the code falls into hard fault: int put_to_m4(const int *const restrict buffer, const unsigned int size) { /* Try and get lock */ if (atomic_flag_test_and_set(&shared_data.lock1)) <----- here i have HARD_FAULT { /* Return -1 in case lock is not acquired (used by other core)*/ return -1; } I tried a clean project with open AMP but it also does not work, I have status = -2005 in M4 in this line: /* Create an endpoint for rmpsg communication */. status = OPENAMP_create_endpoint(
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.