Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello ST team,I am experiencing an issue when trying to access the bootloader via UART on the STM32G070CBT6 and STM32L4R5ZI microcontrollers. When I set BOOT0 = 1, the bootloader works correctly via DFU (USB), but no response is received from the UART interface.Tests Performed:Bootloader Activation via Hardware (BOOT0 = 1):When I set BOOT0 = 1 and reset the microcontroller, it successfully enters DFU mode, and it is recognized by STM32CubeProgrammer via USB.However, none of the UART interfaces respond to the 0x7F (Get) command.Testing Different UART Interfaces:I tested USART1, USART2, and USART3 on both microcontrollers.None of the UART ports respond to the bootloader protocol.Important: I verified the UART communication using an Arduino as a USB-UART converter and a custom software to send and receive data via UART. The UART communication works correctly in this scenario, confirming that the microcontroller's hardware and serial connection are operational.Reading Bootloader Registers:
Hi everyone,I’m currently working on an STM32F767ZI Nucleo board and trying to configure the Ethernet middleware. I’m new to STM32 Ethernet and LWIP, so I’d appreciate some guidance.Here’s what I’m looking for help with:Ethernet Middleware Configuration:How to properly set up the Ethernet middleware using STM32CubeMX.Steps or tips to enable and configure LWIP for basic functionality.Best practices for initializing the MAC and PHY layers.RCC and Clock Settings:What are the correct RCC configurations for the STM32F767ZI to ensure Ethernet works properly?Any specific settings for the HSE, PLL, or system clock frequency that I need to pay attention to?I’ve already started with STM32CubeMX and enabled the Ethernet peripheral, but I’m not sure if I’ve configured the clocks and middleware correctly. If anyone has a working example or detailed guidance, that would be incredibly helpful!Thanks in advance for your help
I am using stm32h743zitx nucleo board and thermal camera ,but in nucleo board stm32h743zitx internal temperature came 32 to 35 degree but same code i am using thermal camera than stm32h743zitx internal temperature came 123 and going above degree why i upload my code below please give me sollution where is my problem .i am using both 400 Mhz clock ....float temperature; uint32_t temperature_1 = 0; uint32_t adcValue = 0; uint32_t vrefint = 0; uint32_t temp_sensor = 0; float vrefint_volts; float temperature_celsius; 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(); MX_ADC3_Init(); while (1) { temperature = Get_Temperature(&vrefint_volts, &temperature_celsius); // Use t
I AM USING A STM32H743ZIT6 CONTROLLER IN THERMAL CAMERA BUT I READ A INTERNAL TEMPERATURE 138 CELCIUS BUT IN NUCLEO BOARD INTERNAL TEMPERATURE CAME 35 TO 40 CELCIUS (I AM USING 400 MHZ BOTH NUCLEO BOARD AND THERMAL CAMERA) SO WHY IT CAME IN THERMAL CAMERA INTERNAL TEMPERATURE IS A 138 CELCIUS SO I AM GIVEN A MY CODE BELOW ,SO CAN YOU GIVE ME SOLUTION HOW TO MAINTAIN CURRECT TEMPERATURE OF STM32H743ZIT6 MAIN.C int main(void) { HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_ADC2_Init(); MX_ADC3_Init(); MX_USART3_UART_Init(); while (1) temperature = Get_Temperature(); HAL_Delay(100); } } float Get_Temperature(void) { HAL_ADCEx_Calibration_Start(&hadc3, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED); // Start ADC conversion HAL_Delay(100); HAL_ADC_Start(&hadc3); HAL_ADC_PollForConversion(&hadc3, HAL_MAX_DELAY); adcValue = HAL_ADC_GetValue(&hadc3); HAL_ADC_Stop(&hadc3); // // Read calibration values cal1 = *TEMPSENSOR_CAL1_ADDR; ca
Hello,Why is there a limitation to the maximum Disk space in FileX? 256K is too small. I would like to allocate 64Mbytes.
STM32F405 I'm trying to use this model, but the IDE I'm using doesn't have it, so I'm trying to download it, but I'm not sure exactly where to download it or what files to download. I need to download a driver, but I don't know which file and which page to download. Please help
ive been trying to use the two option bytes available for the user. but i have not been able to get it to Write to them i code. editing the bytes via cubeProgrmmer then reading them with the following: uint8_t userByte0 = HAL_FLASHEx_OBGetUserData(OB_DATA_ADDRESS_DATA0); uint8_t userByte1 = HAL_FLASHEx_OBGetUserData(OB_DATA_ADDRESS_DATA1); That works as expected. But trying to write to them does not work. FLASH_OBProgramInitTypeDef obConfig; HAL_FLASHEx_OBGetConfig(&obConfig); obConfig.OptionType = OPTIONBYTE_USER; // Specify we are modifying user option bytes obConfig.USERType = OB_USER_DATA0; // Select User Data Byte 0 obConfig.USERConfig = 0x55; // Set the value (change as needed) HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); HAL_FLASHEx_OBProgram(&obConfig); HAL_FLASH_OB_Launch(); I tired to check the bytes via cubeProgrammer but does not seem to be present.
Hello, I am having trouble releasing a semaphore on the STM32H745I-DISCO. The context is as follows: I need to capture a breakline on UART2. When the interrupt triggers, I need to read a character and, depending on the received character, either send characters back or do nothing. To avoid executing the handling code inside the interrupt, I have placed it inside a task with an osSemaphoreWait. My idea is that when the breakline interrupt occurs, the osSemaphoreRelease line should be executed, releasing the semaphore and running the code that manages UART communication. main.c int main(void){ osSemaphoreDef(LIN_breakSem); LIN_breakSem = osSemaphoreCreate(osSemaphore(LIN_breakSem), 1); osSemaphoreWait(LIN_breakSem, osWaitForever);//here decrements de counter to 0 osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 512); defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL); osThreadDef(LIN_breakTask, LIN_break_fn, osPriorityNormal, 0, 51
Hi, I was hoping to evaluate ethernet connection of my nucleo H755ZI-Q board. It turns out to be more challenging than I initially though. I have tried to follow this example: https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308#memory-layout I would like to get minimum respond to ping, but so far I have not been able to get it work as example is for H745 and older versions of software. I'm using STM32CubeIDE 1.17.0, STM32CubeMX 6.13.0 Green led of ethernet connector is on and orange is blinking, but that is all. Are there any example software for my nucleo board, which I could get work directly?
Hello,on the NUCLEO-H723ZG I would like to initiate a DMA transfer (Memory to GPIO ODR) on every 300 ADC EOC events. I have a DMA channel set up for the ADC (DMA1 CH0) and a DMA channel for writing the ODR of a GPIO. Since a single request generator can only count up to 32 events before issuing a request, I would like to chain two request generators where request generator 0 requests are fed into request generator 1. If I only use a single request generator everything works out fine (up to 32 requests of course). This is the code I used to setup the DMAMUX: LL_DMAMUX_SetRequestSignalID(DMAMUX1, LL_DMAMUX_REQ_GEN_0, LL_DMAMUX1_REQ_GEN_DMAMUX1_CH0_EVT); // DMA1CH0 EVT as input to REQ_GEN0 LL_DMAMUX_SetRequestGenPolarity(DMAMUX1, LL_DMAMUX_REQ_GEN_0, LL_DMAMUX_REQ_GEN_POL_RISING); // request generation on rising edge of DMA1CH0 EVT LL_DMAMUX_SetGenRequestNb(DMAMUX1, LL_DMAMUX_REQ_GEN_0, 1); // 1 DMA Request by REQ_GEN0 LL_DMAMUX_SetSyncRequestNb(DMAMUX1, LL_DMAMUX_CHANNEL
Hello,Does anyone know how to link the sdcard_detect gpio pin in cubemx? If the card is not inserted after power up, the system doesn't come up because MX_SDMMC1_SD_Init(); fails.I looked at: https://community.st.com/t5/stm32-mcus-embedded-software/understand-sd-card-detect-pin-initialization/td-p/758978but I'm using AzRTOS, and I can't set the option in FatFS, and can't find the option in FileX. Can someone point me in the right direction?thanksMatthew
Hello everyone,I'm trying to interface a microSD card using FileX on a custom board with an STM32H747IIT6.The microSD card is connected to the SDMMC1 peripheral using a 4-bit wide bus, with external pull-ups on the data lines.Initially, we used FATFS to interface with the microSD card, which worked flawlessly. Now, as we transition to Azure, we want to use FileX. Additionally, we are using NetXDuo to create a web server, with the SD card serving as storage for web server files.The issue occurs when calling fx_media_open (app_netxduo.c, line 522), which almost always returns error code 0x90 (except for a single successful attempt going step by step via the debugger).Current Configuration:SDMMC1 pin speed: mediumSDMMC1 peripheral clock: 40 MHz, scaled down to 10 MHz using a divider (set to 4)SD card: SanDisk 64GB, formatted in exFAT (exFAT support is enabled)Troubleshooting Steps Taken:Adjusted clock speed via divider (1–40 MHz)Changed pin speed (medium, high, very high)Tested different
Hi.I'm using a STM32U5A5 MCU to communicate with a FLASH device through OCTOSPI.Flash is connected to port P1, and all signals are controlled by OCTOSPIM / OCTOSPI1 MCU hardware.I'm sending command "0x06" = WRITE_ENABLE, and after that I need to check that bit "WEL" (Write Enable Latch) is set in STATUS register. Nothing exotic here, just regular FLASH operations.Reading device status register is performed by sending command "0x0F" = GET_FEATURES with 8-bit address 0xC0 = "STATUS". Device will ouput STATUS value on the next 8 clocks.What I see is that function HAL_OSPI_AutoPolling() seems to be reading 1 extra byte :The first 06 command is my WRITE_ENABLE command on 8 clocks.The next 0F C0 command is isssued by polling. Note the 2 bytes "02 02" in output. Polling stops immediately because condition is met. Total is 32 clocks, while it should be 24 clocks only.If I don't use HAL_OSPI_AutoPolling() but HAL_OSPI_Receive() to manually read once the STATUS register, I have the expected sign
Hello ST, I'm trying to display the uart data on stm32f429i(MB1046) eval board GUI, followed below link as https://controllerstech.com/touchgfx-5-data-from-uart-to-ui/, void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size) { RxData[Size] = '\0'; if (osMessageQueueGetSpace(uartQueueHandle)>0) { strncpy (uartData_q->Data, (char *)RxData, Size+1); uartData_q->size = Size+1; osMessageQueuePut(uartQueueHandle, &uartData_q, 0, 0); HAL_UART_Transmit(&huart1, uartData_q->Data,uartData_q->size , 1000); } HAL_UARTEx_ReceiveToIdle_IT(&huart1, RxData, 256); } void StartDefaultTask(void *argument) { /* USER CODE BEGIN 5 */ HAL_UARTEx_ReceiveToIdle_IT(&huart1, RxData, 256); /* Infinite loop */ for(;;) { osDelay(1000); } /* USER CODE END 5 */ } This code added in main.c but uart receive interrupt is not working. could you please help me to develop. Thanks& Regards, PSR.
Hello everyone,I'm experiencing an issue integrating the FP-AUD-AEC1 v1.2.0 library into my U5 microcontroller project and would appreciate some guidance on the echo cancellation algorithm's behavior.My Setup:Audio Input: 1 MEMS microphone acquiring data at 8 kHz.Audio Output: Audio streaming data received via CAN FD and played through a speaker.Data Handling: DMA is used for both audio reception and playback.The Issue: In my processAudioData function, I observed that the algorithm (specifically, the AcousticEC_Data_Input function) buffers data until it accumulates 128 bytes (with ECHO_BUFF set to 128). My expectation was that the algorithm would fill my output buffer with 8 bytes every 1 ms based on the 8 kHz sample rate—not in 128-byte (approximately 16 ms) segments.Currently, the behavior appears as follows:Initial Phase: The EchoOut buffer starts with zeros.Processing: The algorithm alternates between zeros and echo-cancelled values until the 320-byte output buffer is fully populat
Hello, I am working on the STM32L476RG MCU, where I first measure the angle using the atan2 function and then convert this measured angle into UVW signals. As we know, UVW signals are digital in nature, switching high/low based on conditions specified in the code. For this, I used digital pins 8, 9, and 10 as GPIO output pins. However, I observed that pins 9 and 10 provide the expected output, but pin 8 remains constantly high. Why is this happening? I am sharing my code with you—please check it once /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE END PM */ /* Private variables ---------------------------------------------------------*/ ADC_HandleTypeDef hadc1; ADC_HandleTypeDef hadc2; DAC_HandleTypeDef hdac1; /* USER CODE BEGIN PV */ /* USER C
(STM32H747I-DISCO board)It seems to be a common problem -- USB HS works fine as long as this line reads:hpcd_USB_OTG_HS.Init.dma_enable = DISABLE;As soon as I change this to ENABLE (either manually or through STM32CubeMX) then USB enumerates but as soon as I start a BULK IN transfer, no data is received by the host, the host flags the transfer as "failed", and the STM32H747 USB pipeline is just "stuck". I have enabled level 3 USB debug messages and there is no error message printed.I have already read this post and can confirm that:1. My transmit buffers are aligned on 4-byte boundaries2. The transmit buffer is in SRAM1 which is accessible to USB_OTG_HS13. All USB operations are happening on the Cortex-M4 processor of the STM32H747I, so there is no Cortex-M7 caching issues to considerAny other ideas for how to enable the internal USB DMA?
@Roger SHIVELY Hi Roger and ST Team, I am facing the same issue as described by @VH. I am working with the NUCLEO-G0B1RE and TCPP01-M12. and I am trying to use the X-CUBE-TCPP software expansion to this board. My Goal :I need to supply a device with 9V if the power adapter supports it, otherwise fallback to 5V. I originally followed the setup exactly as shown in "How to Create a STM32G0 USB-PD Device with STM32CubeIDE" Youtube video:.However, I encountered an issue where STM32CubeMonitor does not detect any connected device. Could you please provide guidance on the necessary modifications required to make TCPP01-M12 or the X-CUBE-TCPP work on the NUCLEO-G0B1RE? Are there any key differences between the G071RB and G0B1RE that require specific attention (e.g., clock configurations, UCPD settings, power management, middleware dependencies)? I appreciate your support! edit - moved to a new thread from How to port X-CUBE-TCPP to STM32G0B1
I've been diving in various rabbit holes and I've come to the issue of alignment and pointers. Thus, I enabled -Wcast-align. It has flagged the HAL for the ADC DMA startup here static uint16_t adc_buffer[ADC_BUF_SIZE]; HAL_ADC_Start_DMA(hadc, reinterpret_cast<uint32_t*>(adc_buffer), 6);This is due to the fact that my buffer is a 1/2 word array but this DMA function accepts only a word array. Yet, I've told the DMA that I am using 1/2 words so it knows how to perform the access. And I think this type of cast will be OK even for alignment issues since 16 bit access will always be aligned on 16 bit or 32 bit buffers.So is this a case of knowing that it should be fine and disabling the warning here?
Hello. I have an application where I am using the HRTIM in a timing critical section of code. When the (one-shot) timer expires, I need to set/reset up to eight GPIOs, then restart the timer with a different period. It's not clear in the RM how to program the HRTIM to do this. Can someone point me to an application note that shows how to setup the timer to do this? Thank you,Rob
I'm using a STM32U585AIIxQ. The firmware package is: STM32Cube FW_U5 V1.7.0. CubeMX version is 6.13.0.OCTOSPI1 is configured as Single SPI on port1 and OCTOSPI2 is configured as Quad SPI on port2.After initialisation only the last initialised OCTOSPI works, because HAL_OSPIM_Config() messes up the P1CR and P2CR registers of the OCTOSPIM.This problem was mentioned 2 years ago here: https://community.st.com/t5/stm32-mcus-products/stm32-cube-h7-hal-ospim-config-corrupts-previous-port/m-p/126073#M22902and here:https://community.st.com/t5/stm32-mcus-embedded-software/stm32cubemx-l4-v1-13-0-hal-ospim-config-corrupts-port/m-p/296420Why is this still not fixed?
I am working with an STM32F303 and trying to generate a PWM signal on TIM3, Channel 1 (PA6). Everything seems to be correctly configured (verified in the debugger – registers appear correct), but there is no PWM signal on PA6. The function responsible for clock configuration worked correctly in the case of USART. In the IRQ handler, the flag registers are set correctly, which I verified using a breakpoint. I would appreciate any help in identifying the possible cause of why the PWM is not activating. void configureTIMER3(void) { //PA6:D12 RCC -> APB1ENR |= RCC_APB1ENR_TIM3EN; TIM3->PSC = 711; //72mghz TIM3->ARR = 99; //PA6 } void clock_config(void) { RCC->CR |= RCC_CR_HSION; while (!(RCC->CR & RCC_CR_HSIRDY)); RCC->AHBENR |= RCC_AHBENR_GPIOAEN; RCC->APB1ENR |= RCC_APB1ENR_PWREN; // FLASH -> ACR = FLASH_ACR_PRFTBE | FLASH_ACR_PRFTBS | FLASH_ACR_LATENCY_2; RCC->CFGR |= RCC
Hi fellow engineers,I'm trying to create a minimal example of blinky using an RTOS task in STM32CubeIDE. My MCU is a bare STM32F070CBT6. The code ends up in Default_Handler just a moment after the startIOC file is as follows, nothing is configured, except FREERTOS, GPIO port for the LED and TIM6 as timebase source#MicroXplorer Configuration settings - do not modify CAD.formats= CAD.pinconfig= CAD.provider= FREERTOS.IPParameters=Tasks01 FREERTOS.Tasks01=defaultTask,24,128,StartDefaultTask,Default,NULL,Dynamic,NULL,NULL File.Version=6 GPIO.groupedBy=Group By Peripherals KeepUserPlacement=false Mcu.CPN=STM32F070CBT6 Mcu.Family=STM32F0 Mcu.IP0=FREERTOS Mcu.IP1=NVIC Mcu.IP2=RCC Mcu.IP3=SYS Mcu.IPNb=4 Mcu.Name=STM32F070CBTx Mcu.Package=LQFP48 Mcu.Pin0=PC13 Mcu.Pin1=VP_FREERTOS_VS_CMSIS_V2 Mcu.Pin2=VP_SYS_VS_tim6 Mcu.PinsNb=3 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F070CBTx MxCube.Version=6.13.0 MxDb.Version=DB.6.0.130 NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0
Hi, I am trying to develop ethernet project on stm32f767zi. I am facing the problem when I am trying to pinging from PC to stm32. "Destination host unreachable." How can I fix this? I read similar topic but anything couldn't solve the problem. I shared the configurations and main code with you. I am waiting for the answers. They will really help me I believe. Have a nice day.
Hi everyone, I'm currently experiencing a strange crash on a STM32G473 and I'm a bit stumped on how to debug it. First the crash: The system is a STM32G473 running FreeRTOS V10.5.1. I have a simple FDCAN ISR which takes the incoming CAN frames and pushes it to a FreeRTOS queue for use in user space in a task; nothing fancy except this, just transforming the data to a nicer structure and clearing the FIFO and so on. During high bus loads however, the FDCAN ISR will sometimes fire during a FreeRTOS context switch. When it does, the system crashes, which is a problem in and of itself, but the main issue is that the NMI is triggered and not the Hardfault. SRAM Parity is enabled, but not Clock Security. Attached is the NMI Handler. I'm checking every bit in HFSR, CFSR, AFSR, The parity error bit and the flash ecc bit and even the css bit are checked. I'm stepping through the function and checking if anything could have triggered the NMI. None of the relevant bits are set to 1 howe
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.