Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Dear All,I am testing the demo project for the NUCLEO-C071 to implement the USB HOST CDC_ACM (USBX). Below are some doubts that arose after the initial tests:After using the wizard to create the demo project 'Ux_Host-CDC_ACM', opening the .ioc file shows an error in the USBX configuration. In the 'Platform Settings' tab, the pin 'Drive VBUS_FS' is not defined. From what I understand, this should be the pin used by the library to enable the 5V power supply on the USB connector when in HOST mode. However, looking at the electrical schematic of the NUCLEO-C071, there is no pin available for this functionality! To supply 5V to the connector, there is the JP1 jumper (pin 7/8). The only way to avoid the error is to assign an unused pin! Isn't there a smarter way to avoid sacrificing a pin?After resolving the error, without adding anything to the demo project, and having compiled and downloaded the program onto the NUCLEO board, any device I connect always results in the error "USB Device Enu
I am making an adapter between 6‐pin target debug header and 14-pin STDC14 connector. The same cable will be used to program and debug both M0+ and M4 targets.Can I hard-wire SWO (pin 8 ) and T_VCP_TX (pin 14) together? The idea is to have an option on target board to use either UART or SWO, whatever is available.Will UART transmission affect SWD functionality by sending garbage (from SWV standpoint) to SWO pin?update: sorry, posted this into wrong forum. can someone can move this into "dev tools", please?update 2: I think I found an answer here: https://community.st.com/t5/stm32-mcus-boards-and-hardware/uart-signal-on-swo-pin-from-st-link-v2-3/m-p/742773/highlight/true#M22581
Hi team What is the correct procedure to initialize FATFS for SDMMC in M4? Kindly provide the application note of the procedure. We need to run eMMC in M4 core EVK used : STM32H745I-DISCO References code: STM32CubeH7/Projects/STM32H745I-DISCO/Applications/FatFs/FatFs_Shared_Device at master · STMicroelectronics/STM32CubeH7 Please find the information below for your reference. Test Case 1:------------In M4, SDMMC configurations:1. SDMMC peripheral selected for M4.2. SDMMC Clock configuration: 100 MHz3. SDMMC Clock divide factor: 44. Mode: MMC 4 bits Wide Bus5. Clock Edge: Rising Edge6. Clock Power Save: Disable 7. Hardware Flow Control: Disable FATFS configurations:- FATFS Package used from FatFs_Shared_Device project of GitHub. - Replaced the FATFS package from the reference project with the one in STM32Cube_FW_H7_V1.11.2 repository. Conclusion:- Una
I am working on interfacing MicroSD card with STM32H757I-EVAL. I am following the same steps to setup and configure SDMMC1, as mentioned in this video https://www.youtube.com/watch?v=-0kFwp0ao6k @2:56 but there is DMA setting option under SDMMC1 configuration. I am not getting this option to configure. What could be the reason? I have attached the image of IDE environment.
Hi,I am trying to interface Stm32h745 controller with a 240x320 TFT LCD over FMC. Interesting thing is, when I manually control lcd control and data pins(Set them as GPIO_OUTPUT_PP), Lcd works, but when I switched to FMC it does not. Tried lots of timing configuration but it did not help.Here is the init for FMC .Instance = FMC_NORSRAM_DEVICE; .Extended = FMC_NORSRAM_EXTENDED_DEVICE; .Init.NSBank = FMC_NORSRAM_BANK1; .Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE; .Init.MemoryType = FMC_MEMORY_TYPE_SRAM; .Init.MemoryDataWidth = FMC_NORSRAM_MEM_BUS_WIDTH_8; .Init.BurstAccessMode = FMC_BURST_ACCESS_MODE_DISABLE; .Init.WaitSignalPolarity = FMC_WAIT_SIGNAL_POLARITY_LOW; .Init.WaitSignalActive = FMC_WAIT_TIMING_BEFORE_WS; .Init.WriteOperation = FMC_WRITE_OPERATION_ENABLE; .Init.WaitSignal = FMC_WAIT_SIGNAL_DISABLE; .Init.ExtendedMode = FMC_EXTENDED_MODE_DISABLE; .Init.AsynchronousWait = FMC_ASYNCHRONOUS_WAIT_DISABLE; .Init.WriteBurst = FMC_WRITE_BURST_DISABLE; .Init.Conti
Hi,I am currently working with the STM32F334 and STM32G474 microcontrollers, and I have a couple of technical questions that require deeper insight into how the HRTIM (High-Resolution Timer) operates in these devices.Q1. Can HRTIM generate a high-resolution variable-frequency waveform?From my own testing, it appears yes, but I would like to confirm this officially. To clarify what I mean: suppose I am designing a resonant converter operating at 1 MHz. In the STM32F334, the HRTIM supports an effective edge resolution of ~217 ps, equivalent to a virtual clock of 4.608 GHz. This means the period register value for 1 MHz would be 4.608GHz/ 1MHz = 4608. Now, if I reduce the period by just one count 4.608GHz / 4607 = 1000217MHz This implies a frequency resolution of ~217 Hz. However, if high-resolution control were not supported for the period register, the period would instead be based on the timer base clock 144 MHz / 143 = 1.006993MH
Hi,I am trying to plot an array of 512 values in a dynamic graph in touchgfx. This is working as intended but I am experiencing poor performance. When in histogram mode the graph updates quickly however I wish to use line mode and when in this mode, the graph will take between two and three seconds to update. I'm aiming to get the graph to update in around one second. Any ideas on how to optimise the plotting of the graph. Perhaps the way in which the data is passed from Model.cpp into the screenView.cpp?Currently I am passing the data through as such:for(int i = 0; i < 512; i++) { modelListener->UpdateGraph(i, graphData[i]); }Any help would be greatly appreciated.Thanks.
We set up classic CAN on the stm32h747I-DISCO dev board and listen for interrupts on every message:extern "C" void HAL_FDCAN_RxFifo0Callback(fdcan_handle* hfdcan, std::uint32_t RxFifo0ITs) { if ((RxFifo0ITs & FDCAN_IT_RX_FIFO0_FULL) != RESET) { LOG_ERROR("FIFO0 full\n"); } if ((RxFifo0ITs & FDCAN_IT_RX_FIFO0_MESSAGE_LOST) != RESET) { LOG_ERROR("FIFO0 message lost\n"); } if ((RxFifo0ITs & FDCAN_IT_RX_FIFO0_NEW_MESSAGE) != RESET) { if (auto* can_reader = can_reader_instance.load(); nullptr != can_reader) { can_reader->flush(can::fdcan1); } } } in flush(), we call HAL_FDCAN_GetRxMessage() over and over to read the FIFO elements into an std::vector and then we print them from the vector. We are anticipating an average message frequency of 1 message per 1ms, but at this speed, we are seeing the FIFO fill up faster than we can read from it. The fastest I have seen a message be handled on our device is around 7ms per message. Should we be able to read the me
Hello All, I am trying to talk to an FRAM over FMPI2C on the STM32F446 using DMA, but the DMA is not able to "start". I am using the Mem_Write_DMA function in stm32f4xx_hal_fmpi2c.c.When I do a side by side comparison with the Mem_Write_DMA function in I2C there are some differences, For example in I2C, the start, device address and the memory address is sent as a blocking call using I2C_RequestMemoryWrite. For the FMPI2C, the start, device address and the first byte of the memory address (memory address is 16 bit) is sent in a blocking all, and the next byte is sent via the interrupt in FMPI2C_Mem_ISR_DMA. After the second byte is sent, transmission to start the data transfer gets initiated by FMPI2C_TransferConfig. But when it tries to send the data, the interrupt fires again this time just sending 0xFF's which are being loaded in the TXDR register in the previous stepMem_write_DMA --> Send Device Address & First Byte of Memory Add --> MEM_ISR : Send second b
What's the difference between enabling high cycle flash from option bytes on an H5 versus just using that section of flash by reserving it in the linker instead, apart from the ECC change?
I have an application that debugs correctly when I loads it at address 0x08000000.I'd like to use a bootloader, so I've changed the ld file, and choose, as flash origin, the address FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 1920KBut, in this case, when I debug the application, the debug takes me in instructions that don't correspond to what I'm doing, I don't know how to explain, for example it takes me in the middle of a for cycle, but without passing from the starting....it seems that the debug is not aligned. Do I have to change something else to debug not starting from 0x08000000.?Or what can I do to check what's wrong?Thank you.IB.
I'm trying to crank up the clock to Timer1 to be able to count high frequency events with better resolution. If I set the SYSCLK to 128 I get a hard fault when my code reaches SystemClock_Config(). Even if I keep the AHB bus at the same speed (64Mhz) using prescaler. In this case the only clock difference seems to be SYSCLK value.Here's the first configuration which works ok:and here's the other where it will hard fault:Since the IDE says I should be able to take HCLK to 160Mhz which would require a much higher SYSCLK, I don't see why this SYSCLK value should cause a fault.
Hi,I would like to know why when I sent the 202 bytes from pc to dev-board via USB HID, the buffer size would only get 32 byte each time, (byte[0]-byte[31])*several times until finished print out all 202 bytes?Couldn't it recieved whole 202 bytes then print out continuously from byte[0] to byte[201]?ux_device_keyboard.c /** * @brief USBD_HID_Keyboard_SetReport * This function is invoked when the host sends a HID SET_REPORT * to the application over Endpoint 0. * @PAram hid_instance: Pointer to the hid class instance. * @PAram hid_event: Pointer to structure of the hid event. * @retval status */ UINT USBD_HID_Keyboard_SetReport(UX_SLAVE_CLASS_HID *hid_instance, UX_SLAVE_CLASS_HID_EVENT *hid_event) { UINT status = UX_SUCCESS; /* USER CODE BEGIN USBD_HID_Keyboard_SetReport */ UX_PARAMETER_NOT_USED(hid_instance); UX_PARAMETER_NOT_USED(hid_event); //Receive Output report from PC if (hid_event == UX_NULL || hid_event->ux_device_class_hid_event_length < 2) return UX_ER
Hi,I have a setup on a PCB that resembles the following.The 5V supply is pretty stable (0.5V tolerance) and the 3.3V LDO delivers a low-noise power to the microcontroller. The µC communicates with the outside world through CAN (transceiver present). There are already some precautionary measures present on this setup, as follows.All the lines (power and CAN) are ESD protected (IEC61000−4−2 standard level-4.Setup is completely coated (conformal coating on PCB). Hence, any physical contact from outside world will be difficult.During routine operation, the communication with a sensor system (STM32F303CB on-board) was lost. On further investigation, the following was found.Optical examination revealed no bad component. All the active and passive components on the PCB seemed intact. No burning out (or) abrasion on coated areas were found.The resistance between 3.3V LDO output and Ground was <2ohms, which was narrowed down to the microcontroller itself.The resistance between VDD and VSS pi
Hi STM Community,I'm trying to use the X-NUCLEO-LPM01A board to measure the current consumption of an Arduino UNO during simple blinking states.Setup Description:Power output is taken from CN14 (OUT and GND pins) on the LPM01A.These lines are directly connected to the Arduino UNO's 3.3V pin and GND.The LPM01A is powered via USB and in normal measurement mode.Problem:Before connecting Arduino UNO, LPM01A display shows a stable 3.3V (or sometimes 3.27V).After connecting the Arduino UNO, the voltage drops to ~1.5V, and the Arduino does not power on.Working Comparison:Previously, I tested the same setup using STM32 NUCLEO-C031C6 as the target board.I removed SB2 and SB23 bridges as per the reference manual.In that setup, everything worked as expected — voltage remained stable, and current measurements were valid.My Questions:Why does the voltage drop when powering the Arduino UNO?Is it not recommended to supply power directly to the Arduino UNO's 3.3V pin using LPM
Hi guys.I am using STM32H7B3LIHQ MCU, MX25LM51245GXDI00 flash and IS42S32800J-6BLI RAM with NHD-4.3-800480CF-ASXP-CTP TFT screen. I configured the LTDC, FMC, OCTOSPI, TouchGFX and FREERTOS settings. I have a 2 problem.1- I added textArea in the screen for trying. I am increasing the "counter" register and displaying its value in the textArea at 100 mS intervals. But counter register does not inreasing the 100mS intervals, it increasing in 1000mS intervals. FREERTOS TICK_RATE_Hz = 1000 and this is code;void screenView::handleTickEvent() { static int tickCount = 0; if (tickCount++ >= 100) { Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%u",counter); textArea1.invalidate(); tickCount = 0; } if (counter >= 17000) counter = 0; else counter++; }2- I added an image with a resolution of 800x480 to the screen. The textarea is on this image. Every time I refresh the screen (textArea1:invalidate()), the screen dithering. But sometimes (1 time i
Hi everyone,I'm trying to drive a WS2812 LED strip (20 LEDs - Strip has 60 LEDs) using an STM32L432KCUx, but so far without success.I've tested multiple approaches — PWM with DMA, SPI-based encoding, and bit-banging via GPIO — but none of them produce stable or correct results. Sometimes up to 22 LEDs light up instead of 20, and the colors are often wrong or appear white.Occasionally, the first LED doesn’t light up at all, which seems to indicate timing jitter or inaccurate bit timing.Setup:Microcontroller: STM32L432KCUxNo external HSE crystal or LSE availableSYSCLK = 48 MHz, tested using both MSI via PLL and HSI via PLLOutput pins used:PA12 for SPI and bit-bangingPA9 for PWM (TIM1_CH2)SPI clock set to 2.4 MHz (used for encoded WS2812 bitstream) SYSCLK = 38MHz3.3 V logic level used for WS2812 data line (no level shifter)LED strip powered with 5 V USB - GND connectedAdditional info:I confirmed the LED strip and wiring are working:Using an Arduino, the same strip works immediately and re
Hello,I'm new to STM32 and trying to learn exciting stuff. I want to light a single LED from my WS2812B strip. For example I will choose 6th LED on my computer and 6th LED on strip will light up.But I'm not sure where to start. How can I access to single LED address? And how to get it work with STM32?Thanks in advance.
Hi all, I am using STM32F7439Zi MCU, I would like to create the master + slave pwm signals with the relation that at the falling edge of the master, the slave's pulse will be started. Both PWM signals has the same frequency, the duty cycle of the master and the slave can vary.The set up as followTIMER 2 is set to Master:Slave Mode: DisableChannel1: PWM Generation CH1Channel2: Output Compare No OutputTrigger Output (TRGO) Parameters:- Trigger Event Selection: Output Compare (OC2REF)Output Compare No Output Channel2:- Mode: Active Level on matchTIMER 3 is set to Slave:Salve Mode: Trigger ModeTrigger Source: ITR1Channel1: PWM Generation CH1Channel2, 3, 4: DisabledThe code is simple:HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1); // 1st output signalHAL_TIM_OC_Start(&htim2, TIM_CHANNEL_2); // delay for the second signal to startHAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); // 2nd output signalStraight from .IOC modify, I am able to create any duration of the master d
i am trying to implement openBootloader for an stm32l451,but i cant get the write to work i get the following errors HAL_FLASH_ERROR_PROG | HAL_FLASH_ERROR_PGA |HAL_FLASH_ERROR_PGSi am trying to write to 800c000 in the flashthis is my code( i used https://github.com/STMicroelectronics/stm32wl-openbl-apps to assist in how to write the interfaces)void OPENBL_FLASH_Unlock(void) { HAL_FLASH_Unlock(); } static void OPENBL_FLASH_Program(uint32_t Address, uint64_t Data) { /* Clear all FLASH errors flags before starting write operation */ __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_ALL_ERRORS); HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, Address, Data); } void OPENBL_FLASH_Write(uint32_t Address, uint8_t *Data, uint32_t DataLength) { uint32_t index; __ALIGNED(4) uint8_t buffer[FLASH_PROG_STEP_SIZE] = {0x0U}; uint8_t remaining; if ((Data != NULL) && (DataLength != 0U)) { /* Unlock the flash memory for write operation */ OPENBL_FLASH_Unlock(); /* Program double-
Hello all,I allow to send this message after a long attempt to perform a switch bank on my STM32U385RG.This is part of my code:/*--------------------------------------------------------*/ void OptionBytes_SwapBanks(void) /*--------------------------------------------------------*/ { FLASH_OBProgramInitTypeDef OBInit; HAL_StatusTypeDef status; swo_printf("Current USERConfig: 0x%08lx\n", OBInit.USERConfig); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPERR | FLASH_FLAG_PROGERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_SIZERR | FLASH_FLAG_PGSERR | FLASH_FLAG_OPTWERR); uint32_t optr = FLASH->OPTR; if (optr & FLASH_OPTR_DUALBANK) { swo_printf("Dual Bank is ENABLED\n"); } else { swo_printf("Dual Bank is DISABLED\n"); } if (optr & FLASH_OPTR_SWAP_BANK) { swo_printf("Swap Bank is ENABLED\n"); OBInit.OptionType = OPTIONBYTE_USER; OBInit.USERType = OB_USER_SWAP_BANK; OBInit.USERConfig = OB_SWAP_BANK_DISABLE; } else { swo_printf("Swap Bank is DISABLED\
Hi everyone,I’ve designed a custom board based on the STM32WL55CCU6, but I accidentally left out the external HSE crystal. I'm wondering: is the HSE strictly required to use the radio features (specifically LoRa or LoRaWAN), or is it possible to rely on the internal HSI instead?I’m aware that the HSI has higher frequency deviation compared to an external crystal, but since I also control the LoRaWAN gateway, I might be able to tolerate some drift or compensate for it.Has anyone tried operating the radio using only the internal oscillator? Any guidance or experience would be greatly appreciated.Thanks in advance!
Hello, I'm using lwIP and I try to change DEFAULT_THREAD_STACKSIZE But where it applies ? I have my code under version control but I don't see any change ... and I don't see "lwIP" thread, maybe EthIF ?
Hello All,I am using STM32H533 series controller in our application and trying to read internal MCU temperature reading using ADC. But not getting value properly can any one please help me and provide sample example that support for STM32H5 series to read internal MCU temperature?Any help most appreciate and thanks in advanced...!!
I want to have BLE Custom Client/Server in Application FW? Does it support that?Is it possible to have clinet and server in same FW ?If yes,STM32WB15CC Which BLE Wireless Stack FW should I use full or Exteneded?What is advantages and disadvantages of both features?
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.