Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
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 Issue:I'm using STM32H742, and I'm currently using timer3 (TIM3) to give a signal over CLK 50MHz to PC4 pins.However, when the code is written as follows, the period is not increasing beyond 680 kHz.The pin frequency speed is also set to VERY_HIGH. The system clock is set to 480 MHz, and the AHB and APB Timer CLOCK are also set to a maximum of 240 MHz.When you adjust the prescaler, period, and pulse values of the TimerIt has been confirmed that the period increases gradually up to prescaler = 0, period = 99, and pulse = 51, but as the period decreases gradually, the cycle change of PC4 is not large and the value decreases.In this case, prescaler = 0, period = 99, pulse = 51, one cycle of PC4 is 680 kHz.And when I toggle PC4 from the callback function, it doesn't come out as a cyc
Heyho,just checking the L162 for a new project, then found that the ADC can only be clocked by the HSI.Is that correct?If yes, why?My experience with HSI (and other RC-oscillators) is that it is "mediocre" at best, rather inaccurate and jitters like crazy. Although this might not be a big issue with a 12-bit ADC.Merci!
Hello.I developed a Screen with TouchGFX Designer 4.24.2.In this Screen I put a ScrollList.Is there a way to force the ScrollList to scroll at specific item position ? For example I want to force ScrollList to scroll at the item position that has index = 20 ... is there a way ? Thankyou in advance.
Dear esteemed members,I am designing a Bluetooth based small headset kind of application, which will be capable ofreceiving audio stream, streamed through a device like mobile or any other.also need to control few GPIO with mobile, command will be sent over Bluetooth.also looking for Broadcast mode, so that multiple such headset will be receiving the same stream in future designs.Kindly let me know about the sameWarm RegardsPreet
Hello,I’m working on a project with the STM32WB55 where I use BLE (which is working fine) and also want to use the RTC Calendar. The project was generated with STM32CubeMX, RTC is using LSE.The problem:The RTC calendar runs, but its time counting is incorrect.Instead of incrementing one minute (60 seconds), it only increments 4 seconds per minute.What I tried:In app_conf.h, in the section with RTC-related macros, I modified CFG_RTCCLK_DIVIDER_CONF to different values (16, 8), but the issue remains the same.In main.cpp, during RTC initialisation:hrtc.Init.AsynchPrediv = CFG_RTC_ASYNCH_PRESCALER; hrtc.Init.SynchPrediv = CFG_RTC_SYNCH_PRESCALER;I tried replacing these macros with explicit values (i.e. 127 and 255 which works on STM32L4), but the result did not change. Has anyone experienced this before on STM32WB55? Any guidance or hints would be greatly appreciated.
I am using STM32H723 and have implemented WWDG. Below is my configuration: Are there possibility that when the system resets due to watchdog it would not trigger its ISR.
..
I have implemented custom external flash loader using IAR workbench framework for STM32H750IBK6 and flash device IS25LP512M-JLLE. I am seeing my basic flash commands like read status, write enable are failing. if I use the same commands in my own test framework they are working fine, so my question is when using IAR framework for flash loader development what are the preconditions to follow.
We have implemented a total of five push buttons—two connected to Port E and three connected to Port M. The GPIOs of Port E are functioning correctly. However, the GPIOs of the push buttons on Port M are not being detected properly by the MCU.Even when the switches are unpressed, the MCU is detecting a Pressed condition.PORT M GPIO Pin out: PM1, PM2, PM3.MCU part: #STM32H7R7L8H6HI have checked push button from hardware side, its working fine.Attached example schematic snapshot of push button. Could you please advise if there are any specific settings or configurations required for Port M GPIO to function correctly?@Shubham Prakashpant BOHARAPI @Shailesh Patil @Krishan Kumar SOLANKI
I am using STM32L476JE. I wish to use STL api to test 128kb of RAM as startup test for my device. I have come across some example codes but there seems to be confusion around the subsets.If possible can you share an example code snippet for the same.I have some doubts listed below:1. Which method will be efficient to test 128 kb (since memory is large), is it advisable to use NumSectionsAtomic as 8 (which usually is kept 1 meaning 1 section (128 bytes) is tested at one go) 2. How exactly does STL_SCH_RunRamTM run?3. Which one is correct? RamSubset.EndAddr = TEST_RAM_START_ADDR + RAM_NUMBER_OF_SECTIONS * RAM_SECTION_SIZE - 1; OR RamSubset.EndAddr = TEST_RAM_START_ADDR + RAM_NUMBER_OF_SECTIONS * RAM_SECTION_SIZE;4. Which is the best way to test such large memory with STL?
I am trying to run some basic tests on the STM32H7S78-DK discovery board.I am having some trouble properly initializing the PSRAM (is this info available somewhere, what are the right settings?)PSRAM is clocked at 200MHz, i copied settings from the available examples/bspI am having random errors, it looks like that sometimes the write is not executedMost of the time like 99.99% of the case, everything works fine, but sometimes i read old data from the PSRAM, this mostly happens with 16 or 8 bit r/w but rarely also with 32 bit r/wI have a test that writes the whole ram with some pattern then verifies it.This happens in all combination of cache settings, but cache settings have a significant impact on the frequency of these errors (not clear why).i'm logging the result, it looks something like this:T32 for pattern 0fc52bc8 0 diff T16 for pattern 00007118 0 diff T8 for pattern 000000bb 0 diff T32 for pattern 4fa30e48 0 diff T16 for pattern 00005498 0 diff T8 for pattern 0000003b 0 diff T3
I can't find any example schematics for the stm32wba65ciWhere could I find them?
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 All, I’m developing a custom BLE Central + Zigbee Coordinator application, and I’ve implemented all the required functionalities. Initially, I tested everything on the STM32WB55 Nucleo board, and both BLE and Zigbee worked perfectly. However, after migrating the same application to my custom hardware, I’m facing an issue specifically with BLE connections. I can successfully scan and see BLE advertising packets from nearby devices. When I attempt to connect to a BLE smart relay/smart plug, I receive a Connection Complete Event (Success), but immediately afterwards I get a Disconnection Event with reason code 0x3E. Zigbee still works fine — I can connect Zigbee end devices into my network without any issue. So the surprising part is: On the Nucleo board → BLE and Zigbe
Hello,I am writing & erasing flash during operation, and this seems to cause a bus stall which prohibits all execution from flash during these operations.AN4808 seems to indicate that if you use a dual-bank device you can avoid this by executing out of one bank and writing/erasing out of the other. I have tried this, and still seem to experience the bus stall even when running out of Bank 1 and doing write/erase out of Bank 2.Does it make sense that this still causes a bus stall? Are there other ways around it?I think perhaps the only solution is to copy my program to RAM and execute from there. Does anyone have examples of how to do this on an STM32 device?Thank you!
Hi,I made a custom board with a STM32WL5MOC module and I want to test LoRaWAN connectivity. How to get a blank example for testing LoRa? I try to use the End_Node example of the B-WL5M-SUBG1 board, but it requires some environmental sensors to be initialize and the microcontroller goes to hard fault.Thanks.
File: stm32u0xx_hal_gpio.c/** * @brief Lock GPIO Pins configuration registers. * @note The locked registers are GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR, * GPIOx_PUPDR, GPIOx_AFRL and GPIOx_AFRH. * @note The configuration of the locked GPIO pins can no longer be modified * until the next reset. * @PAram GPIOx where x can be (A..F) to select the GPIO peripheral for STM32U0xx family * @PAram GPIO_Pin specifies the port bits to be locked. * This parameter can be any combination of GPIO_Pin_x where x can be (0..15). * @retval None */ HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) {HAL_GPIO_LockPin() should return HAL_StatusTypeDef.But in Doxygen None
Hi everyone :waving_hand:,I’m currently working on a bare-metal project using the STM32F4 Discovery (Disc1) board and developing my code purely with CMSIS header files (no HAL or CubeMX).I wanted to check if this board has any onboard MEMS sensors (like accelerometer or gyroscope) — similar to what some older STM32 Discovery boards include.If a MEMS sensor is present:What is the exact sensor part number?Which communication interface does it use (I2C/SPI)?Are there any reference manuals or example register-level code available to initialize and read data using CMSIS?If not available, could you suggest a good external MEMS sensor (like MPU6050 or LIS3DH) that works well with STM32F4 boards for motion or tilt detection?My goal is to implement tilt or motion detection completely in bare-metal C without HAL drivers.Any guidance, datasheets, or example code snippets would be really appreciated :folded_hands:Thanks in advance!
Hello,I’m trying to setup the PSSI interface on the STM32H523RETx to transmit data. I cannot find how is the PSSI_PDCK configure. Neither in the clock tree nor in the RCC register the PSSI clock can be configured (except for enabling it). In RM0481 table 305 the AHB clock is listed for PSSI_HCLK, but how is PSSI_PDCK generated?Is it not possible to internally generate the clock? How is the requirement of AHB clock must be at least 2.5x PSSI_PDCK achieved?In CubeMX (v6.14.1) I also couldn’t find any parameters for the PSSI clock.Thanks!
Hello everyone, I need help with a DSI + LTDC configuration.I'm working on a custom board with an STM32H747BIT and trying to drive a 720x1280 RGB888 display without GRAM, using the ILI9881C controller via DSIHOST + LTDC.Here’s the situation:I’m currently testing at 500 Mbps per DSI lane (i.e., 62.5 MHz per lane, 2 lanes total) and 50 MHz LTDC pixel clock.The built-in test pattern works fine, but when I try to draw using the framebuffer, the image is misaligned, sometimes flickers, and the drawing coordinates are not correct.For example, when I try to draw two horizontal bands, the first one appears larger than expected.I suspect it’s related to timing parameters like HSA, HBP, HFP, VSA, VBP, VFP – but the datasheet for the display doesn't provide them.Observations and questions:To get the correct colors, I had to set ARGB8888 in LTDC, even though the display is RGB888.Without the missing timing values, I can’t estimate the frame rate or configure DSI properly — I’m stuck.Is there a rel
Hello everyone In my application using an STM32H7, I noticed that the VBAT pin, with VDD off, draws 1.9 mA. This is excessive current draw.I'm using a CR2032 battery in series with a 100R battery connected to the microcontroller's VBAT pin.What could be the cause?Is there any way to understand why it's drawing so much current?NB: The datasheet states that the RTC draws 225 nA at 1.2 V, including the LSE's power consumption. Thanks
Hello, I’m facing an issue with the STM32WLE5JC controller after flash programming. After programming, the controller does not automatically reset. It only starts working after manually turning the power OFF and ON. In these cases, I've observed the following: Sometimes the controller enters an idle or hang state. When the watchdog timer expires, instead of resetting, the controller stays in idle. After a manual power cycle, the controller works as expected. It seems the issue occurs specifically when the automatic reset after programming does not happen. Any insights or suggestions on this would be greatly appreciated.
I'm currently using single 16-bit ADC, my requirement is to have ADC conversion error less than 1mV.I'm using the ADC with DMA. I'm a beginner, currently getting 1-2mV error and it is not constant too. #define SCALE (3300.0f/65535.0f) uint16_t adc_val = 0; uint16_t ADC_ARR[5]; void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc){ adc_val = ADC_ARR[0]*SCALE; } HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED); HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC_ARR,1); Also the ADC clock is derived from HSI
L562 processor. SPI1. Blocking mode. Two sequential writes, second write variably returns error.code:// uses CS if USE_CS is set to CS_ACTIVE (default) // CS is not used if USE_CS is set to CS_INACTIVE uint32_t HAL_SPI::Send( uint8_t* cmdptr, uint32_t cmd_count, uint8_t* dataptr, uint32_t data_count, bool USE_CS, enum SPI_TRANSFER_MODE Override) { enum SPI_TRANSFER_MODE NEW_mode = OUT_mode; int error_code; // int old_divisor; // ********************************** check input parameters*********************************** // need to check overrides switch (Override) { case SPI_DMA: // TRANSMIT IS DMA FROM BUFFER, RECEIVE IS IRQ QUEUE (MAY CHANGE) case SPI_IRQ: // TRANSMIT IS IRQ DRIVEN case SPI_BLOCKING: // TRANSMIT AND RECEIVE ARE BYTE BLOCKING { NEW_mode = Override; break; } default: { NEW_mode = OUT_mode; // leave mode as is, cannot override } } switch (NEW_mode) { case
Hi~ NUCLEO H563ZI USART GPDMA channel6 not received buffer. static void MX_USART6_UART_Init(void) /* GPDMA2_REQUEST_USART6_RX Init */ NodeConfig.DestAllocatedPort = LL_DMA_DEST_ALLOCATED_PORT1; NodeConfig.DestHWordExchange = LL_DMA_DEST_HALFWORD_PRESERVE; NodeConfig.DestByteExchange = LL_DMA_DEST_BYTE_PRESERVE; NodeConfig.DestBurstLength = 1; NodeConfig.DestIncMode = LL_DMA_DEST_INCREMENT; NodeConfig.DestDataWidth = LL_DMA_DEST_DATAWIDTH_BYTE; NodeConfig.SrcAllocatedPort = LL_DMA_SRC_ALLOCATED_PORT0; NodeConfig.SrcByteExchange = LL_DMA_SRC_BYTE_PRESERVE; NodeConfig.DataAlignment = LL_DMA_DATA_ALIGN_ZEROPADD; NodeConfig.SrcBurstLength = 1; NodeConfig.SrcIncMode = LL_DMA_SRC_FIXED; NodeConfig.SrcDataWidth = LL_DMA_SRC_DATAWIDTH_BYTE; NodeConfig.TransferEventMode = LL_DMA_TCEM_LAST_LLITEM_TRANSFER; NodeConfig.Mode = LL_DMA_NORMAL; NodeConfig.TriggerPolarity = LL_DMA_TRIG_POLARITY_MASKED; NodeConfig.BlkHWRequest = LL_DMA_HWREQUEST_SINGLEBURST; NodeConfig.Directio
Hello everybody! I recently started experiencing weird, unstable behavior during debug on my Nucleo u575zi-q board. So, I don't use HAL, or any graphic programming, or any API, doing everything in pure C from scratch. The IDE I use is, of course, the STM32 CUBE. It is the Mac version, 1.19.0. When my project was simple, everything was okay; the ST-LINK debug worked great. At some point, though, the debug became unstable. Sometimes the debug freezes, but more often it somehow ends up doing more strange things. For example, I have an RTC module in my project, and in the code, I wait for the RSF flag:while(!(RTC->ICSR & RTC_ICSR_RSF)){};When I download the code to my NUCLEO board and run it, everything is fine. But when I debug the same code, press the "run" button, the debug gets frozen on waiting for this flag to be set, and it seems that the flag, for some reason, never sets! So the debug doesn't work. I turn off the debug session, and the code runs well again! Sometimes the boa
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.