Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
We will constantly monitor whether the parameters of the language change in a background container. If they do change, we will apply the new language. But for components that are not in this container on the same screen, how can we resize them most appropriately?
Hi,I want to create device, based on STM32WB09, with BLE and battery power. I get sample from CUBE and turn on CFG_FULL_LOW_POWER and CFG_LPM_SUPPORTED. It works, between BLE events MCU work in Deepsleep mode, but i need scheduller:1) Deepsleep2) wakeup by Button or every 60 second by RTC3) turn on BLE, send data to phone4) go to deep sleep after 15 second of workCould you help me, how can i implement this scheduller with BLE and Sequencer? In Sequencer low power mode implements in UTIL_SEQ_Idle, can i change this function? thanks
I’m currently developing a custom board based on an STM32U585.On the board, I have three SPI devices connected to the MCU, each managed by its own chip-select line:* MAX9939 → requires LSB first and can be controlled in transmit-only SPI mode.* LSM6DSL (IMU) → requires MSB first and full-duplex mode.* CAT25256 (EEPROM) → also requires MSB first and full-duplex mode.To handle these differences, I switch the SPI configuration dynamically at runtime. The function I use for reconfiguration is:int SPI_SetConfig(SPI_HandleTypeDef *hspi, struct _myspi_config_t *config) { printf(">>>>>>>>>>>>QUI\r\n"); // Skip re-initialization if configuration already matches if (hspi->Init.CLKPolarity == config->CPOL && hspi->Init.CLKPhase == config->CPHA && hspi->Init.FirstBit == config->order && hspi->Init.Direction == config->direction && hspi->Init.DataSize == config->datasize && hspi->Init.BaudR
So if you have a radio button with a callback function set via TouchGFX on click selected, the code generated in the BaseView has a typo in setActionIt uses the function SetAction (with capital S) which is wrongTO REPLICATE:Create a radio buttoncreate a Interactions "radio button is selected" that calls a virtual functiongenerate the codethe code generated:radioButton.SetAction(radioButtonSelectedCallback);instead ofradioButton.setAction(radioButtonSelectedCallback);On another note, no callback is called if the radio button is selected, even if seAction is manually fixed
Hi,I have a new design using the STM32H725IGT. The STM32H725IGT is a 176 pin QFP. The power rails have all checked out as good but I can't connect to it to program it. I have tried two ST-link V2's and two separate boards with no success. Both ST links updated their firmware successfully and are seen by the CubeMX IDE. We are also using the Olimex adapter to enable a smaller connecter. This is the PCB layout of that:The on-board connector is the Samtec FTSH-105-01-F-DV-007-K, so an Olimex ARM-JTAG-20-10 is used to convert the large 20-pin ST-link connector down to 10 pin. As can be seen in the above image, SWCLK goes to pin 138 of the STM32H725IGTSWDIO goes to pin132 of the STM32H725IGTOn the FTSH-105-01-F-DV-007-K, pins 3 & 5 are GND, 1 is +3.3V, 2 is SWDIO, 4 is SWCLK. Pin 6 is connected as JTDO-SWO. Pins 6 and 8 are, I believe not used by the ST-link. Pin 10 connects to pin 33 of the STM32H725IGT, nRST. The nRST is labelled JnTRST for JTAG programmers, but it is
Hello! How are you?I'm having trouble again with the "TRGO" trigger event on the Master and Slave Timers. I need multi-channel PWM, but Timer 1 (the Master) and Timer 2 (which simply starts simultaneously with Timer 1) generate PWM with a single (initial) phase, and each timer operates on two PWM channel outputs. However, Slave Timers 15 and 3 should start generating PWM on their outputs (each timer uses two PWM channels) with some delay. This delay is provided by Timer Master 1 on its "TRGO" output, and I'm using the "OC3_REF" channel for this. Please see the diagram for this multi-channel PWM operation. Everything works perfectly, as expected, but only until all the specified Timers are stopped and then restarted. After that, Slave Timers 15 and 3 stop starting (see the screenshot of the oscilloscope display of all PWM channels for these Timers). I'll now provide the code for starting and stopping these Timers. There's a lot of code, so this is the most important part for now. I've a
Hi,I’m working on STM32WLE5 module for storing values in EEPROM. I want to use the last page of flash for storing configuration values of lora.I have used EE library from GITHUB which uses HAL functions.I followed 2 sequences for writing into flash:Erasing the page 127(which I use for writing the values), read and write worked perfectly. Values are being stored correctly in flash.Read the values from page 127 and then erasing the page and writing to it. I get hardfault error everytime.if I erase the page 1st and write to it, then there is no use of storing in it. So, If I read the flash, I’m not able to write to it.I have also moved all the functions used for writing into flash to RAM by adding __attribute__((section(“.RamFunc”))) in function definition so that there won’t be stalling of CPU. I have checked in disassembly while debugging that all the related code is running from RAM. I get hardfault error while HAL_FLASH_Unlock() after erasing the page. Is there any othe
I'm already achieved a USBX-MSC class, and also a FileX in MCU local.I know that using two file systems at the same time is not recommended, but still have some questions. 1. I implement the ux_deveice_msc.c as followed. Use PC-Windows to create a file such as my_test.txt to U-DISK, successfully and the local FileX will see the new file immediately.UINT USBD_STORAGE_Read(VOID *storage_instance, ULONG lun, UCHAR *data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status) { UINT status = UX_SUCCESS; /* USER CODE BEGIN USBD_STORAGE_Read */ UINT fxStatus = FX_SUCCESS; while (number_blocks--) { fxStatus = fx_media_read(sdioDisk, lba, data_pointer); if (fxStatus != FX_SUCCESS) { status = UX_ERROR; break; } data_pointer += sdioDisk->fx_media_bytes_per_sector; lba++; } /* USER CODE END USBD_STORAGE_Read */ return status; } UINT USBD_STORAGE_Write(VOID *storage_instance, ULONG lun, UCHAR *data_pointer, ULONG number_blocks, ULONG lba, ULONG *media_status)
Hi,I’m working with an STM32G070RBT6 MCU and trying to flash it over UART. The UART lines are directly connected to an FTDI adapter, which is connected to my PC via USB. The COM ports show up correctly, but when I try flashing through STM32CubeProgrammer using the UART option, it repeatedly fails with the error message shown below.I’m currently using PA2/PA3 as the UART pins."18:15:17 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...18:16:25 : RTS low18:16:25 : DTR Low18:16:25 : Serial Port COM27 is successfully opened.18:16:25 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off18:16:29 : Timeout error occured while waiting for acknowledgement.18:16:29 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... "
For some reason, if you use a single radio button, and you want to de-select an already selected radio button, it won't work and the radio button keeps stay selected.The docs clearly states "Pushing the RadioButton again will return the to original state.". That's not the case. (Also, the documentation is spelled wrongly; it should be will return to the original state)https://support.touchgfx.com/docs/api/classes/classtouchgfx_1_1_radio_buttonI have tried both withouth a Group and with a Group for the radio button. I have also tried with multiple radio button both in the same group or with no group. There's no why to deselect the radio button once selected.I'm using TouchGFX Designer 4.25TO REPRODUCECreate a ViewAdd the standard radio buttonSimulate itClick the radio button (it will be selected)Try to click it again (it won't de-select)
here : https://www.st.com/resource/en/reference_manual/rm0390-stm32f446xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdfThe Status register (USART_SR) Reset value is 0x00C0 0000, which is wrong.
Post edited by the ST moderator to be inline with ST community rules especially for the code. Please use </> button to paste your code. Hello :) I almost have this working. In fact I had the ISR running and incrementing an integer. Then I went to the next stage and put in the xTaskResumeFromISR() but that crashes in configASSERT( xTaskToResume ). Can anyone see any problems with this code? Init: __disable_irq(); GPIO_InitTypeDef GPIO_InitStruct = {0}; // Configure PE12 GPIO_InitStruct.Pin = GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; // Interrupt on rising edge GPIO_InitStruct.Pull = GPIO_PULLDOWN; // pulldown GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; // This does nothing on an input pin HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); // Configure NVIC HAL_NVIC_SetPriority(EXTI15_10_IRQn, 10, 0); // Maybe the priority is not suitable for xTaskResumeFromISR ? HAL_NVIC_EnableIRQ(EXTI15_10_IRQn); __enable_irq(); Vector table piece: .w
There are several peripherals that have a separate layer of protection based on privileged/unprivileged, here are some examples from the reference manual:MCE:39.2 MCE main features"AHB configuration port, privileged aware"RTC:49.2 RTC main features"Alarm A, alarm B, wake-up Timer and timestamp individual privilege protection"A first question would be: What privilege is being talked about?Is it the CPU's current (un)privileged mode when the CPU has sent the access request?Or is it the CPU's current (un)privileged mode independent of whether the CPU has sent the access request?Or is it any bus master's current (un)privileged mode (assuming every bus master has such concept) when that bus master has sent the access request?It does appear that other bus masters have privilege-based protection:GPDMA:12.2 GPDMA main features"Privileged/unprivileged support:- Support for privileged and unprivileged GPDMA transfers, independently at achannel level- Privileged-aware AHB slave port"HPD
Hello everyone, I've recently purchased the B-L462E-CELL1 cellular IoT Discovery kit, and I am looking for sophisticated libraries to control/run different sensors/modules on this board including the cellular connectivity modem, accelerometer, magnetometer, OLED display, humidity/temperature sensors etc., to use them for my own product development. I know that there are some "softwares" for this board such as Patch_XCUBECELL, X-CUBE-CELLULAR, and XCC_FreeRTOS. But they seem to be for demonstrating high-level board capabilities and not in way to accelerate my product development (the reason why I bought this board!) So, are there any general libraries to control/run different sensors/modules on this board, so that I could demonstrate my own product? Without digging into the abovementioned softwares with million lines of codes and God-knows-what codes/libraries? Thanks
Hi,MasterMCU: STM32H743IILVGL: V9.1Problem Description:I have an external SDRAM with a size of 32MB.The program is configured as follows:void sys_cache_enable(void) { SCB_EnableICache(); SCB_EnableDCache(); SCB->CACR |= 1 << 2; } void mpu_memory_protection(void) { // RAM 512K mpu_set_protection( 0x24000000, MPU_REGION_SIZE_512KB, MPU_REGION_NUMBER1, MPU_REGION_FULL_ACCESS, MPU_ACCESS_SHAREABLE, MPU_ACCESS_CACHEABLE, MPU_ACCESS_NOT_BUFFERABLE); // EXSDRAM 32M mpu_set_protection( 0XC0000000, MPU_REGION_SIZE_32MB, MPU_REGION_NUMBER2, MPU_REGION_FULL_ACCESS, MPU_ACCESS_SHAREABLE, MPU_ACCESS_CACHEABLE, MPU_ACCESS_NOT_BUFFERABLE); }The LVGL related frame buffers are stored in the external SDRAM as shown below.static color_t render_buff1[1024 * 600]; static color_t render_buff2[1024 * 600]; static color_t frame_buff[1024 * 600]; // LVGL uses double buffering for rendering. lv_display_set_buffers(disp, render_buff1, render_buff2, sizeof(render_bu
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code. Hi everyone, I am working on Classic CAN communication using the STM32H745I-Discovery board with FDCAN2.My target CAN configuration is 500 Kbps nominal baud rate with a 16 MHz clock. Below is my initialization code: static void MX_FDCAN2_Init(void) { hfdcan2.Instance = FDCAN2; hfdcan2.Init.FrameFormat = FDCAN_FRAME_CLASSIC; hfdcan2.Init.Mode = FDCAN_MODE_NORMAL; hfdcan2.Init.AutoRetransmission = ENABLE; hfdcan2.Init.TransmitPause = DISABLE; hfdcan2.Init.ProtocolException = ENABLE; // Timing config: 500 Kbps @ 16 MHz hfdcan2.Init.NominalPrescaler = 1; hfdcan2.Init.NominalSyncJumpWidth = 1; hfdcan2.Init.NominalTimeSeg1 = 23; hfdcan2.Init.NominalTimeSeg2 = 8; hfdcan2.Init.DataPrescaler = 1; hfdcan2.Init.DataSyncJumpWidth = 1; hfdcan2.Init.DataTimeSeg1 = 1; hfdcan2.Init.DataTimeSe
Hello everyone.I'm working on the stm32G474RBT6 MCU and I'm trying to set up both FDCAN1 and FDCAN2 to work simultaneously.I wanted to map the FDCAN1 to RxFIFO0 and the FDCAN2 to RFIFO1. The FDCAN1 work perfectly while the FDCAN2 doesn't seem to get any callback from the RxFIFO1 at all (I tried using both of them on the RxFIFO0 and in that configuration I was able to communicate with both FDCAN peripherals, but this won't due as I need them to have separate callback functionalities).This is how I setup my peripherals: /* FDCAN1 init function */ void MX_FDCAN1_Init(void) { /* USER CODE BEGIN FDCAN1_Init 0 */ /* USER CODE END FDCAN1_Init 0 */ /* USER CODE BEGIN FDCAN1_Init 1 */ /* USER CODE END FDCAN1_Init 1 */ hfdcan1.Instance = FDCAN1; hfdcan1.Init.ClockDivider = FDCAN_CLOCK_DIV1; hfdcan1.Init.FrameFormat = FDCAN_FRAME_FD_BRS; hfdcan1.Init.Mode = FDCAN_MODE_NORMAL; hfdcan1.Init.AutoRetransmission = DISABLE; hfdcan1.Init.TransmitPause = DISABLE; hfdcan1.Init.Pr
I'm developing an application where I need to have both USART1 and LPUART1 configured to receive commands. I'm using STOP1 mode to ensure the commands can be received by both peripherals (USART1 will not work with STOP2 mode from my understanding). I'm seeing extremely weird behavior and it's perhaps the way I'm implementing the wake up. The same exact setup I use in USART1 has a completely different current consumption with LPUART1. I have another MCU on my board but in STOP1 mode with USART1 enabled only I get about 500uA current consumption and when I swap it for LPUART1 I get 4mA.# ENVIRONMENTSTM32WB35CEUDMARX circular buffer. USART1Baudrate 115200Clock HSILPUART1Baudrate 9600Clock LSE# PROBLEM DESCRIPTIONMy application flow is as follows:When UTIL_SEQ_Idle() gets called I do the following:Check USART_ISR_BUSY is RESET (return otherwise).Check USART_ISR_REACK is SET (return otherwise).Call HAL_UARTEx_StopModeWakeUpSourceConfig() with UART_WAKEUP_ON_STARTBIT.Enab
Hello, I could use your help. I wanted to start a small project where an ST7735 display with an STM32F401CCU6 simply writes text. For some reason, I started with the wrong library, namely Adafruit_ILI9341, which resulted in the first photo. When I finally realized that I was using the wrong library, I switched to Adafruit_ST7735, but here I have the problem that it doesn’t get through the initialization (that’s my assumption). I’ve already tried the different initR variants. I’m happy about any help! Best regards, Michael #include <Adafruit_GFX.h> #include <Adafruit_ST7735.h> #define TFT_CS PB10 #define TFT_RST PB0 #define TFT_DC PB1 #define LED_PIN PC13 Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); void setup() { delay(200); // kurz warten, bis das Display Strom hat pinMode(LED_PIN, OUTPUT); tft.initR(INITR_BLACKTAB); tft.fillScreen(ST77XX_RED); // Bildschirm rot füllen delay(1000); tft.fillScreen(ST77XX_GREEN); // Bildschirm grün f
I am developing a bootloader for the STM32H563 that is stored at the beginning of internal Flash (0x08000000) and the application is stored at 0x08020000. The application runs fine when I program/start from STM32CubeIDE once I changed the linker script to set the appropriate Flash address and the VEC_TAB_ADDRESS to be 0x20000 in system_stm32h5xx.c, so the application runs fine on its own from the new 0x08020000 address.In the bootloader I am executing the following code the should work fine as I've used similar before in a project with the STM32H743. __disable_irq(); SCB->VTOR = (uint32_t)EuiFlashFile_loadAddress; __set_MSP(*(__IO uint32_t*) EuiFlashFile_loadAddress); void (*app_reset_handler)(void); app_reset_handler = (void (*)(void))(*(__IO uint32_t*)(EuiFlashFile_loadAddress + 4U)); app_reset_handler();The app_reset_handler is set to the correct Reset_Handler address stored at 0x08020004 (0x0802FC3D).......but after the app_reset_handler() is called I used the debugge
New question from this thread. Hi @mƎALLEm I am using STM32N6 Nucleo-144 board. In this board VDDIO is the power supplied at VDD, VBAT. VDDIO2, VDDIO4, and VDDIO5. So this the the power supply which is driving GPIOs. This power is generated by LD39020ADTPU33R which is a LDO Voltage Regulators which can supply maximum 200 mA current. I am worried about if i can only use 10 GPIOs? What if i need to more GPIOs in my design?
Hello,I am currently working on integrating the Auracast examples BLE_Audio_PBP_Sink and BLE_Audio_PBP_Source.The main objective is to design a speaker capable of switching between Source and Sink roles depending on the state of a button.However, I am uncertain whether this approach is actually feasible. From what I have seen, the BLE Audio source files appear to be fixed and not meant to be modified, while the surrounding code and configuration suggest that each firmware build is designed to function either as a Source or as a Sink, but not both simultaneously. There are numerous configuration options and macros tied directly to the BLE device role, and this role seems to be determined at compilation time, rather than dynamically at runtime.After reviewing the STM documentation (Bluetooth LE Audio - STM32WBA Architecture and Integration), I found some warnings related to this limitation. Specifically, in section 3.2 it states:"Warning:The values of the parameters of the
MCU: STM32WL55JC1FW Version: STM32Cube_FW_WL_V1.3.1Reference: LoRaWAN_End_Node_DualCoreCompiler/Debugger: STM32CubeIDEIssue:I am trying to expand the flash memory region for the CM4 application by reducing the flash memory region of the CM0+ application. When trying to modify `STM32CubeIDE/CM0PLUS/STM32WL55JCIX_FLASH.ld`: From:FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 120KTo:FLASH (rx) : ORIGIN = 0x0802A000, LENGTH = 80KThe CM0+ core will never synchronize and the applications on both cores are unable to proceed. The CM4 core boots fine, but hangs waiting for the CM0+ core. If I only reduce the LENGTH of the CM0+ core it proceeds without issue.I have also tried to modify `Common/System/system_stm32wlxx.c` by defining USER_VECT_TAB_ADDRESS and adjusting the VECT_TAB_OFFSET with no success.What is the correct way to modify the flash allocations?
Thread split from this one. In all examples found on the ST rapository concerning the MPU_config in addition to the background configuration to prevent that speculative access issue, there is also the following initialisation. Could you tell me what this concerns and whether it is essential since it is present in almost all MPU_configs of the various platforms? /* Configure the MPU attributes FMC control registers */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER7; MPU_InitStruct.BaseAddress = 0xA0000000; MPU_InitStruct.Size = MPU_REGION_SIZE_8KB; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.SubRegionDisable = 0x0; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; HAL_MPU_ConfigRegion(&MPU_In
I am using an SD card in SDIO mode with the STM32F205. I am planning to replace the SD card with an eMMC. If the eMMC has SD card mode, can I replace it without changing the program?
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.