Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I would like to know why 2 is added to the P2PNotifyServerToClientCharHdle while checking for an attribute handle match in p2p_stm.c file. Later in the same function, 1 is added to P2PWriteClientToServerCharHdle. Is there an implicit assumption made here to add 2 to a notify handle and 1 to a write characteristic handle. P2PNotifyServerToClientCharHdle is declared as uint16_t. Why add 2 to an integer for matching to Attr_Handle. static SVCCTL_EvtAckStatus_t PeerToPeer_Event_Handler(void *Event) { SVCCTL_EvtAckStatus_t return_value; hci_event_pckt *event_pckt; evt_blecore_aci *blecore_evt; aci_gatt_attribute_modified_event_rp0 * attribute_modified; P2PS_STM_App_Notification_evt_t Notification; return_value = SVCCTL_EvtNotAck; event_pckt = (hci_event_pckt *)(((hci_uart_pckt*)Event)->data); switch(event_pckt->evt) { case HCI_VENDOR_SPECIFIC_DEBUG_EVT_CODE: { blecore_evt = (evt_blecore_aci*)event_pckt->data; switch(blecore_evt
Hi everyone, I have a STM32F042F6P6 chip. I want to read 9 analog channels on it.I guess there are at least 2 options: configure a scan mode with DMA, and staying in polling mode.I decided to stay in polling mode to avoid a potential problem due to DMA config.I defined 1 adc handle and did channel configurations (8 first channels are gpios, the 9th is internal temp)It seems that when calling those 2 methods repeatedly, the ADC auto-increments and read each channel starting from the lowest ID.HAL_ADC_PollForConversionHAL_ADC_GetValue Let's say now that I want to have a method that reads only the internal temperature, how do I manage to tell to HAL_ADC_PollConversion to point on the internal temperature channel only ?I have had an idea but it is quite radical:- create other channel config structure, with only the Temp channel defined, and each time I call a conversion method, before that I call HAL_ADC_ConfigChannel with the good channel config structure.Also, I have 2 qu
Hi , I am trying to measure the output return loss ( in tx mode) of my board rf chain which include the stm32wle5.if i understnad correctly - in order to do that i need to put the STM32WLE5 in TX MODE which means its PA should be powered up and ready to transmit but without any transmitted data. ( so that i will be able to measure the Return loss using external VNA connected to the TX RF PORT of my board)is there an option to do that ? i cant seem to find a way to make the internal PA ready to transmit (powered up) without actually transmitting . is it possible to measure the output RL as i described ? thank you,viola
Hi, I'm using an STM32F746bgt6 on a custom board, and I'm using Keil.I enabled LibJpeg in CubeMX, but I can't get an RGB JPEG.I have a .jpeg file saved in flash, "frame99.jpg," which I read via littlefs. When I read it, I allocate the buffer to external SDRAM.int ReadFileSDRAM(lfs_t *lfs, const char *filename) { lfs_file_t file; int res = lfs_file_open(lfs, &file, filename, LFS_O_RDONLY); if (res < 0) { printf("Errore apertura file in lettura\n"); return -1; } lfs_soff_t size = lfs_file_size(lfs, &file); if (size <= 0 || size > SDRAM_SIZE_BYTES) { printf("File vuoto, troppo grande o errore lettura dimensione\n"); lfs_file_close(lfs, &file); return -2; } res = lfs_file_read(lfs, &file, image_buffer, size); if (res < 0) { printf("Errore lettura file errore = %d\n", res); lfs_file_close(lfs, &file); return -3; } uint16_t sample_u = 0; int16_t sample_s = 0; image_size1 = size; while (image_size1 > 0 && image_buf
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.i am trying to read the jedec id from the MT25TL512HBA8E12-0AAT TR using stm32h750xbh6 with qspii configured qspi using mx like follows:hqspi.Instance = QUADSPI; hqspi.Init.ClockPrescaler = 1; hqspi.Init.FifoThreshold = 4; hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE; hqspi.Init.FlashSize = 25; hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_6_CYCLE; hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0; hqspi.Init.DualFlash = QSPI_DUALFLASH_ENABLE; i configured the clock using rcc enabled hse and lse and finally giving the clock for qspi around 50mhz the function im using to read is the below one static HAL_StatusTypeDef QSPI_ReadID_3B(QSPI_HandleTypeDef *hq, uint8_t id[3]) { QSPI_CommandTypeDef c = {0}; c.InstructionMode = QSPI_INSTRUCTION_1_LINE; c.Instruction = 0x9F; /
Hello Community,I’m facing an issue with Pin PC15 on my board. I am unable to configure or use it as a GPIO, either as input or output. I’ve tried basic initialization, but it doesn’t seem to respond as expected.Has anyone experienced a similar issue with PC15, or is there a special configuration/limitation I should be aware of? Any guidance or suggestions would be greatly appreciated.Thank you in advance!Clock Configuration:LSI at 32 KHzHCLK at 86 MHz
Hello,I have made a custom STM32F412 board, intended for safety applications within various types of machinery.I have completed the hardware and I am now working on the software, which I need some help to organize correctly.Since all applications running on the board are safety related, most of the software is not related to the actual application (type of machinery) being operated.Rather, the majority of the code is running various monitoring and diagnostics routines to ensure that both hardware and software functions as intended; e.g. timing constraints on code execution, monitoring of RAM and Flash memory, etc.All of this "system monitoring" is maintained by me, and must be certified independently. It must not be modified, accidentally or intentionally, by the programmers that subsequently write the code for the specific applications running on top of the system monitoring.For that matter, I would like to statically compile everything, including peripheral configuration, interrupt r
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. in STM32U073MCT6 microcontrollers, I have a problem which is like this;in main.c I have while (1) { /* USER CODE END WHILE */ HAL_GPIO_WritePin(ioOUT_DISP_A_GPIO_Port, ioOUT_DISP_A_Pin, 1); /* USER CODE BEGIN 3 */ } and my led is blinked which is high 3.3 vhowever, whenever I enable freertos, led is 0 vwhat should I do?
I followed the setup shown in this video: https://youtu.be/PG50MuFv4KQ?si=daLbNu_JcL2b3U4Q to configure the hardware, but there is no display at all. Could you please tell me why?
Hello,we are experiencing RAM corruption when running an application in external RAM when setting a breakpoint while debugging.The issue can be reproduced using following configuration:1. Open example STM32Cube_FW_H7RS_V1.1.0\Project\STM32H7S78-DK\Templates\Template_LRUN\STM32CubeIDE\Boot\.cproject in STM32CubeIDE 1.15.0(import both Boot and Appli when asked)2. Build the Template_LRUN_Boot-Project and start it to download the bootloader to internal flash3. Exchange the main.c of the Template_LRUN_Appli with the attached main.c and build the application4. Use STM32CubeProgrammer to download Appli/Debug/Template_LRUN_Appli.bin to location 0x70000000(Connect to STM32H7S78-DK board, click '+' , Open File and select Template_LRUN_Appli.bin, Click Download-Arrow-Down and enter 0x70000000 as Address and Enter to download the Applikation)5. Reset the board - the Led LD1 should be blinking in 1 second interval 6. Attach the debugger to the running application by right-clicking on Temp
Hi, where can I find a working One-Wire protocol? Is there an example provided by STM? I wrote code for a program to detect the temperature from a DS18B20 sensor, but I can’t detect the sensor, even though the debug shows everything is fine. Can someone help me? Thanks
Hi all,I am experimenting with H7 ADC (after having tried the G4 ADC).I see in the HAL that the calibration, HAL_ADCEx_Calibration_Start(), for H7 MCU wants a parameter more than G4. One should specify ADC_CALIB_OFFSET or ADC_CALIB_OFFSET_LINEARITY.I am confused, and reading the datasheet does not help me. Can't understand the difference between the two methods.Should I use ADC_CALIB_OFFSET or ADC_CALIB_OFFSET_LINEARITY, when calling the calibration_start()?Or should I call the calibration *twice*, one for each option?TY,linuxfan
I am trying to write a .bat script to reliably flash my combined sbsfu and application binary to a stm32h755. set cube_programmer_cli="C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" set fw_bin="combined_sbsfu_cm7_cm4.bin" set fw_base=0x08000000 if not exist %fw_bin% ( echo Firmware binary not found. Exiting exit /b) if not exist %cube_programmer_cli% ( echo Cube Programmer CLI not found. Exiting exit /b) @REM Load the combined binary echo Installing combined_sbsfu_cm7_cm4.bin %cube_programmer_cli% -c port=SWD -w %fw_bin% %fw_base% %cube_programmer_cli% -c port=SWD -ob displ echo Setting option bytes... echo Setting WRP protection... @REM Ensures the bootloader application is under write protection @REM 0 is protected, 1 is unprotected %cube_programmer_cli% -c port=SWD -ob nWRP0=0 echo Disabling CM4 boot and SWAP_BANK... @REM Swap bank is unset by default but it is explicitly checked in the bootloader so disabled here %cub
Hello,Is there any way i can estimate the Rotor Electrical Angle or Mechanical Angle of a BLDC Motor using sensor-less 6-Step Algorithm in STM Motor Control Workbench.I have tried of using Virtual Position & Feedback but i don't know how to use it as it's .c file is not included in the project.So, it would be great if i can know how to estimate angle!! Thanks!!
Hello,I am using the VENC_USB example from the STM32N6570-DK repository.The example enumerates correctly as a UVC device — I can see the device in Windows Device Manager without any issues.The descriptors in the example are configured for H.264 format only.When I run the demo, the stream is visible in ffplay (so the encoder and USB transfers seem to be working).However, the video is not visible in Windows Camera or VLC. Both detect the device, but no image is shown.My Questions:1.Why is the image visible only in ffplay but not in Windows Camera or VLC?2.What changes need to be made in the UVC descriptors or stream configuration to allow Windows Camera and VLC to properly display the H.264 encoded stream?
Hi everyone,How can I use the LwIP stack to enable Ethernet on the STM32N6 board? I found a tutorial, but it was for the H5 series. Additionally, I couldn't find the LwIP middleware component in the STM32CubeN6 folder.Thanks in advance!
I saw a strange behavior when using STM32F401RBTx, to show you I added only 1 output as LED and toggled it. I have just that much code. I tried with 16 MHz, 48 MHz, 64 MHz, 84 MHz. It went hard fault when speed is 64 MHz or 84 MHz. This is the clock setting which calculated by STM32CubeIDE. It goes inside of HAL_RCC_ClockConfig function and can't go beyond HAL_InitTick function. When I put breakpoint inside HAL_InitTick I could delay hard fault little bit and saw below callstack. I tried this with 2 microcontrollers and same thing was happening. How can I solve this? Thank you.
Hi,I am working with an STM32F769 MCU driving a 480×272 RGB565 TFT display through LTDC.Architecture:Framebuffer in external SDRAM (IS42S16800F-7TL, 16 MB) connected via FMC.LTDC + DMA2D used for graphics update (TouchGFX).I²C + DMA used to read/write parameters on an external FRAM.System managed with FreeRTOS.Problem:When a long I²C DMA transfer is running (FRAM read/write for parameter storage), I see horizontal glitches on the display: objects temporarily shift to the right (as if some pixels were missing).The curious part is that the phenomenon only happens if I change the initialization sequence in main() from this: MX_LTDC_Init(); HAL_Delay(1000); // avoid flickering on display MX_TouchGFX_Init(); HAL_Delay(200); // avoid flickering on display osKernelInitialize();…to this:MX_LTDC_Init(); HAL_Delay(1000); // avoid flickering on display MX_TouchGFX_Init(); HAL_Delay(200); // avoid flickering on display __NOP(); // added __NOP(); // added osKernelInitialize();adding only
Goodmorning,I am using STM32L552RCT6 in my design that I intend to use through a USB interface.I'm trying to implement the VBUS sense (compulsory since my device will be self-powered). I have read AN4879, and it's clear to me that I have to add a voltage divider to avoid the situation where I provide 5V to the MCU while it's not powered. The values recommend from AN4879 makes perfect sense too.However, I checked the schematics of the NUCLEO-L55ZE-Q, and the values of the resistor there are very much different!Can anyone explain to me why there is this discrepancy and which one I should follow?Thanks!
Hi EveryoneGreetingsWe are using an STM32U585 MCU and need to maintain a log of about 200 KB using FileX. Once the 200 KB storage is full, I don’t want LevelX to reclaim the entire file and erase it. Instead, I need the log to behave like a circular buffer, where only the oldest block of log data is erased and overwritten with new data. How this requirement can be achieved. For this requirement how much size shall be allocated by fileX(im using an external flash of 8MB).Thanks and Regards Philip
Hi all, We are using a STM32WB5MMG uC in one of our products and we just happened to see in its datasheet that the secondary crystal frequency is 32.774 kHz, instead of the common 32.768 kHz, is that right?We are using the internal RTC clocked by the LSE to keep real time in the device and thus we would like to have the least amount of drift, within the crystal manufacturing tolerance.If that is the case, then I understand a soft calibration of the RTC is needed to account for the +183 ppm with respect to the 32.768 kHz, correct?By the way, our project is based on the SBSFU+SecureBin+BLE OTA demo project. Is it possible that these already compensate for that? Thank you all
Hi ST expertI'm ready to use STM32G473CBUx now. According to the datasheet, the STM32G473CBUx does not have an analog ground VSSA, only a ground VSS. I have questions:1. The analog input of the internal ADC/DAC is referenced to the chip's VSS, or has STM32G473CBUx internally partitioned an analog ground? 2. When I design the schematic, is the analog power VDDA referenced to VSS?
Hello everyone! Recently, I have been developing a firmware product based on STM32H750, using FreeRTOS and LwIP. Because the application scenarios for this product frequently involve large volumes of broadcase messages, while the product's own communication does not use broadcast at all. So I enable the ETH MAC filter to detect and drop the broadcast frame by hardware itself, which means reducing the processing load on LwIP. However, after that I discovery a problem, which is that the hardware also drop ARP broadcast request too! Just because the destination mac address filed in ARP broadcast request is FF:FF:FF:FF:FF:FF. The result is that many functions relying ARP have been affected, such as ICMP, UDP unicast, TCP client etc. In these functions, if the remote host's ARP cache does not contain the hardware's IP and MAC addresses, ARP broadcast requests and responses must be used. In the datasheet RM0433, I found a bit called ARPEN(bit 31) in the ETH_MACC
Hello,I want to create my own bootloader for STM32L4xxx, but I can't find any documentation explaining how the binary file generated during compilation on STM32CubeIDE is formatted.I have a rough idea of how it's done, but I would like to have documentation that clarifies its formatting si I can decode it.Do you know where I can find this documentation, please?
Each time I enable SPI, it works fine.However, whenever I include USART, SPI freezes, and this issue affects multiple chips I've tested.SPI and USART both work well individually.The problem seems to stem from CubeMX, which doesn't generate the code correctly.Coding directly in Keil or CubeIDE might solve the issue, but it's time-consuming—which is exactly why we use CubeMX in the first place.Does anyone know if this could be a simple issue, like an interrupt conflict or shared resource problem?I looked at bunch of options like making sure the interrupt priority for USART and SPI is different.Making sure SPI does not kick in while USART (DMA) is still processing data, ectIt's definitely a CubeMX code generation issue.Any suggestions on how to make SPI and USART work together?
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.