Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello again :)I have used all ideas including chat GPT. I can't see any changes in I2C line with oscilloscope. STM32G0B1KBU3N have Pin PB9 as SDA and PA9 as SLC. 3.3Volts pull up via 4.7 kOhm resistor. I am trying negotiate with LM51772 DC-DC buck-boost converter. No external clock crystal. I am sure the issue in the code but because lack op experience cant see where. Please support with the solution. Below is the code and the debug message. I am in desperate. Thank you. set *(int *)0xE000EDFC=*(int *)0xE000EDFC|0x400 Temporary breakpoint 1, main () at ../Core/Src/main.c:82 82 HAL_Init(); /* 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 fou
Hello, I work with a STM32L031K6TxLQFP32. I can already send a SMS by connecting a SIM card. Can someone tell if I can control a SIM card, so I can send and received an Email or, if it doesen't work, because of what value it would fail?Thanks in advance.#stm32#email
譬如說我使用一個按鍵,按下去之後執行函式"jump_to_sys_memory_bootloader",再搭配STM32CubeProgrammer,使用uart來更新我的MCU,但是一直無法連接成功,以下是我的函式請問哪邊有遺漏嗎?static void jump_to_sys_memory_bootloader(void){uint32_t i;void (*SysMemBootJump)(void);__IO uint32_t sys_memory_address = SYSMEM_BOOT_BASE;// 1. 關閉全域中斷__disable_irq();// 2. 停止 SysTickSysTick->CTRL = 0;SysTick->LOAD = 0;SysTick->VAL = 0;// 3. 釋放所有已初始化的外設HAL_ADC_DeInit(&hadc1);HAL_I2C_DeInit(&hi2c1);HAL_SPI_DeInit(&hspi1);HAL_SPI_DeInit(&hspi2);HAL_UART_DeInit(&huart1);HAL_UART_DeInit(&huart2);HAL_TIM_Base_DeInit(&htim14);// 4. Reset RCC (回到預設 HSI 狀態)HAL_RCC_DeInit();// 5. 關閉 NVIC 所有中斷for (i = 0; i < (sizeof(NVIC->ICER) / sizeof(NVIC->ICER[0])); i++){NVIC->ICER[i] = 0xFFFFFFFF;NVIC->ICPR[i] = 0xFFFFFFFF;}// 6. 記憶體重映射到 System Flash__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();// 7. 設定主堆疊指標 (MSP)__set_MSP(*(uint32_t *)sys_memory_address);// 8. 取得 Bootloader Reset Handler 入口點SysMemBootJump = (void (*)(void)) (*((uint32_t *)(sys_me
Hi all,i'm working on a project involving BLE and I wanted to use the P-NUCLEO-WB55 board as a BLE sniffer as described here: https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32_Sniffer_for_BLE_Setup_guide#HardwareI managed to find a P-NUCLEO-WB55 board used by a colleague for old projects and I was trying to follow the guide at previous link to set-up the board but I cannot download the BLE stack, nor update the FUS. I am using STM32CubeProgrammer 2.20.0, and by reading FUS infos I get the following reply:The option bytes are set as listed in the attached file.I tried also to follow the procedure shown in this video (How to program a STM32WB55 with STM32CubeProgrammer ) having the following result:Is it possible to restore the stack on this board? Kind regards,Andrea
Hello,I am using STM32L496VGT6 with COMP1 and COMP2 to monitor the output voltage of a pressure transmitter. The MCU operates in STOP1 mode most of the time, where the comparator behaves correctly.However, in RUN mode, whenever the SX1262 LoRaWAN module transmits or opens RX1/RX2 slots, I see continuous false edges from the comparator:If 0.255 < Vin < VL (0.275 V) → I get continuous falling edges.If VL < Vin < VH (0.55 V) → I get continuous rising edges.This only happens during LoRaWAN TX or RX windows, not during idle. Log : **comp2 Falling edge TX on freq 866585000 Hz ...**comp1 Rising edge RX_1 on freq 865062500 HzWhat I tried:COMP configured with medium/high hysteresis.Added blanking source using TIM3 OC channels, started before Radio TX/RX and stopped after.Added RC filter (10 kΩ + 10 µF) at COMP input. Still see one false edge every TX/RX.In STOP1 mode: comparator works fine (only one edge when Vin actually crosses threshold).In RUN mode: false ed
Hi,I am searching for the external loader to flash the h750 discovery board. Can you please help me?Best regards,Andrew
Split from this thread.Hi there, switching to USART3 didn't work. I still don't see any messages in the serial console. the second time I try to connect to the serial console gives this error.
I have a custom board (G491) with a 1-shunt driver and Hall sensors I have been using with MCSDK 6.3.2 with no issue.When I saw the Release Notes of 6.4.0 I decided to give it a try, I wanted to try out the current monitoring.The workspace project was created from scratch with the same configuration as it worked on 6.3.2 (6-step, hall sensor as speed sensor), but, when I tried to start the motor, it didn't start. When I manually moved the shaft, speed control got crazy and started spinning at max speed.In idle, I realized that the UI reports 30 rpm when not in movement. I can move the motor forward and it reports some speed but, if I turn it backwards, speed is reported as 30 rpm. HALL_EL_ANGLE register is stuck at 0, when it should change.I went back to a nucleo-G431 with a IHM08M1 and a different motor, and the behavior is exactly the same.It looks like the logic for the Hall sensor is broken.Has anybody experienced anything like that?
I was testing a BLDC motor with Hall-effect sensors at very low speed. This worked ok with v6.3.2, but with v6.4.1, if the speed reference is low, the motor don't even start.If I manually move the motor, sometimes it starts and sometimes it throws an overcurrent error.It looks like the PID is integrating, but not actual PWM's are being sent to the motor.I checked that, when movement starts, HALL_ReadState (called via multiple functions from TSK_MediumFrequencyTaskM1 when State is CHARGE_BOOT_CAP) sets pHandle->SensorIsReliable = false because the hall state was the same as previous call to ReadState so I modified ReadState so that, when the state is the same as before, it was not labeled as unreliable, but motor still doesn't start.I'm going to dig deeper on it.
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 , I’m currently playing around with the STM32N66570-DK kit. I’m having a simple problem with button detection. For testing, I’m just using the USER1 button (BP1 in my code ) and LED1. I couldn’t get the button working properly with interrupts, so in this code I just read the state of USER1 ( BP1) and turn LED1 on or off accordingly. The USER1 button is always read as the same value, no matter whether I press it or not. in debug Mode : GPIOx const GPIO_TypeDef * 0x56020800GPIO_Pin uint16_t 8192bitstatus GPIO_PinState GPIO_PIN_RESET Here are the code and screenshots. The code was generated with CubeMX. Thanks for your help! Once I get the button detection working, I’ll move on to using interrupts. Emmanuel main.
Hello,I am trying to use Nucleo-H563ZI with SPI display (ILI9431) with Single Frame buffer but i couldn't configure it and didn't find appropriate example. Do anyone have used SPI display with Single Frame Buffer? Any help would be great.I do have sufficient space to implement single Frame Buffer. I am lacking knowledge for implementation.I have successfully used partial frame buffer but there was a problem, whenever i used .invalidate() to update textArea other box flicker in the display. On the partial frame buffer i used SPI with DMA. Thank youkind regards,Binod Basnet
I have a custom board with a STM32G491 with a single-shunt driver for 6-step with hall effect sensors.One of the motors I have has a hall sensor placement close to 120°. I followed the process described in documentation (section 3. "Setting up the system when using Hall-effect sensors" in "Hall sensor feedback processing" page) and the Hall delay, described as "the delay in electrical degrees between the maximum of the B-emf induced on phase A and the first rising edge of signal H1" was approximately 108°.I used that value with v6.3.2 and I confirmed that current through motor phases was cleaner with 108° than with 120° (with both values rotating correctly)When v6.4.0 came out I tried the same configuration. The motor only vibrated violently with either 120° or 108° for hall delay. I reported it in this forum and a code modification was suggested that eventually was included in v6.4.1. But that solution only fixed when Hall delay is aligned with 60° steps.With v6.4.1:If I set 120° (it
Hi all,Hi Martin,@Martin KJELDSEN, now that version 4.26.0. of TouchGFX is out, I tried to migrate my huge project (90 screens) to this new release, but I can not get texts being generated.What I have done:I used the latest STM32CubeMX version (6.15.0) and regenerated code of the project with TouchGFX Version 4.26.0 selected. Then I opened TouchGFX Designer 4.26.0, migrated my project and generated code too.There were several warnings concerning the Unicode characters like the following sample:WARNING - Char 0xC0 is used but does not exist in the font!WARNING - A total of 64 Unicode characters did not exist in the font!In the first run, texts were generated correctly.But as soon as I change a text or add a new text, these changes are no longer regenerated when pressing "Generate code". Then I tried several things (proposed on a different post):- Change all wildcard character sets from 0x20...0xFF to 0x20...0x7E. Did not help!- Generate a bla
Hello, I am using STM32C071 in my project, the main work is to receive data from PC, then do some controls, then send data to PC.However, during the send data to PC step, sometimes the data will be sent continuously, it doesn't meet my requirements, sometimes it working well, this is very unusual. please provide some advise.After I send the data and proceduce the 'handleRecvData()' func, the data I received from PC is not un-stoppable.I have checked several days and I can't find what caused this ab-normal.I follow the steps from @B.Montanari , this link:https://community.st.com/t5/stm32-mcus/how-to-implement-the-usb-device-cdc-vcom-in-stm32-using-the/ta-p/599170the write and read threads code shows as below:/* Private function prototypes -----------------------------------------------*/ /* USER CODE BEGIN PFP */ uint8_t resultCode = 0; extern TX_MUTEX mutexCode; /* USER CODE END PFP */ VOID usbx_cdc_acm_write_thread_entry(ULONG thread_input) { /* Private Variables */ ULONG tx_ac
Hi, we are developing a device which outputs display port over type-c and needs to sink power. Similar to Laptops when connected to hubs. The required power is less than 60W. Im looking a for a suitable USB-PD implementation for this purpose. Can this be achieved using the USB PD peripheral in STM32s? If so, how? Regards,Caner,Alp Lab
Hi all,After reading through both the HAL, low-layer and USB Device library code flow several times I am still confused about a peculiar point.When I ask STM32CubeIDE to generate a Custom HID base implementation, I get a "usbd_conf.c" file that has a function like this:USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev) { /* Init USB Ip. */ /* Link the driver to the stack. */ hpcd_USB_FS.pData = pdev; pdev->pData = &hpcd_USB_FS; ... hpcd init ... ... callback registration ... /* USER CODE BEGIN EndPoint_Configuration */ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x00 , PCD_SNG_BUF, 0x18); HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , 0x80 , PCD_SNG_BUF, 0x58); /* USER CODE END EndPoint_Configuration */ /* USER CODE BEGIN EndPoint_Configuration_CUSTOM_HID */ HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CUSTOM_HID_EPIN_ADDR , PCD_SNG_BUF, 0x98); HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CUSTOM_HID_EPOUT_ADDR
Hello,I have two applications: one at 0x08000000 and one at 0x08080000. Both run fine individually (when setting the boot config bytes to the fitting offset). Now I want to use the one at 0x08000000 as secure area and escape it by using exitSecureArea. In the debugger, I can observe that the code runs fine until the very call to exitSecureArea. Now my questions are:1. Is there something else I need to to? This seems to suggest that I need to set the VTOR register. I currently (try to) do it before the call to exitSecureArea.2. If I need to setup the VTOR register, is my code below correct? Or do I need to do it differently/at a different place?3. Does exitSecureArea also work when the secure area is not set? I only tried without setting it as not to brick the device.4. Is there a way to debug this nicely? Spoiler (Highlight to read)typedef struct{uint32_t sizeInBytes; /*!< pass 0 for an empty secure area */uint32_t startAddress; /*!< pass NULL for an empty secure area
I'm using a B-U585I-IOT02A board and the IOT_HTTP_WebServer example code. My read is the PSRAM is 8M on that board, but I can only access 16K (to 0x2803ffff) and then ???? is not IDE memory display or a trap in the code. Is this a CPU configuration issue?
I'm trying to read data from my MPU-6050 (a 3-axis accelerometer and gyroscope from DFRobot) using an STM32F103RB microcontroller, but I'm running into an issue.The sensor communicates via I2C. It's powered by 3.3V from the STM32, and I've used once 1,2kΩ and other time 10kΩ pull-up resistors on the SDA and SCL lines to 3.3V.During program debugging, the sensor is left completely stationary. However, in the "Live Expressions" view, the raw values from the sensor are inconsistent. The values for the corresponding accelerometer and gyroscope axes are always the same, which seems strange.Here are the raw readings from the first few reads:First Read:Accel_X_RAW & Gyro_X_RAW: -4017Accel_Y_RAW & Gyro_Y_RAW: 32Accel_Z_RAW & Gyro_Z_RAW: 30476Second Read:Accel_X_RAW & Gyro_X_RAW: 0Accel_Y_RAW & Gyro_Y_RAW: 0Accel_Z_RAW & Gyro_Z_RAW: -1280Third Read:Accel_X_RAW & Gyro_X_RAW: -1280Accel_Y_RAW&n
A BOT protocol read fail error is occurring in usbh_msc.bot.c:- See "*** MY MOD-" below USBH_StatusTypeDef USBH_MSC_BOT_Process (USBH_HandleTypeDef *phost, uint8_t lun) { ... else if (URB_Status == USBH_URB_STALL) { /* This is Data IN Stage STALL Condition */ MSC_Handle->hbot.state = BOT_ERROR_IN; /* Refer to USB Mass-Storage Class : BOT (www.usb.org) 6.7.2 Host expects to receive data from the device 3. On a STALL condition receiving data, then: The host shall accept the data received. The host shall clear the Bulk-In pipe. 4. The host shall attempt to receive a CSW.*/ #if (USBH_USE_OS == 1) osMessagePut ( phost->os_event, USBH_URB_EVENT, 0); #endif } else if (URB_Status == USBH_URB_ERROR) // *** MY MOD- *** added as getting error here! { /* This is Data IN Stage ERROR Condition */ MSC_Handle->hbot.state = BOT_ERROR_IN; // tried this but no change } break; case BOT_DATA_OUT: ...
Currently, on the STM32G474, I am able to perform on-the-fly flash operations and interrupt vector relocation using BF_MODE and VTOR. However, I have encountered an issue: when a function is placed in RAM using the ramfunc attribute or located in CCMRAM, how can I still achieve on-the-fly operation?
Hello everyone, I am trying to use STM32F429I eval board to do some basic signal processing labs, like show a sinewave on the LCD display, and fft spectrum on the display too.But it is not easy to manually configure the LCD display to show some custom waveform. It looks like we need to configure FMC -> LTDC -> LCD...Since there is only one LCD on the board, I assume I need to enable LCD1... Then, how am I supposed to configure FMC in the first place ?Thank you.
Hello STM family,As you know, building a project and trying it rapidly is fast enough at simulator in Touchgfx. However, we can not try every feature in simulator. So, we need to upload it to hardware. When pixel size is increased, binary file is also became bigger. Uploading that file on hardware takes considerable time. I wonder that how we can accelerate that time during development period. Best regards,Faruk Işıker
Hi All!I try to use 2 pieces of IS66WVO32M8 PSRAM with multiplexed OSPI ( only the NSS pins not shared ) with STM32F585 in memory mapped mode.Previously, I used 2 pieces of APMemory's APS12808L in memory mapped mode without any issues.I reconfigured all the necessary parameters to IS66... according the datasheets (AN5050, STM32F585 OSPI errata), and other's suggestions in the forum, like: https://community.st.com/t5/stm32-mcus-products/problem-with-psram-peripherals-of-stm32h735/m-p/706406#M257198or https://community.st.com/t5/stm32-mcus-products/problem-with-psram-peripherals-of-stm32h735/td-p/706406I can read the ID and configuration registers, I can also modify them (Yellow square), but when I write directly or indirectly to the memory area, and read back for verification, it causes an error.I tried to change the OSPI speed, using 55, 80, 100 MHz (with recalculated refresh rate using 4us tCEM: 220, 320, 400, 640), with- or without delay block, DHQC enabled/disab
Hi,I am using STM32WB55 device in my design and have to provide 3.3V from outside to BOOT0 pin BEFORE MCU is powered ON. In the datasheets and the manuals that I have been reviewing I didn't find any straightforward information what voltage level can be provided to this pin before device is powered-up.Please let me know if someone have encountered with this topic before.Thanks!
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.