Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I'm working on a custom board using the STM32F401RB MCU, aiming to implement a USB Audio Device. I'm using STM32CubeIDE with STM32CubeMX. My goal is to receive audio over USB from a PC and later play it via I2S.However, I'm currently stuck at the very first step: Windows 11 fails to enumerate the device, giving the dreaded:“Unknown USB Device (Device Descriptor Request Failed)”My Configuration:Clock:External crystal: 25 MHz HSEPLL config:PLL_M = 15PLL_N = 144PLL_Q = 5 → ✔ USB Clock = 48 MHz (confirmed)SYSCLK = 60 MHzUSB Peripheral:USB_OTG_FS: set to Device OnlyMiddleware:USB_DEVICE middleware enabledClass: Audio Device ClassAudio sample rate: 48000 samples/sDevice Descriptors (auto-generated):VID = 1155 (0x0483)PID_FS = 22336 (0x5730)LANGID_STRING = English (1033)MANUFACTURER_STRING = "STMicroelectronics"PRODUCT_STRING_FS = "STM32 Audio Class"CONFIGURATION_STRING_FS = "AUDIO Config"INTERFACE_STRING_FS = "AUDIO Interface"USB Parameters:Max interfaces = 1Max configuration = 1Max st
I find that I need to enable the APB clock to the RTC during sleep (i.e. by setting the RTCAPBSMEN bit in the RCC APBSMENR1 register) otherwise my code won’t wake after calling __WFI(); is the AI explanation below correct? The AI also says it’s EXTI line 20, whereas the manual (RM0503 Rev. 2) indicates RTC on 28 and TAMP on 29, so I assume it’s wrong about that?The AI answer:In Sleep mode, the CPU is halted but the APB bus remains active — if the corresponding APBSMEN bits are set.If RTCAPBSMEN is cleared, the RTC peripheral’s APB interface is clock-gated, meaning you can’t access its registers — and more importantly, EXTI line 20 won’t see the RTC wakeup event, because the EXTI-RCC bridge path is broken.So even though the RTC’s core logic is ticking away on LSE, the event routing to EXTI and the ability to clear flags depends on that APB interface being live.
I have successfully completed using STM32N6 in LRUN mode and got the proper result and now I want to use Execute in place mode so please provide with all its related documents and videos.When I try to run appli code in DEV mode it does not run, it displays "Target is not responding, retrying..." and also when i try to use xspi clock to 200MHz and main clock to 800MHz even FSBL shows the same error.
Hello Peeps!The ProblemI'm coming to you today with a burning question about the general workflow and best Plan of Approach when it comes to integrating TouchGFX and Ethernet (with LWIP). I've seen more posts about this subject, but none talk about the best way to go about it — instead focusing on the embedded software itself.What I've DoneUsing Berlinger's example projects and his explanation on setting up Ethernet on the H74x boards, I've managed to get Ethernet working. Or at least, the device is pingable — I haven’t touched SSL yet.I've also successfully generated a working TouchGFX project and imported it into STM32CubeIDE, after which I was able to add custom button functionality.Now comes the real challenge: combining the two of them...After tinkering with it for a few days, I've run into a few issues or difficulties, no matter which approach I try.TouchGFX → EthernetI could start with the already working TouchGFX project and integrate Ethernet that way. I've tried this. But, as
Hello I think I solved the problem but I do not know why. When I try to access the last address of a page it causes a hardfault.
Dear Support team,I am currently working on a NucleoF401RE and IHM07M1 driver to run a 24V PMSM motor (rated at 3600 RPM, no load).1. I am using STM32 Motor Control Workbench version 5.4.8 for motor profiling. The motor profiler doesnt compute any parameter and throws the following error - "The measurement is taking too time".2. Anyways, I tried to run the motor with the motor parameters I know, and it immediately goes into speed feedback error. I would appreciate your assistance in resolving this issue.
Greetings,I want to implement encryption in STM32F205RG. I came to know that there is no Hardware support, so is there any STM32 crypto library for STM32F205RG ? I want to implement AES encryption and decryption function. Thanks for support.
Dear sir,In our custom board, we are using the STM32H747XIH6 microcontroller with Wi-Fi functionality. The Wi-Fi module part number is LBEE5KL1DX-883, and it is connected via the SDIO interface.We have properly configured the I/O pins in STM32CubeMX and generated the code. However, once the SDIO initialization is executed, we are unable to communicate with the MCU.Without SDIO initialization, the board works fine.Could you please help us identify the issue? Best regards,Samudralnakaiah.
Can anybody explain me what it the sense of having such functions separate for any peripheral that can choose the PLL as the source clock ?I mean... There is no independent "domains" for SYSCLK, ADC, I2S, etc.... There is only one instance of PLL and for me this is very confusing to haveLL_RCC_PLL_ConfigDomain_SYSLL_RCC_PLL_ConfigDomain_ADC LL_RCC_PLL_ConfigDomain_I2S1etc.. in ...ll_rcc.h fileEach of them reconfigures PLL which have nothing to do with peripherals that use it... Why there is no one function to set up dividers / multipliers for PLL generally and the source clock selection should be the API of particular peripheral driver? Is there any explanation why the LL drivers are designed this way ?
Hi. I have a NUCLEO-H723ZG board. And my basic goal is to create from scratch non-rtos project with ethernet support. But after many attempts i cant get it respond to pings from PC. I tried flashing udp echo sample and it works, so hardware isnt fault. Im using STM32CubeIDE Version: 1.18.1. Im doing next steps:1. Open CubeIDE and select File->Create->STM32 Project.2. Go to board selector and select NUCLEO-H723ZG. Create project with it.3. On the ETH tab enable RMII and change TX_EN and TXD0 pins according to board schematicsThese settings are default.4. Enable LWIP and set static IPSet PHY driverHeap options are default5. Enable cache and configire MPU.6. Add DMA sections to LD scripts, both FLASH and RAM7. Add MX_LWIP_Process() to the main loop8. Build project and flash it.I aslo tried different MPU configurations, setting GPIO speed in ETH settings to Very High, etc. But im stil getting "Host unreachable" when trying to ping board.
HiI use CPU pin 6 as ADC input ADC_IN12. I take measurements every 100us and save them to buffer[100] via DMA.I have a 1M+10k resistor divider connected to ground to the ADC input.I measure a rectified sine wave signal within 0..2V.To my surprise, after a few minutes of measurement, the signal increased by about 400mV and it should go down to zero. It turned out that an internal pull-up was created in the CPU on pin 6 and even 10k to ground is not able to lower it to zero.Connecting a milliammeter to ground gives about 0.7mA. I thought the program was to responisble for this situatiuon, but I made a test program in which the pin is only an input and the pull-up is permanent.After replacing the CPU, the problem disappears and appears after another few minutes.I checked it on 4 pieces. I have no idea what could be the reason for this, an oscilloscope connected to this input shows a rectified sine wave one moment and after a few minutes the same signal but with an additional constant comp
HelloI’m busy with the implementation of PTP support inside my project.I choose the STM32H745, because there is PTP support in hardware, with a nice offload function. After reading and try to understand the manual I create this code:uint32_t SubSecondValue = 43; #define ADJ_FREQ_BASE_ADDEND 0x35455A81 // Mask the Timestamp Trigger interrupt by clearing bit 12 of Interrupt enable register (ETH_MACIER). heth->Instance->MACIER &= ~(ETH_MACIER_TSIE); // Set bit 0 of Timestamp control Register (ETH_MACTSCR) to enable timestamping. //heth->Instance->MACTSCR |= 1; // Done at the END! :) //Program Subsecond increment register (ETH_MACSSIR) based on the PTP clock frequency. heth->Instance->MACSSIR = (SubSecondValue<<16); // if you use the Fine Correction method, program Timestamp addend register (ETH_MACTSAR) and set bit 5 of Timestamp control Register (ETH_MACTSCR) heth->Instance->MACTSAR = ADJ_FREQ_BASE_ADDEND; heth->Instan
Greetings,To start with stm32 wireless series i bought STM32WLE5CC and uploaded my custom code of gpio toggeling without initialiazing PA13 and PA14 for serial wire debug. The program runs as it should but when i try to re-flash the controller with ST-Link V 2 the chip is not being recognized.Can this issue arise due to the failure of initialiazing PA13 and PA14 ? If so then is there any work around to save my chip :).Note : I have used cube mx for code generation.Thanks & Regards,Nimit Vachhani.
Hello,I’m currently working with the STM32F103VET6 and experimenting with different peripherals to better understand how RCC, GPIOs, and timers interact — both from the block diagrams and the HAL layer.I've observed some unexpected behavior in the following two cases:Case 1: TIM1_CH1 in Input Capture Mode (PA8)I enabled TIM1_CH1 in input capture mode.I did not enable the clock for GPIOA, and PA8 was not configured as Alternate Function input in the GPIO registers.Despite this, input capture worked correctly — I could detect edges on PA8 as expected.Case 2: MCO Output on PA8I configured the MCO to output the system clock on PA8.Again, GPIOA was not clocked, and PA8 was not configured as AF output, but the clock signal appeared correctly on PA8.My Analysis and QuestionsI tried to reason this using the GPIO block diagram from the reference manual:I can see that each GPIO pin has a multiplexer between GPIO and peripheral alternate functions.At reset, all GPIO pins are set to input floating
Hello,I have got an STM32U5G9J-DK1 and I want to use its VBAT pin which has been connected to the signal VDD_MCU, which is internal to the board, via solder bridge SB29. As far as my understanding of the data sheet goes, the VBAT pin is supposed to be fed with 1.8 V. So, I was thinking to remove the solder bridge and connect an appropriate battery for this operation. Could you suggest me some good batteries that would suffice this requirement?Thanks in advance.Regards,Gaurav.
On my dual-core STM32H747IGT6 I've got the CM4 doing data acquisition and processing, it's taking its output and storing it into shared memory (multiple possible destination buffers - some in SRAM1, some in SRAM2) for the CM7 to pick up. It's working fine except that it's taking longer than I would like and I'm trying to figure out how to speed up the code.In order to figure out where the slowdown was happening, I set up TIM3 to run at full speed (240 MHz) and then I check the value of TIM3 before and after certain chunks of code. Here's the chunk I'm looking at: __disable_irq(); // So no IRQs fire, throwing off the timing start_timer = LL_TIM_GetCounter(TIM3); // buffer_state is in SRAM1 or SRAM2 buffer_state->buffer->data[adc_index].samples[num_data] = adc_value; buffer_state->buffer->data[lpf_index].samples[num_data] = lpf_value; buffer_state->buffer->data[hpf_index].samples[num_data] = hpf_value; buffer_state->buffer->data[dac_index].s
Eval board used:stm32f446re nucleo Issue unable to configure pin pa 2 and pa3 as output.Steps followed to configure:Rcc->AHB1ENR 0X01;GPIOA->MODER |=0X01<<4;GPIOA->MODER |=0X01<<6;GPIOA->ODR=0X01<<2;GPIOA->ODR=0X01<<2;.EVEN I USED DEBUG MODE TO CH CK WHETHER BITS ARE GETTING CONFIGURED OR not.everythings I working fine expect pin is not going high.When I use sam steps of other pins of same port PAx ,it works.Please help me onthat one more I checked whether these pins are configured to work with uart2 even though I am configuring moder and odr .but nothing usefull I got.Thanks for your r understanding waiting for support
I am trying to write a single byte of data to the start of the EDATA area on the H533I have the EDATA Sector 1 set to active via the option bytes. static FLASH_EraseInitTypeDef EraseInitStruct; uint32_t flash_sector_error; EraseInitStruct.Banks = FLASH_BANK_1; EraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS; EraseInitStruct.Sector = 24; EraseInitStruct.Banks = FLASH_BANK_1; EraseInitStruct.NbSectors =1; HAL_FLASH_Unlock(); if (HAL_FLASHEx_Erase(&EraseInitStruct, &flash_sector_error) != HAL_OK){ SEND_STRING("FLASH ERASE FAIL\r\n"); } //HARDFAULT OCCURS HERE |V| if(HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD_EDATA, 0x08030000, (uint32_t ) 43210) != HAL_OK){ SEND_STRING("FLASH WRITE FAIL\r\n"); } HAL_FLASH_Lock(); From my understanding in the reference manual the EDATA starts at 8030000 and is in sector 24 of bank 1. The erase option works fine, but the HAL_FLASH_Program operation always causes a hard fault.Suggestions? Next Steps for debugging?
The STEVAL-STWINBX1 has 12 test points but there is no serigraphy for identifying them.Also in the UM2965, there is no information about the position of each test points.Where can i find this information ?
I created a new screen and added a Scroll List. Initially setting the number of items to 9 and generating.Trying understand a separate behaviour, I later changed the number of items in the scroll list in Designer to 12 and the sim crashes. It seems that the screenbase.hpp header shows the original declaration: touchgfx::DrawableListItems<ListMenuItem, 9> scrollList1ListItems;but the screenbase.cpp correctly sets the updated number of 12: scrollList1.setNumberOfItems(12); But now we seem to have an index past the array issue and it crashes:I secretly modified the read only header file to match the array size, compiled the sim outside of TouchGFX designer and it ran without errors until I regenerated in designer.The weird part is that TouchGFX designer insists of having that array still init to _9_ NO MATTER what the number of item setting is. For example, setting it 3 will still lead to 9 in screenViewBase.hpp: touchgfx::DrawableListItems<ListMenuIte
We can control the overshoot percentage of a scroll list which seems to limit how much a "pull down" is allowed and animated above the top of the list.Is there a similar thing for the bottom of the list?a way to keep the list from being scrolled past the bottom of it as it's happening in the below image? (the list contains 9 elements in total.
Hi I am facing one issue I am trying to run Timer2 and as soon I have enable the by setting CR1 register bit CEN, My all flags in SR is getting set even I have enabled only(UIE) so my UIF flag bit in SR register must set but it is setting all (CC4IF CC3IF CC2IF CC1IF) . Can you help me to understand is it normal or why it was happened? B.R Ashish
Can any one please assist me.I have all 8 ADC down to GRND 0V I am using this command:HAL_ADC_Start_DMA(&hadc1, AD_RES_BUFFER, 8); The arry is:volatile uint32_t AD_RES_BUFFER[19] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; All 8 ADC returns between 752 & 759. The ADC configuration is This is the buffer from the IDE
Hello,I’m currently working with an X-NUCLEO-GFX02Z1(ST7789V2) LCD using an 8080 parallel interface on a custom board. The LCD generally works well, but I’ve encountered some issues when the LCD fails to initialize correctly during power-on, or when it seems to reset or hang during operation (e.g., due to power glitches or signal noise). In these cases, the screen displays a corrupted image, stays blank, or becomes unresponsive.Is there a reliable way to detect whether the ST7789V2 has been reset or failed during runtime?What is the best practice to recover the LCD from this state automatically?I appreciate any suggestions, example code, or your experience in dealing with similar issues.Thanks in advance!
Trying to model and use an inverting opamp circuit for current sensing[PN]: STM32H755ZITx [VERSION]: MCSDK 6.3.2[TOOL]:MC WB, Board Designer, Firmware, MC PROFILER, etc..)[DETAILS]: Using an inverting opamp for the current sensing circuitry. Goal is to run FOC closed loop position control but can't seem to get the current sensing working properly.[EXPECTED BEHAVIOR]: Able to configure an inverting opamp instead of a non-inverting opamp when using a (three) shunt resistor setup. Then once the project is created I want to use this to profile the motor parameters and run the motor in closed loop by using the current sensing circuitry. [HOW TO REPRODUCE]:Try to use the board designer and configure a current sensing feature, the only option available when working with external opamps is the setup with a non-inverting opamp. We noticed that our opamp circuitry is different from what the (MCSDK) workbench expects and see that the behaviour when trying to
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.