Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
B-WL5M-SUBG1 is available at e.g. Digikey/Mouser, but the ducumentation link https://www.st.com/resource/en/databrief/b-wl5m-subg1.pdf is still 404. Strange!https://www.st.com/resource/en/databrief/b-wl5m-subg1.pdf
Hi,I have a Nucleo-L476RG development board that I am evaluating for my application. One of my basic requirement is to read data from an IMU sensor ICM20948 (https://www.sparkfun.com/products/15335) using I2C and write those data to a SD card.I am using an interrupt based I2C read method ( HAL_I2C_Mem_Read_IT + HAL_I2C_MemRxCpltCallback ) to read data at 300Hz from the sensor. I need to save 12 float variables and I am planning to hookup a SD card to the development board to save sensor data, something like https://www.amazon.com/gp/product/B09K6XVS9R/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 which supports both SPI and SDIO interface. Since STM32-F476 also supports SDIO I figured I will give it a try since everywhere it says SDIO is faster than SPI.So far from what I gathered from searching online is that STM32CubeIDE uses a middleware FatFs to interact with the SD card. There is f_write function which writes to SD card but that is a blocking function, I would much pre
Hi! I have the following code for an ADC1 driver running in ADC1_IN1 (PC0) in an L476RGT6 and it runs fine. However, I am testing it by reading a potentiometer and the value read is constant. I've already double-checked everything, including channel selection in ADCx_SQR1, but I am still not sure why it is not reading correctly when I change the potentiometer resistance.You can assume systick_us_delay() works fine.
(Moved to appropriate forum from 'Feedback') Hi, I'm using Nuleo-H743Zi2 hardware. I have configured FDCAN1 with below configurations, hfdcan1.Instance = FDCAN1; hfdcan1.Init.FrameFormat = FDCAN_FRAME_FD_BRS; hfdcan1.Init.Mode = FDCAN_MODE_NORMAL; hfdcan1.Init.AutoRetransmission = ENABLE; hfdcan1.Init.TransmitPause = DISABLE; hfdcan1.Init.ProtocolException = ENABLE; hfdcan1.Init.NominalPrescaler = prescaler; hfdcan1.Init.NominalSyncJumpWidth = 1; hfdcan1.Init.NominalTimeSeg1 = 13; hfdcan1.Init.NominalTimeSeg2 = 2; hfdcan1.Init.DataPrescaler = 1; hfdcan1.Init.DataSyncJumpWidth = 1; hfdcan1.Init.DataTimeSeg1 = 1; hfdcan1.Init.DataTimeSeg2 = 1; hfdcan1.Init.MessageRAMOffset = 0; hfdcan1.Init.StdFiltersNbr = 0; hfdcan1.Init.ExtFiltersNbr = 0; hfdcan1.Init.RxFifo0ElmtsNbr = 8; hfdcan1.Init.RxFifo0ElmtSize = FDCAN_DATA_BYTES_8; hfdcan1.Init.RxFifo1ElmtsNbr = 8; hfdcan1.Init.RxFifo1ElmtSize = FDCAN_DATA_BYTES_8; hfdcan1.Init.RxBuffersNbr = 8; hfdcan1.Init.RxBuffe
On STM32H753, is it possible to disable Ethernet MAC source address replacement?I am working on a project that requires packet bridging, and I am stuck by the MAC altering the source address of bridged packets!Reference manual section 58.5.2 discusses source address insertion/replacement. It refers to register MACCR, bits SARC. But the definition for these bits does not have an option to disable the MAC from overwriting the source address in my packets. Edit: I tried setting SARC bits to all zero and it seems to disable address replacement. But this is not documented. It appears bit 28 selects insert/replace, bit 30 selects address 0/1 and bit 29 enables/disables address insertion. Does anybody have arms into ST to confirm if this is indeed the case? Edit: STM32H7 HAL driver for Ethernet seems to offer a disable option for source MAC replacement, so maybe it is a thing. /** @defgroup ETH_Source_Addr_Control ETH Source
Hello.I have a problem with the ADC on the custom board with the STM32WB55 chip. I am using a divider and should get something around 2V, but I always get the maximum value - 4095.I am using this code that I saw in the ST examples. HAL_GPIO_WritePin(ADC_OUT_GPIO_Port, ADC_OUT_Pin, GPIO_PIN_SET); HAL_Delay(50); if (HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED) != HAL_OK) { Error_Handler(); } if (HAL_ADC_Start_DMA(&hadc1, (uint32_t*)aADCxConvertedData, BATTERY_ARRAY_SIZE) != HAL_OK) { HAL_GPIO_WritePin(ADC_OUT_GPIO_Port, ADC_OUT_Pin, GPIO_PIN_RESET); Error_Handler(); } void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) { if(hadc->Instance == ADC1) { if (HAL_ADC_Stop_DMA(&hadc1) != HAL_OK) { Error_Handler(); } HAL_GPIO_WritePin(ADC_OUT_GPIO_Port, ADC_OUT_Pin, GPIO_PIN_RESET); uint32_t sum_mv = 0; for (uint32_t i = 0; i < BATTERY_ARRAY_SIZE; i++) { aADCxConvertedData_Voltage_mVolt[i] = __ADC_CALC_DATA_VOLTAGE(VDDA_APPLI, aADCxConverte
I have a Nucleo 32 board with STM32L432KC. I am using Power Profiler Kit II to measure the power consumption. I connected PPK Vout to Nucleo's 5V (pin 4 on CN4), GND to GND and the PPK is set as a source meter.Program on MCU is running for 2s in RUN mode (80 MHz, LED on) and then for 2s in STOP 2 mode (LED off).Code to enter the STOP 2 mode:HAL_SuspendTick(); HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET); HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);RTC and GPIO are used to wake up:if(HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x02000, RTC_WAKEUPCLOCK_RTCCLK_DIV16) != HAL_OK) { printf("Error setting RTC wakeup timer\n"); Error_Handler(); } else { printf("RTC wakeup timer set\n"); }void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { UNUSED(GPIO_Pin); if(GPIO_Pin == GPIO_PIN_12) { SystemClock_Config(); HAL_ResumeTick(); } } void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc) { UNUSED(hrtc); SystemClock_Config(); HAL_ResumeTick(); }On top of that the RTC Calen
Hello,I'm using STM32G474 to implement 6-step trapezoidal BLDC control and want to achieve full hardware-only commutation, without CPU ISR or software toggling.Setup:MCU: STM32G474Timer: TIM1 (PSC = 169, ARR = 66 → PWM 15 kHz)Mode: PWM1, edge-alignedOutputs:CH1 → PC0 (HU), CH1N → PA7 (LU)CH2 → PC1 (HV), CH2N → PB0 (LV)CH3 → PC2 (HW), CH3N → PB1 (LW)Low-sides must be ON (not PWM) when activeHall sensors: PA0 / PA1 / PA2 (currently polled)Goals:Commutation handled 100% by hardware (TIM1 + DMA/EXTI if possible)No CPU ISR or software to switch outputs during commutation (only supervision allowed)At each Hall change, TIM1 must autonomously switch active phase pairIssues:MC Workbench forces both high/low-side in PWM, incompatible with 6-step where low-sides must be always ONMC Workbench requires software-managed commutationQuestions:Can I route Hall changes (via EXTI or similar) to trigger TIM1 update/DMA to reconfigure outputs automatically?Is DMAMUX or other peripheral routing usable to fe
Hello,I’m working on the STM32U5A5AJHXQ and attempting to develop a USB driver interface using the STM32 Arduino Core.I’ve configured the USB as follows:Vendor ID : 0x0483 (STMicroelectronics)Product ID : 0x5740Manufacturer String : STMicroelectronicsProduct String : GENERIC_U5A5AJHXQ CDC in HS ModeSerial : 206134504231USB Version : 2.0Port maximum Speed : High-SpeedDevice maximum Speed : High-SpeedDevice Connection Speed : High-SpeedSelf powered : yesDemanded Current : 100 mAUsed Endpoints : 4======================== USB Device ========================+++++++++++++++++ Device Information ++++++++++++++++++Friendly Name : USB Serial Device (COM7)However, I'm encountering an issue where the USB enters IN NAK and PERIODIC TIMEOUT states (as observed in a USB analyzer log), and no successful enumeration or data transfer occurs.I'm trying to implement a fully functional USB OTG HS device driver that includes all the required lower layers (USB core, PCD, middleware, CMSIS etc.) under the Ar
Hi, I've been trying to receive 5 bytes of data from a master MCU using SPI in slave mode.I have a timeslot control signal, and on each falling edge of that signal, I need to receive 5 bytes from the master.The timeslot control signal consists of one long pulse followed by 15 short pulses.Exemple: i receive the data for timeslot 0 at the end of timeslot 15 and so on.I want to start receiving data from the second cycle of the timeslot control signal, and stop at the end of that cycle,so I can compare the received data with what I’m supposed to get. the yellow signal is my timeslot control and the green is the duration of the HAL_TIM_PWM_PulseFinishedCallback here is my code: #define RX_BUFFER_SIZE 5 #define number_of_timeslot 16 uint8_t rx_all_data[number_of_timeslot][RX_BUFFER_SIZE]; volatile uint8_t reading_in_progress = 0; volatile uint8_t g_index_ts = 1; volatile uint8_t g_ready_to_listen = 0; volatile uint8_t g_current_ts_index = 0; volatile uint8_t g_cur
I have an STM32F429ZI Nucleo board (for SPI master and UART to check everything's working alright) and an EVB-LAN9252-SPI board(for SPI slave).I have to check if the SPI is correctly working, but it seems that I can't debug or check on the slave's side.Shown below is the test code I worked on the STM32F429ZI Nucleo board to check if the SPI is working correctly. SPI1 and SPI4 is configured in one board. while (k < 32) { HAL_UART_Transmit(&huart4, &SPI1_Buffer_Tx[k], 1, 100); k++; } k = 0; while (k < 32) { HAL_GPIO_WritePin(GPIOE, GPIO_PIN_9, GPIO_PIN_RESET); // this GPIO is connected to hardware NSS HAL_SPI_Transmit(&hspi1, &SPI1_Buffer_Tx[k], 1, 100); HAL_SPI_Receive(&hspi4, &SPI4_Buffer_Rx[k], 1, 100); HAL_GPIO_WritePin(GPIOE, GPIO_PIN_9, GPIO_PIN_SET); k++; } k = 0; while (k < 32) { HAL_UART_Transmit(&huart4, &SPI1_Buffer_Tx[k], 1, 100); k++; } k = 0; while (k &
Hi everyone,I need your advice because I think the delays I'm getting are incorrect, but I'm not sure.In my tests, I transmitted data like this via USB (COM port) a total of 34 times:BODY1=00 BODY2=00 BODY3=00 SW=9000I'm sending data in Python via USB. The STM32H755 interprets it and returns the frame shown above.I've measured the time, and it takes 5.1 seconds to receive my 34 data points (with 34 responses). Of the 5.1 seconds, I spend 5.04 seconds in this function:uint8_t CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)This isn't normal, but I don't know how to improve this transmission time. I'm not experiencing any data loss, it's just extremely slow.Here's how I send my data:snprintf(data, sizeof(data), "%sSW=%04X\r\n", body_str, apdu_res.SW); CDC_Transmit_FS((uint8_t *)data, strlen(data));Do you think this is normal?Thank you in advance for your advice.
Hii everyone, 1. I want to interface OV10635 camera module with stm32h743 controller does it is suitable ? . 2. If anyone have OV10635 configuration files please share with me.
HelloCan anybody explain how it is possible to power VCORE directly from SMPS output? I see that SMPS have only two possible output voltages, 1.8V and 2.5V:But VCORE accepts absolute maximum of 1.4V.So how it is possible with LDO bypassed?Best Regards
Hello everyone, and thank you in advance for chiming in on this topic ! I'm having trouble getting an STM32H743VI pass a 32GB uSD-Card to my computer through USB_OTG_FS. Please consider me a noob at embedded system.I'm following Phil's Lab video (https://www.youtube.com/watch?v=aEwwQMdKd-c) which uses the same family of microcontrollers and manages to get his SD card recognized by his computer, with write and read working. I'm following the same steps, but when I connect the board to my computer, no available space is shown and double clicking on the listed USB device prompt me to format it (even though trying to format it doesn't work that way).The project I'm working need wave file transfer between a computer and the STM32 so that the STM can read it later on and use them for real-time audio processing. In order to achieve that, I have enabled FatFS, SDMMC1, USB_OTG_FS and USB_DEVICE. I already have some code running the real-time audio processing part, but I disabled it just fo
Hello,this error really drives me crazy. When trying to flash the programm from the ToughGFX App or CubeIDE the external Memory can't be erased. I use the recommended CubeMXVersion of 6.14 and have the latest CubeProgrammer and CubeIDE with STM32Cube FW_U5 V1.7.0. The whole ToughGFX log is attached. Thanks in advance!These are the following errors that are occurring:TouchGFX:Erasing memory corresponding to sector 0:Erasing external memory sector 0Error: failed to erase memorygcc/include/flash_sections_int_ext.mk:5: recipe for target '_extflash_' failedmake[1]: *** [_extflash_] Error 1../gcc/Makefile:52: recipe for target 'flash' failedmake: *** [flash] Error 2FailedFailed CubeIDE:Error message from debugger back end:Error finishing flash operationFailed to execute MI command:\STM32CubeIDE\\Debug\\STM32U575ZI-NUCLEO-AZ2.elfError message from debugger back end:Error finishing flash operationError finishing flash operation
Hi STM32 Community,I recently created a detailed video tutorial showing how to implement I2C communication between two STM32F446RE boards using STM32CubeIDE.The project covers:- STM32CubeMX configuration- I2C wiring setup (PB9/PB8)- Master transmit code using HAL- Slave receive Watch the full tutorial here::backhand_index_pointing_right: [STM32 I2C Communication Tutorial | Master-Slave Interface Between Two Boards with STM32CubeIDEhttps://youtu.be/ibNJuGFzjoY]Hope it helps others working on STM32-based communication projects. Feedback or questions are welcome!Best regards,Topviewtech
hi i have a system with two flash memories, one nor and one nand. i need a filesystem supported especially for the nand. which one can i use? are there any examples of support?
Hi Team,I am working on a project using the STM32H745 microcontroller, and I need to sample a 500 kHz sine wave using the ADC. I have configured the ADC with the following settings:ADC clock: 77MHzResolution: 16 bitsSampling time: 1.5 ADC clock cyclesContinuous conversion mode with DMA enabled(32bit)Sampling Frequency Timmer : 1MHzHowever, I would like to confirm:Is it feasible to reliably sample a 500 kHz sine wave with the STM32H745 ADC?Are there any specific considerations or limitations I should be aware of when sampling high-frequency signals like this? Best Regards,Gagan Gowda
hi, I'm using stmf103c8T6. Recently it got RDP enabled while trying to flash a program. ever since then I'm not able to connect through cube programmer or cube ide. I tried to mass erase and write RDP=0xaa through stm programmer cli. all though I'm getting "mass erase successful" and "option byte successfully programmed", when I try to display it again it's still showing RDP enabled. I tried different boot mode also while trying to set the RDP but still not workingkindly help me to find a solution
Hi,I'm having a problem that's driving my crazy. After running my program for a little while, I start getting DMA2D transfer errors because the src address of the blitOp struct in the function void STM32DMA::setupDataCopy(const BlitOp& blitOp) starts getting invalid values (like 0x40 for instance) instead of pointing to the external flash where all the images are saved (addresses starting at 0x90000000).It's hard to tell who is responsible for putting an invalid address as this function is called directly from the touchgfx library and there is no way to debug really what's going on under the hood. It seems to always happen right after the function HAL::lcd().drawPartialBitmap() is called inside the draw function of a own made button class (but looks almost identical to the standard touchgfx button). This function is called with valid bmp, x and y coordinates, dirty rectangle, alpha value and with the useOptimized set to true).We thought for a while it was due to a memory leak
I am confused.On an STM32G474QE, I intend to use PD3 for TIM2_CH1. I'm running out of pins, so this is the only practical pin for me to use.However, according to the datasheet (DS12288 Rev 6), this pin can be either TIM2_CH1 or TIM2_ETR when alternate function 2 is selected. It is mentioned in the pinout list, as well as the alternate functions table:This confuses me. As far as I know, these two signals don't rule out each other. There shouldn't be anything preventing the developer from using ETR as a an external trigger or clock source, and at the same time use CH1 for input capture or output compare. Of course, I might be wrong about this.I haven't found a description of this anywhere else in the datasheet. And not at all in the reference manual and the errata sheet. Nor have I been able to find a bit in the TIM2 registers that selects either CH1 or ETR for this pin.Does anyone know what this is about? Have I missed something that should be obvious? Is it a typo that has somehow surv
Dear All,Can I select TRGO2 for my ITR selection?The table below is extracted from the STM32H563 Reference Manual (RM).Does it mean that ITR does not support TRGO2?
Hi!I'm new to this sort of EEPROM emulation that I'm trying to set up and had a few basic (read: dumb) questions:Why does the high cycle flash not need to be separated in the linker unlike what I would do when using normal flash?Which EDATA do I use if I'm not utilizing bank switching?In my codebase, I only see FLASH_EDATA_SIZE instead of a 1 or 2, is this expected?Is there any sample code I could look at to get the flash set up with proper emulation. I could write a bunch of the functions myself but some boilerplate would be nice to have.Any general steps you followed if anyone has this running would be great tooI've been researching this all day and would appreciate any help, thanks!Mahir
Hi, after flashing the MCU, it jumps to an incorrect system memory address instead of my application code. I looked into the issue and found that the vector table isn't properly set in flash. I'm trying to understand how to set it correctly, but I'm still not getting it.
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.