Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
In the past I've used F401 and the following code works flawlesslyHAL_FLASH_Unlock(); HAL_ICACHE_Disable(); uint64_t myWord = 0x00000001; HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 0x080C0000, myWord); HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET); HAL_FLASH_Lock(); HAL_ICACHE_Enable();Now, after switching to U385, i only get grief, with any Write command exiting in HardFault_Handler(). My research points to Option Bytes - Write Protection being enabled but the GUI in STM32CubeProgrammer is very confusing for U385, and it seems that I may have permanently locked the MCU? I cannot tick back the UNLOCK_1A _1B _2A and _2B flags. How can one unlock the Flash fully in U3?
Hello,I'm currently working with I3C in Target mode using STM32H7S3L8. I need to detect when the Controller sends a request to read data from the Target.In I2C, we can check the Address Match (ADDR) flag to know when the master sends a frame to the slave.Is there a similar flag or event in I3C to detect when the Controller is requesting data from the Target (i.e., a read request)?I'm using the I3C HAL/LL drivers, and I want to handle this case to prepare and send the correct response.Thanks in advance!
I am working with the STM32H7A3ZI microcontroller and planning to integrate an external flash memory to run application code. The flash memory I intend to use supports both standard SPI and QSPI interfaces.I would like to confirm the following:Are there any specific bootloader pins required for interfacing with external QSPI flash for code execution?Can I connect the flash to any QSPI-compatible pins, or are there dedicated QSPI pins that must be used for successful boot and execution?Does the STM32H7A3ZI support booting directly from external QSPI flash, and if so, what configuration is required? Your assistance in clarifying these points would be greatly appreciated as I finalize the hardware design. Thank you in advance for your support.
I have a stm32g071gbu6 , that is linked to an I2S amplifier TAS5722LPA5 (I2S_CK) -> BLCKPA15 (I2S_WS) -> LRCLKPB5 (I2S_MCLK) -> MCLKPB6 (I2S_SD) -> SDII use a divider bridge to pass my 3,3V stm32 output to a 1,8V which is the only voltage the TAS accept.I use a 10K and 12K ohm resistors to make my 1,8V.I had a problem to control all the I2S output but the BLCK one. To try the outputs, I disabled the I2S and changed all the pin to normal Output. I was still not able to have any control of the outputs.So I unsoldered resistor R28 on my MCLK output, and R32 on WS to be sure it didn't had any influence.I'm still not able to have 3,3V on my MCLK output, nor my SD and CS.As I saw a patern that the non working outputs were only on the same side of the MCU, I tried 3 of the 4 other pins from this side, I tried the UART one, it appear that the PB3 does not work either, but PB6 and PB7 seems to work.All the other pin that I could try seems to work fine.I tried a new project, and I tr
When Pb4 is reset, it is at a high level. Can't this be configured in the hardware? It's too disgusting. The PCB has been designed and encountered this pit.
Hi Guys,I am recently facing a very rare problem on stm32 nucleo h755zi- q i am working with ltc6804ic for a BMS and am facing the following issue:Whenever i upload the code on the stm32 it crashes, and says no debung info available etc, after this i can not upload any code to the board unless i pull the boot0 pin to 3.3 (CubeIde says no stlink connected).Each time this happens i have to put the MCU to boot mode and then connect to it via the cube programmer and then i have to mass erase the chip , after this the board works fine with every other code, except my main code, on top of that , the same was working fine on the same board and randomly works fine like lets say 1 out of 10 times, (same code , no changes made, works sometime , some time it doesn't )This is not a STLINk problem for sure (looks like one when the cube ide says no stlink detected or cant enter debug mode etc etc , i have attached some screenshots to explain what happens after the code crashes). i am
Hi, I'm trying to configure the internal RTC on the STM32H753ZIT6 development board, but the RTC isn't functioning correctly—the time doesn't increment. The code was previously working with Ethernet, and I attempted to configure the internal RTC to work simultaneously. However, after making these changes, neither the RTC nor the Ethernet functions are working. I’ve attached the code and output file for reference.
I used the NUCLEO-G474RE (NUG474RE$AT1) board to test the X-CUBE-EEPROM library. I did not notice that the STM32G474RBT3 had been soldered instead of STM32G474RETx. It appears it has been soldered to the PCB originally since there are no signs of PCB rework / IC replacement and we have never used this chip version in our company. Anyhow, while testing using the aforementioned processor, I encountered the following problems.I wrongly assumed first that the STM32G474RBT3 had 512 kB of Flash when it actually has only 128 kB. I set START_PAGE_ADDRESS to 0x0807C000, which is before the end of the 512 KB Flash. I encountered an issue with the PAGE(__ADDRESS__) macro. When the page address is too large, meaning it falls outside the Flash area, the current implementation truncates the value so that it falls within the area. However, it would make more sense to report an error.After I realized that my "test device" has only 128 kB of Flash, I changed the emulated EEPROM START_PAGE_ADDRESS to 0x
I am implementing a dual-firmware architecture on an STM32 microcontroller that does not natively support dual-bank flash. In this setup, I have partitioned the internal flash memory into two separate blocks:Block 1 (Bootloader + Application) begins at address 0x08000000Block 2 (Bootloader + Application) begins at address 0x08020000Each block contains its own independent bootloader and main application code.Issue:When executing firmware from Block 2 and a system reset occurs, the microcontroller restarts execution from Block 1 (i.e., address 0x08000000), instead of continuing from Block 2 (0x08020000).My Questions:In this type of dual-block configuration, how should the vector table be set for each block to ensure correct interrupt handling and boot behavior?What specific modifications are required in the IAR .icf (linker) file for both Block 1 and Block 2 to support this configuration?How can I ensure that when Block 2 is actively running, a reset will result in restarting Block 2 ins
Hello! I am using Zync SOC with STM 32 G4 series. I am targeting 1Mbps baud rate using CAN protocol. I am able to achieve 1Mbps using external loopback on STM. Can someone help me out with bit timing and prescaler values for STM 32 and Zync SOC
Hi, i'm working on connecting a multimeter to an stm32f2 via USB (STM32 as a HOST). The goal is to send SCPI commands to it (I easly did it in python just to chek the correct behevor of the multimeter).I implemented the USB Host lib but after few hours of debugging i cant figure out how to set the active class... (phost->pActiveClass != NULL) return false and i get "No registered class for this device". I have setup CDC in cubeMX but doesn't seems to work).I use the USBH_CDC_Transmit to send command to the multimeter but since the USBH_UserProcess state machine never reach APPLICATION_READY state it's not even a thing (i tryed sending commands in APPLICATION_START state but no success either).I get the folowing output with max lvl of debug :USB Device ConnectedUSB Device Reset CompletedPID: ea60hVID: 10c4hAddress (#1) assigned.Manufacturer : Silicon LabsProduct : METRIX MX5060Serial Number : 10003926Enumeration done.This device has only 1 configuration.Default configu
Hi ST Community,I’m working on a CAN FD project using the STM32H753VIT6 and facing a limitation with data phase bitrate while using Bit Rate Switching (BRS).My Setup:Controller: STM32H753VIT6FDCAN clock source: PLL1QPLL1Q output: 40 MHzFrame format: CAN FD with BRS (FDCAN_FRAME_FD_BRS)Nominal (arbitration) bitrate: 1 MbpsTarget data bitrate: 2 Mbps or higher Problem:Despite the configuration, I'm not able to achieve more than ~1.92 Mbps on the data phase. Even when I reduce the number of time quanta or adjust prescalers, the speed does not increase beyond this limit. My Questions:Is there any known limitation when using PLL1Q = 40 MHz for FDCAN clock?Is the STM32H753 internal FDCAN limited to certain bitrates per kernel clock frequency?Could internal synchronization or sampling constraints prevent achieving the expected 2.5 Mbps from a 40 MHz FDCAN clock?Attachments:main.c fileOscilloscope screenshot showing BRS waveform and time baseSTM32CubeMX clock configuration screenshot
I've a custom board that going to SHUTDOWN OFF mode I'm using the LPM lib and it use PA0 as WAKEUP PIN it wakes up on a High level signal void PWR_EnterOffMode(void) { /* USER CODE BEGIN PWR_EnterOffMode_1 */ // refer to the following link for more details on how to go to Off Mode // https://community.st.com/t5/stm32-mcus-embedded-software/how-to-enter-standby-or-shutdown-mode-on-stm32/m-p/145849 // https://community.st.com/t5/stm32-mcus-wireless/stm32wb55-shutdown-mode-standby-mode-wake-up-with-syswkup-pin/m-p/67480#M812 /* Enable Backup domain write */ HAL_PWR_EnableBkUpAccess(); /*Disable RTC */ CLEAR_BIT(RCC->BDCR, RCC_BDCR_RTCEN); /* Disable LSE */ CLEAR_BIT(RCC->BDCR, RCC_BDCR_LSEON); /* Disabel Backup domain write */ HAL_PWR_DisableBkUpAccess(); /* See : https://community.st.com/t5/stm32-mcus-embedded-software/how-to-enter-standby-or-shutdown-mode-on-stm32/m-p/145849 */ /* USER CODE END PWR_EnterOffMode_1 */ /** * The systick should be d
Hi, I'm using STM32G47 MCU. I'm facing problem in my system, where I have to read data from two SPI_ADC's, one after one. Both are connected in a same SPI bus, with each have separate CS pin connected to MCU. The problem is that, I want to do everything using only by DMA. No cpu intervention or no isr should be used. The steps to be done are, 1. make CS1 low, CS2 high.2. Start reading ADC1 ic, using spi_dma.3. once the read completed, make the CS1 high, and CS2 low.4. Now start reading the ADC2 ic. and repeat the process. Here the above steps should happen continuously without any software processing. The data has to be updated in the background in the buffer. The dma has to be chained in such a way that, it happens in a sequence above. I have checked some posts, they suggesting to do using timers, but i don't think it's reliable. So, kindly provide me the best suitable solution available. Thanks in advance.
Hello.I found a problem with Flash. After successfully operating with flash before entering MX_APPE_Process(), the possibility of entering standby mode disappears. I had issues with the visibility of variable values after these operations, but I could say it was successful. I used standard functions to work with Flash. Something similar to what is in the examples for STM32WB.Then I found this thread https://community.st.com/t5/stm32-mcus-wireless/stmwb55-flash-write-access-during-ble-connection/td-p/268121/page/3 where @Remi QUINTIN advised to use the Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE\BLE_RfWithFlash project, where I found a nice flash driver file.I thought this should help to extinguish all conflicts in the sequencer and allow it to go into standby mode after using flash.Below, I attach a project that has a demo of working with Flash and an algorithm for getting into standby, which was provided to me by the esteemed @FilipKremen.I did not repeat all the functiona
Hi,Any idea how I can build my touchgfx project on a CI/CD. The goal is only to verify if the simulator is still building (or it's working) Thank you
Hello.I am new to TouchGFX and have been learning it over the last few weeks. I am able to generate an application with multiple screens, and swap screen utilizing the TouchGFX designer actions & interactions. I have a screen, called Screen4, that is a testing screen to test out different iconographies:Within that Screen4 I have two actions:And two interactions:The goal of these two actions & interactions is to control the screen from application code, with the goToScreen function being utilized to notify the graphics engine to display Screen4 and the setLevel function to notify the graphics engine to update the color of all the shapes to a passed in value (0-255 on RED only). The goToScreen function works perfectly, and I am able to call it directly from my application code - - and have the screen be displayed. The setLevel command is giving me some trouble though, and here is where I think I am missing a core piece of my understanding of the grap
Hello, I am using the STM32F429I-Disc1 development board and am trying to communicate with the external adc "ADS131M06". In order to do so, it requires full duplex spi communication with 24 bit words. Our board does not have 24 bit words so instead I am using 8 bit words with DMA communication for minimal if not 0 delay between words. To test that I can properly communicate with the chip, I have set it up with CPOL=LOW, and CPHA=2 edge. I then send 0x00, 0x11, 0x00, (repeat 0x00 21 times). This is because a full communication frame includes an instruction, followed by data, followed by 6 received frames. When I send the reset command the response from the device is correct but in my memory I receive 0xFE27. Does anyone know what could cause the last bit of each word to be off? I noticed it is also random so sometimes it is correct. The device says it reads on a rising edge and writes on a falling edge, and here DIN transitions at the same edge as DOUT so maybe its that, but
Hi, I am working on configuring LoRa (E22-900M22S) and the MAX3485 transceiver to establish RS-485 communication using the STM32H753ZI. I have connected the LoRa and MAX3485 modules as per the following reference: LoRa(E22-900M22S) LoRa Pin STM32H753ZI Pin (example) MOSI PA7 (SPI1_MOSI) MISO PA6 (SPI1_MISO) SCK PA5 (SPI1_SCK) NSS PA4 (GPIO) RESET PB0 (GPIO) DIO1 PB1 (EXTI-capable GPIO) DIO2 PB2 (EXTI-capable GPIO) BUSY PB10 (GPIO input) GND GND VCC 3.3V RS-485(MAX3485) STM32H753ZI Pin MAX3485 Pin PD8 DI PD9 RO PD12 (or any GPIO with DE support) DE + RE (tied together) 3.3V VCC GND GND Could you please guide me on how to configure both LoRa and RS-485 communication using STM32CubeIDE?
Hello, I am using an STM32 Nucleo F746ZG board.I need to make an application where one board can transmit some firmware over to the second board via UART, and the second board will use it's default bootloader to read and flash that firmware.However, according to documentation I read here: https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf, on page 212, it mentions that the bootloader can only use USART1 or USART3. I cannot use USART3, since I am already using that as a VCP for debugging printf messages. Thus, I have to use USART1. However, the problem is that the USART1 pins, PA10 and PA9 pins it requires me to use, are already being used here:The PA10 pin is being used as USB_OTG_FS_ID, and the PA9 pin is being used as USB_OTG_FS_VBUS. From what I read online, I think these pins are important if I want the STM32 to communicate with my laptop right? If so, then how am I expected to use USART1 to flash firmwar
I have 3 potentiometers, one on each channel of the ADC, that vary 3V. The ADC reads the values and converts to voltage.I have not been able by reading the datasheet and looking at some examples online to figure out how to get it to work using interrupts (with DMA it works).I attach the entire project, can you kindly check it? Thanks!
Hello everyone,I'm currently working on a project using an ADS8688 ADC IC and an STM32F446RET6 microcontroller.I'm encountering an issue where I'm consistently reading random or garbage values over SPI, even when I'm applying stable input voltages to all 8 channels of the ADS8688. I've verified the input voltages with a multimeter, and they are as expected.Here's a brief overview of my setup and what I've tried so far:Hardware:ADC: Texas Instruments ADS8688 (8-channel, 16-bit, SAR ADC)MCU: STM32F446RET6 (using one of its SPI peripherals)Problem Description: When I apply known DC voltages to the input channels of the ADS8688, the data I receive over SPI from the STM32F446RET6 is not the expected digital conversion result. Instead, it appears to be random or corrupted, showing no correlation with the input voltage.What I've Checked/Tried So Far:SPI Configuration (STM32F446RET6):SPI Mode: I'm using SPI Mode 1 (CPOL=0, CPHA=1), which is typically recommended for the ADS8688.Clock Prescaler
1. Product DescriptionThe product is an automotive remote controller that uses STM32L412RB as an MCU.The product uses a rechargeable battery and has a power on/off function for storage and delivery. 2. ProblemSome products (0.2%) stop operating due to MCU Latch up during the power-on process when powering on from the power-off state.Some products stop operating after initial abnormal operation under the same conditions.The reason why the operation is judged as MCU Latch up is that when the operation stops, MCU Watchdog reset and external reset do not occur.Only when MCU VDD is turned OFF and then ON, it returns to normal. 3. Self-reviewWhen checking the voltage of the MCU's VDD in the power-off state of the product, it was confirmed that it gradually increased from 0V to 0.35V.In the power-off state, leakage current occurred due to the connection for the control of the charging circuit, which flowed to the MCU's port (PC13, PA1), causing the MCU's VDD to increase.During the s
I want to use LPTIM1 of the STM32G0x1 to wake up the MCU, if it's not already awake, and start a DMA multichannel single conversion. I think I know how to do the DMA/ADC part after getting the ADC_MultiChannelSingleConversion example running; I'll the code from that project to this one later.. But the most part is waking up. Here's the relevant part of what I have: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_LPTIM1_Init(); /* USER CODE BEGIN 2 */ /* Enable Power Clock */ __HAL_RCC_PWR_CLK_ENABLE(); RCC->IOPSMENR = 0x0000u; RCC->AHBSMENR = 0
Hi,I have two identical flight controllers from BetaFPV:https://betafpv.com/products/f405-4s-20a-toothpick-brushless-flight-controller-v5-blheli_s-icm42688?_pos=11&_sid=55080f3df&_ss=rboth using an STM32F405 MCU. I noticed that the unique device IDs (UIDs) on both are suspiciously similar. Here they are:0025001e3133510c34383739002300283133510c34383739As you can see, the last 64 bits (3133510C34383739) are exactly the same on both chips. Only the first 32 bits differ slightly.Since STM32 MCUs are supposed to have globally unique 96-bit identifiers, this seems strange. Could this be a sign that the chips are counterfeit or cloned? Or is it possible (though unlikely) that chips from the same production batch could share most of the UID?Any insight from ST or community experts would be appreciated.Thanks in advance!I bought both from the same online store, a little more than a month apart.
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.