Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi, I am trying to create the I2C communication using the format used from the company seller of the device.I have to follow these steps:I2CReadFunciton ( uint8_t slAddr, uint8_t* wrData, int wrLen, uint8_t* rdData, int rdLen Initiate the bus by issuing a START condition.If there are bytes to write (wrLen > 0):Address the target device with its slave address in write mode.Transmit the wrLen bytes contained in wrData.Without releasing the bus (i.e., do not send a STOP), issue a REPEATED START to transition into the read phase.Begin the read phase:Address the same device with its slave address in read mode.Receive rdLen bytes, storing them sequentially into rdData.Terminate the transaction with a STOP condition.Key constraints:If a write phase occurs, it must be immediately followed by a repeated start—no STOP is allowed between the write and the subsequent read.The read always occurs after either the initial START (if no write) or the repeated START (if a write was performed).&n
Hi everyone, I’m working on CAN communication using STM32F746 in STM32CubeIDE.My goal is to transmit CAN frames continuously and verify them using BusMaster or PEAK CAN analyzer,but I’m not seeing any CAN frames on the bus. To help review my setup, I have attached my project ZIP file below.Could someone please check and confirm: If my CAN clock configuration is correct Whether the CAN2 TX/RX pins are configured with the right alternate functions If my main.c code for CAN initialization and transmission looks correct Whether I need any filter configuration even if I only want to transmit Setup details: Controller: STM32H746 Interface: CAN1 Mode: Normal Baud rate: 500 kbps TX/RX Pins: [PD0/PD1] Using HAL driversCan you please check with my project and help me out .
Hello,I'm trying to implement a usb cdc device on a stm32WBA65RI-DK1 board but seems like the only usb otg supported is the usb st-link port CN6 that supports USB_OTG_HS. Using cube mx, Im trying to configure that usb as device with the vbus enable, to force that usb port to be powered through the usb, but the MX is not letting me do such thing. Can someone explain why I'm not able to enable it?I wanted to ask if the CN5 connector could be enabled as USB_OTG_FS, although I dont see anything about that in the board manual nor in the mx.Thanks in advance.Best regards,Rares
Hi everyone, I'm experiencing a very frustrating issue with TouchGFX Designer version 4.25.0. Whenever I click "Generate Code", the process hangs for several minutes (up to 5 minutes) at the step:make -f simulator/gcc/Makefile assets -j8. This used to work quickly in the past with the same version on the same PC, but the issue suddenly started recently without any apparent changes.I'm running Windows 11, and this problem affects all projects, even the official TouchGFX examples. Here’s what I’ve tried so far (none of which helped): Disabled antivirus and security software completely Completly remove and reinstall TouchGFX Designer Run the Make command manually from the TouchGFX environment terminal – the issue presist Tested the same project on another (slower) PC – and it works fine there I use TouchGFX on a daily basis, so this issue is really slowing down my workflow. Has anyone else experienced this?Any advice would be highly appreciated! Best regards,Jure
Hi I am working on an STM32U585 microcontroller with TrustZone enabled and I need to update the RTC time with the HAL_RTC_SetTime function. During the execution of that function, the linestatus = RTC_EnterInitMode(hrtc); //stm32u5xx_hal_rtc.creturns HAL_TIMEOUT, so I am unable to update the RTC values. I have attached several screenshots that show the microcontroller configuration The Project Manager generates both MX_RTC_Init functions for the Secure and NonSecure zones. The main files of both Secure and NonSecure zone execute the MX_RTC_Init function without any errors, the software starts up correctly, but at some point I am not able to set the RTC Time. Upon debugging, I noticed that during the execution of RTC_EnterInitMode, the lineSET_BIT(RTC->ICSR, RTC_ICSR_INIT);does not set the INIT bit, which remains at 0. Thank you in advance for your support. Please let me know if you need any further information.Best regards,Eros
I've been following the tutorial for the P-Nucleo-WB55 Nucleoboard (https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_STM32CubeMX#Pinout_and_IP_configuration)However, when I get to the section 6.1 UART1 USART1 pinout definition, I can't complete it as it is greyed out and it won't let me activate UART1. When I place my cursor over it I get the following information that it is not available IP under HPI BSP driver controlI can't find anything online, and I've checked the tutorial steps again.When I set up the project, I enabled all the default options that it asked for.Thanks for any help
Hello @Jocelyn RICARD ,I’m integrating SBSFU v2.7.0 on an STM32WB55 to enable secure OTA firmware updates. I’m hitting a problem where the runtime hash verification fails: the hash computed by SBSFU at boot does not match the hash in the image header, so the image is erased.I dump the decrypted bytes in RAM (before programming) over LPUART and convert them to a binary for comparison with the build output. Assuming the dump/conversion are correct, the streams match up to ~60 KiB, then diverge consistently until the end of the file. This suggests the symmetric key is correct and the early pipeline is fine, but later bytes are corrupted before or during the decrypt-in-place / program sequence.Here is how printing every decrypted chunk within DecryptImageInPlace function:For context, I'm using:Internal MCU flashSingle-bank (no swap/rollback)OTA via ST BLE Sensor appProtections temporarily disabled for debugging; verbose logs enabledWhat worksRan 1_Image example on NUCLEO-WB55RG succes
I remember some other RM suffering from this in the past.JW
Heyho,where can I find the specs for STM32 Audio Sample Rate Conversion libraries ?I mean some hard specs like SNR & THD, as can be found in any hardware SRC datasheet.Merci!
Hello everyone, I’m programming a B-U585I-IOT02A board. My goal is to capture audio through the integrated microphone at a sampling rate of 44 kHz and then analyze it using callbacks. I’m using the example provided by ST Electronics, the BSP, from which I use the audio functions, specifically:BSP_AUDIO_IN_Record(0, (uint8_t*) RecBuff, RECBUFF_SIZE*2); First, I initialize the structure like this: BSP_AUDIO_Init_t AudioInit;/* Select device depending on the Instance */AudioInit.Device = AUDIO_IN_DEVICE_DIGITAL_MIC1;AudioInit.SampleRate = AUDIO_FREQUENCY_44K;AudioInit.BitsPerSample = AUDIO_RESOLUTION_16B;AudioInit.ChannelsNbr = 1; AudioInit.Volume = 50; /* Not used */if (BSP_AUDIO_IN_Init(0, &AudioInit) != BSP_ERROR_NONE) { Error_Handler();} The issue I’m facing is: when I use a RecBuff (of type uint16_t) with a length of 44100, I get a callback every 250 milliseconds instead of every second.However, with a sampling rate of 11 kHz and a RecBuff length of 11000, I ge
As reported here, this is obviously incorrect.Also, this has been already reported by Uwe Bonnes for 'F411/RM0383, which has indeed been corrected in the registers description, but the GPIO register map still contains the incorrect value. So, could ST please go through all low-end 'F4 RM and check/correct at both places where applicable?Thanks,JW@Amel NASRI @Uwe Bonnes
Hello,I am not sure if this is the right place to report a documentation errors!There is a typo in Table 11 in page 99. The address should be 0x0803 F000
Hi,I’m using an STM32L412RB where the USB DM/DP lines are already configured as a Virtual COM Port (USB CDC device).Now I want to communicate with an RS485 bus without changing the existing board hardware.My idea is to build a small adapter board that connects the STM32 USB DM/DP pins to an external USB-to-RS485 converter (which has DM and DP lines).Is it possible to design such an adapter to convert the STM32’s USB VCP interface to RS485?Can the STM32 (configured as a USB device) send and receive RS485 data through this path:STM32 (USB CDC Device) → USB DM/DP → USB-to-RS485 Converter → RS485 BusAny guidance or reference designs would be helpful.Thanks,Sujith
Hi. I used steval-ipm15b and nucleo-g431 to run a pmsm motor. when I see the current waves in the motor pilot or osciloscope, they are not sinus-shaped waves. can anyone help me what is the problem and what should I do?
Hi everyone. I am driving a Neopixel LED with a PWM signal in DMA mode using a timer. Even though all variables are the same, my code works with timer 3, but the same code doesn't work with timer 2 with the same timer configuration. Why could this be? I checked for a 16-32 bit difference, but they say it's not related to that. I have an STM32G431 Nucleo board. I tried all pin configurations for timer 2 channel 1, but it didn't work. İf it's normally and ı cant use this for neopixel, I will change timer but I use other timers for different jobs with different frequences. But ı dont thinks so.
Good evening.1) Can I public my personal project on the Github, with the source code which has been generated in the TouchGFX Designer (like a template project or example)? Are there any licensing issues with it?2) Can I use the GPL-v3.0 license for my project?
Hy,I have tried to resample a 16bit/8kHz audio signal to 16kHz and 48kHz.Conversion works, but the audio is noisy. I am tested it on development board STM32H747 CM7 core.I have tried libraries: SRC236_CM7_GCC.a and SRC236HQ_CM7_GCC.a without quality improvement.I am working with 10ms blocks.Initialization parameters are: // conversion from 8kHz to 16kHz src236_static_param_t src236_static_param.src_mode = SRC236_RATIO_2; // library initialization src_error = src236_reset(PSrc236PersistentMem_ToCodecOut, PSrcScratchMem_ToCodecOut); if (src_error != SRC236_ERROR_NONE) { return (-1); //error AUDIO_ERROR_SRC } /* SRC236 effect static parameters setting */ src_error = src236_setParam(&src236_static_param, PSrc236PersistentMem_ToCodecOut); if (src_error != SRC236_ERROR_NONE) { return (-1); //error AUDIO_ERROR_SRC } // 8kHz, 16 bit audio input // 10ms block LowRateConversionBuff_ToCodecOut.nb_channels = 1; LowRateConversionBuff_ToCodecOut.nb_bytes_per_Sample = 2; LowRateConv
I'm experiencing a configuration incompatibility between SAI1 and GPDMA1 on STM32N657 when using FreeRTOS with D-Cache enabled. The SAI/GPDMA configuration works individually but fails when used together, specifically related to D-Cache coherency issues.Hardware ConfigurationMCU: STM32N657X0HXQ (Cortex-M55 with cache) [Nucleo board]Audio: SAI1 Block B in Master RX mode, I2S format, 16kHz, 24-bitDMA: GPDMA1 Channel 0 in LinkedList Circular modeRTOS: FreeRTOS with both I-Cache and D-Cache enabledThese are the SAI and GPDMA configurations:static void MX_SAI1_Init(void) { hsai_BlockB1.Instance = SAI1_Block_B; hsai_BlockB1.Init.AudioMode = SAI_MODEMASTER_RX; hsai_BlockB1.Init.Synchro = SAI_ASYNCHRONOUS; hsai_BlockB1.Init.OutputDrive = SAI_OUTPUTDRIVE_DISABLE; hsai_BlockB1.Init.NoDivider = SAI_MASTERDIVIDER_DISABLE; hsai_BlockB1.Init.FIFOThreshold = SAI_FIFOTHRESHOLD_EMPTY; hsai_BlockB1.Init.SynchroExt = SAI_SYNCEXT_DISABLE; hsai_BlockB1.Init.MckOutput = SAI_MCK_OUTPUT_DISABLE; hsai
Hello everyone,I am working with the STM32H7B3-DK and evaluating the SBSFU package with a dual image slot configuration using SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256. I have a few questions and kindly request your guidance:Please confirm if we can load sbsfu.bin or sbsfu.out via USART with BOOT0 = 1 and then program UserApp.sfb via the secure bootloader (BOOT0 = 0). Do we need a header bin? If yes, how can we merge only sbsfu.bin and the header bin while excluding UserApp.bin?With RDP Level 2 set, is it still possible to update UserApp.sfb via USART when BOOT0 = 0?Can SFU_SECURE_USER_PROTECT_ENABLE be enabled or disabled during development, and can reprogramming still be done via USART or SWD outside development mode?During development, can we disable all security IPs, load sbsfu_userapp.bin, and later enable protections over USART followed by a power cycle? Is this workflow possible?If RDP Level 1 is configured, can option bytes and protections (PCROP, secure user area) be reset v
Hello,I’m working on STM32H7 firmware using the STM32 Cryptographic Library (CryptoLib) for firmware decryption.I have the following scenario:Firmware is encrypted with AES128-GCM.Integrity and authenticity are verified separately using ECDSA + SHA-256.I want to decrypt firmware using AES-GCM in counter mode (CTR) without relying on the GCM authentication tag.My questions are:Does AES-GCM in STM32 CryptoLib support CTR-only operation, bypassing the Galois-field authentication step?If not, is there a recommended way to perform AES-CTR decryption using CryptoLib on STM32H7 without tag verification?Are there any known limitations or caveats when skipping GCM tag verification in STM32H7 CryptoLib?Thanks in advance for guidance.@Jocelyn RICARD @Fred
hello all,i bought multiple 5 unit of 32F469IDISCOVERY and tested them all not a single one lcd shows pre installed demo. so i bought 2 more uniits from different vender but foud same issue. what would be the possible cause? ia some one got same issue?
Hello everyone,We are working on a project using a STM32WB5MMG, facing a strange situation with AES encryption userkeys. Our application code performs data encryption using the internal AES module and for that we load the (previously saved) internal user key from index 1. Everything works fine if we only flash the application code.But, our full project also uses BLE OTA, as long as SECoreBin and SBSFU, besides the previously mentioned application code. By the way, SBSFU uses the key in index 1 to decrypt the encrypted firmware image received from BLE OTA.The thing is that when the full project is flashed, our application cannot load userkey from index 1 anymore and we have to use the one from index 2. It would seem that userkey index 1 is reserved for the secure core and cannot be used by the user application.We could not find any documentation that states that index 1 is reserved for the secure core, in case it is present. So, are we doing something wrong then? We could not find any m
Hello everyone,I want to add external RAM to the NUCLEO-N657X0-Q. From the docs I see two options:FMC with PSRAM/SRAM or SDRAMXSPI with HyperRAM or serial PSRAMBoth options seem to require wiring from the board headers (I couldn’t find a ready plug-in).Is there a simpler way to add the external RAM? I need something similar to the one STM32N6570-DK board provides. Any recommendations would be greatly appreciated.Thanks in advance!
Hello,I'm currently trying to set up a simple project for the STM32N6750-DK. I want to toggle the red User-LED. I already worked a bit with ST-boards, so I did already started a new project in the CubeIDE and selected the LED as a GPIO-Output in the *.ioc file. Here comes my problem:Where do I put my code and how do I flash the programm on my board? Unfortunately I couldn't find a tutorial that described it step by step and I'm very confused how to handle the different projects (FSBL and Appli) in the same folder. Where do I put the toggle-function for my GPIO-Pin? It seems that both main-function (in the FSBL and Appli-poject) do not know the confugurated pin.Furthermore if I want to flash one of these projects with just the default initiliazed peripherals, I get the following output on the terminal and the old program that I flashed before ist still working:Waiting for debugger connection...Debugger connectedWaiting for debugger connection...Debugger connectedWaiting for d
HelloMy current requirement is to generate an FSK waveform with two frequencies around 3-5 MHz, a rate of about 700K, and output a square wave using PWM. The method involves switching frequencies by updating ARR and CCR using two timers—one for PWM output and the other for frequency switching (updating ARR and CCR). The main issue is updating ARR and CCR simultaneously since these addresses are not contiguous, and various methods tried have failed. See if the approach below works.void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base){if(htim_base->Instance==TIM1){/* USER CODE BEGIN TIM1_MspInit 0 */ /* USER CODE END TIM1_MspInit 0 *//* Peripheral clock enable */__HAL_RCC_TIM1_CLK_ENABLE(); /* TIM1 DMA Init *//* TIM1_TRIG Init */hdma_tim1_trig.Instance = DMA1_Stream1;hdma_tim1_trig.Init.Request = DMA_REQUEST_TIM1_TRIG;hdma_tim1_trig.Init.Direction = DMA_MEMORY_TO_PERIPH;hdma_tim1_trig.Init.PeriphInc = DMA_PINC_DISABLE;hdma_tim1_trig.Init.MemInc = DMA_MINC_ENABLE;hdma_tim1_
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.