Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi guys,I'm trying to use STM32 as a host for a HID keyboard and mouse.I have 2 wireless mouses to test (Logitech M560, HP Spectre 700), Logitech T-BC21 wired trackball, some low-end keyboard. I'm connecting them via micro-USB to USB converter that works properly with my old tablet.LED near USB port on NUCLEO lights up, looks like it enumerates my all test devices (function returns OK), but I'm always getting stuck in USBH_HID_POLL state and I never get this condition true (after pressing keys, moving or clicking mouses): // usbh_hid.c USBH_HID_Process(...) function if (USBH_LL_GetURBState(phost, HID_Handle->InPipe) == USBH_URB_DONE) I'm following this tutorial from ControllersTech, that basically just uses generated code, except that I'm using FreeRTOS. USB interrupt is enabled (can't be turned off in code generator).I'm powering NUCLEO from my PC USB port (programming/debugging). I have not tried to power the board from external 5V supply, but I don
Posted on February 09, 2017 at 02:08I've got a custom board with a STM32F103 that connects to a micro SD card using 1 bit SDIO. I've generated some basic test code using STM32CubeMx Rev 4.19.0 and STM32CubeF1 release 1.4.0 (both the latest according to the software & ST website). All it does it try to write a test file to the SD card.I've got a scope on the SDIO_CMD, SDIO_CK and SDIO_D0 lines to see what is happening - and the answer is 'not enough'!I can see the CMD0 command being clocked out - checksum matches the SDIO specs - at 162kHz. But the card doesn't respond. I then see the CMD8 command clocked out, again no response. And then I see CMD55 clocked out with no response. At this point stm32f1xx_hal_sd.c gives up in the SD_PowerON() function because it needed a response to that one (it doesn't seem to care too much about the rest).I have no idea why the card doesn't respond. I've double/triple checked the pinout on the socket is correct and the card pins are c
Hi I'm using 2ch in ADC1 of STM32H735VGT.I set PIN15 to timer 5 and the waveform appears weird. What's the problem? My ADC1_Init :static void MX_ADC1_Init(void){/* USER CODE BEGIN ADC1_Init 0 *//* USER CODE END ADC1_Init 0 */ADC_MultiModeTypeDef multimode = {0};ADC_ChannelConfTypeDef sConfig = {0};/* USER CODE BEGIN ADC1_Init 1 *//* USER CODE END ADC1_Init 1 *//** Common config*/hadc1.Instance = ADC1;hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;hadc1.Init.Resolution = ADC_RESOLUTION_12B;hadc1.Init.ScanConvMode = ADC_SCAN_ENABLE;hadc1.Init.EOCSelection = ADC_EOC_SEQ_CONV;hadc1.Init.LowPowerAutoWait = DISABLE;hadc1.Init.ContinuousConvMode = ENABLE;hadc1.Init.NbrOfConversion = 2;hadc1.Init.DiscontinuousConvMode = DISABLE;hadc1.Init.NbrOfDiscConversion = 2;hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;hadc1.Init.ConversionDataManagement = ADC_CONVERSIONDATA_DR;hadc1.Init.Overrun = ADC_OVR_DATA_PRESERVED;
HI. I'm using 3ch in ADC3 of STM32H735VGT. They are running in Continuous conversion mode without delay. Do I have to give a delay after one conversion? If so, how long should I delay? Thank you. static void MX_ADC1_Init(void){/* USER CODE BEGIN ADC1_Init 0 *//* USER CODE END ADC1_Init 0 */ADC_MultiModeTypeDef multimode = {0};ADC_ChannelConfTypeDef sConfig = {0};/* USER CODE BEGIN ADC1_Init 1 *//* USER CODE END ADC1_Init 1 *//** Common config*/hadc1.Instance = ADC1;hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;hadc1.Init.Resolution = ADC_RESOLUTION_12B;hadc1.Init.ScanConvMode = ADC_SCAN_ENABLE;hadc1.Init.EOCSelection = ADC_EOC_SEQ_CONV;hadc1.Init.LowPowerAutoWait = DISABLE;hadc1.Init.ContinuousConvMode = ENABLE;hadc1.Init.NbrOfConversion = 2;hadc1.Init.DiscontinuousConvMode = DISABLE;hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START;hadc1.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;hadc1.Init.ConversionDataManagement = ADC_CONVERSION
OS: Ubuntu 18.04 LTSIDE: STM32CubeIDE v1.0.1board: STM32F769 Discovery KitI am trying to use LwIP with FreeRTOS. I turned ETH, LwIP, FreeRTOS enabled in the IDE.After generating code, I found that LwIP.c does not have MX_LWIP_Process() defined. There is a header definition in LwIP.h, but no function declaration in LwIP.c.Why does this happen? In this case, what should I do to use MX_LWIP_Process() in for loop.
void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef *hdac){ HAL_GPIO_TogglePin(START_OF_FRAME_GPIO_Port , START_OF_FRAME_Pin);} uint32_t val[] = { 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400}; HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, val, 10, DAC_ALIGN_12B_R); HAL_TIM_Base_Start(&htim2); this is my simple code. why transfer complete interrupt is not on last data?
CubeMX: 6.11.0STM32U5: 1.5.0uVision: 5.39.0.0Hi, I saw the latest post about USBX baremetal now being possible and thought i would give it a try.I want to read USB drives and usb uart port to PC for comms. but get the following errors in uVision when compiling
After STM32CubeMX update from version 6.10.0 to 6.11.0 WorkBench give me and error (see picture Worckbench.jpg attached).How to solve this problem ?I don't find any configuration on Wokbench to specify new STM32CubeMX installation.
Hello since a while ST changed the way CubeMX interacts with PHY driver. Is ist possible to write my own BSP package for CubeMX?And how ? Is there any documentation.I am using Microchip/Micrel KSZ8081 on MII STM32F437 Thanks and regards.Adib.
Hi,In 2019 I built a project using an SD Card and cube MX built the platform with FatFS R0.14 which came out in 2019.I revisited this project with a view to updating drivers and third party software. To find out what version of FatFs cube was using now I built a dummy project for the same and other processors and found CubeMX was using FatFs R0.12.the questions I have are:Why the reversion from R0.14 to R0.12?Are there any issues with using higher versions, currently the latest is R0.15?Has anyone played around with various versions and if so what were the conclusions drawn?Version R0.12 does not provide support for 64-bit LBA and GUID partition tables (FF_LBA64). Version R0.14 does.I am using FatFs R0.14 with an sqLite amalgamation and have occasional errors hence the reason for revisiting the FatFs version.
This is the error I'm getting when trying to download a firmware package in cube mx. I'm using the latest version.
Hi All,I found several topics with controversial information about what is this file used for?Like this:https://community.st.com/t5/stm32cubemx-mcus/what-is-the-mxproject-used-for/m-p/584042 I see in my file several sections [PreviousLibFiles][PreviousUsedKeilFiles][PreviousGenFiles] I don't see any critical information but not sure should I add it to commit or not?Thanks
Hello ,We are devloping application using NUCLEO-H503 , try to install USBX as CDC-ACM port and transfer data to host device ,1. Try to install Driver for USBX , but not found stmelectronics.xcube-azrtos-h5 How to use NUCLE-H503 USB in Device mode only as CDC-ACM port
Hi, I'm using STM32H735VGT and ADC3. There is too much time difference between converting 2 channels and 3 channels. I want to know why converting 3 channels suddenly takes a lot of time. And I want to know how to fix it. Here are the scope photos and codes in each situation. ADC3 , 2chstatic void MX_ADC3_Init(void){/* USER CODE BEGIN ADC3_Init 0 *//* USER CODE END ADC3_Init 0 */ADC_ChannelConfTypeDef sConfig = {0};/* USER CODE BEGIN ADC3_Init 1 *//* USER CODE END ADC3_Init 1 *//** Common config*/hadc3.Instance = ADC3;hadc3.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;hadc3.Init.Resolution = ADC_RESOLUTION_12B;hadc3.Init.DataAlign = ADC3_DATAALIGN_RIGHT;hadc3.Init.ScanConvMode = ADC_SCAN_ENABLE;hadc3.Init.EOCSelection = ADC_EOC_SEQ_CONV;hadc3.Init.LowPowerAutoWait = DISABLE;hadc3.Init.ContinuousConvMode = ENABLE;hadc3.Init.NbrOfConversion = 2;hadc3.Init.DiscontinuousConvMode = DISABLE;hadc3.Init.ExternalTrigConv = ADC_SOFTWARE_START;hadc3.Init.ExternalTrigConvEdge =
I am using timer 2 for trigger DAC and GPIO to generate analog and digital values.own timer 2 started with DMA to change ARR by an array.My GPIO array works well and starting to change from index 0 . but my DAC array start from Index 1. as you can see, the longest pulse (200ms) in latest DAC value (dac[9] = 4000) instead of (dac[0] = 2000) time[0] = 200000;time[1] = 100000;time[2] = 100000;time[3] = 100000;time[4] = 100000;time[5] = 100000;time[6] = 100000;time[7] = 100000;time[8] = 100000;time[9] = 100000; dac[0] = 2000;dac[1] = 2200;dac[2] = 2500;dac[3] = 2700;dac[4] = 2900;dac[5] = 3100;dac[6] = 3300;dac[7] = 3500;dac[8] = 3700;dac[9] = 4000; pin[0] = 0x0000FFFF;pin[1] = 0xFFFF0000;pin[2] = 0xFFFF0000;pin[3] = 0xFFFF0000;pin[4] = 0xFFFF0000;pin[5] = 0xFFFF0000;pin[6] = 0xFFFF0000;pin[7] = 0xFFFF0000;pin[8] = 0xFFFF0000;pin[9] = 0xFFFF0000;
I'm fairly new to embedded work and noted that the pin layout that was given for X-NUCLEO-53L5A1 was for the F401RE, which I initially tested, but when attempting to configure it with the H743ZI2 I wanted to maintain the use of the ETH and USB port pinouts. If anyone has a bit of insight on how I can do this that would be gratefully appreciated!
I am using the STM32G473LQFP48
Hello,I'm trying to use the .extSettings file to add files to my project and followed the description in "UM1718.pdf". Unfortunately, this don't work. I'm using STM32CubeMX to create a "Dummy" project for STM32CubeIDE.here is the content of my .extSettings file: [Groups] Middlewares/ST/netxduo/addons/ftp=C:\Users\xxxxxx\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AZRTOS-F7\1.1.0\Middlewares\ST\netxduo\addons\ftp\nxd_ftp_server.c;C:\Users\xxxxxx\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AZRTOS-F7\1.1.0\Middlewares\ST\netxduo\addons\ftp\nxd_ftp_server.h Web_Content=D:\cloud\OneDrive_Intector\project_team\TAG-ID\dev\web\E-Paper\index.html I'm expecting to find this in the STM32CubeIDE project view:But this is what I really find: I hope to find some answers to this issue, because STM32CubeMX is buggy enough even without this. Never forget:"Always be yourself, unless you can be a pirate. Then always be a pirate."
Test\Test.axf: error: L6050U: The code size of this image (34476 bytes) exceeds the maximum allowed for this version of the linker. How can I reduce the code size? Where can I download other ARM compilers? I use V6.21 and use Keil (Non-commercial use license) Does anyone have a site :)
I hope this message finds you well. I am reaching out regarding an urgent matter with my STM32 CubeMX v6.1 project. I have encountered an issue with the I2C functionality that I cannot seem to resolve despite trying various approaches.The specific problem arises with the following function: I have attempted to implement this function across different STM microcontroller units, including STM32WB10, STM32F750, and STM32F103, but unfortunately, the issue persists consistently across all of them. It's worth noting that I have verified the hardware compatibility by successfully testing it with Arduino and ESP32 platforms.Given that I have a project deadline looming, I urgently require your assistance in resolving this matter. Any guidance or insights you can provide would be greatly appreciated.Thank you very much for your prompt attention to this matter. I look forward to your response.
Hey there,i want to reach my flash memory through UART. I can do this with ST-Link device but now i want to do it with UART. I use STM32F091CC MCU and as datasheet says i configured the UART pins(PA9-PA10) as Asynchronus UART in CubeMX.My baud rate is 9600 bits/s- word legth 8bits - parity - even and stop bit is 1.In boot mode configuration. I try to use all configurations but i cannot reach the flash memory.I coded all options(set and clear bitss) in main.c program and when i click connect button in cube programmer it gives me an error like that:Please help me how to solve this problem. Regards
i'm working on ethernet (UDP/IP) without RTOS in keil, stm32cubemxsome old versions 5.4.0 work fine but if i send data continuously for 5-6 days then the ethernet stop working and in newer version 1.11.0 even ping doesn't happen.
Hello to support-team and specialists,We have the demo-board: NUCLEO-B071RB / MB1360-G071RB-C02and want to work the Demo-Example: "Hello World" with:X-Cube-Display: X-NUCLEO-GFX01M2.We loaded the latest STM32CubeMX: Version: 6.11.0Configuring the Software-Packs will list the following Warning/Error: "This version is not compatible with the current version of STM32CubeMX.It is compatibel with STM32CubeMX from 6.7.0 up to 6.8.1 !!!Is there a workaround?Could the team for the expansion-boards fix the version update?Any help will be appreciated.Thank you in advance.Armin
When HAL_ETH_Transmit_IT() returns an error the errval variable is not changed from ERR_OK to reflect that in the else section.
I'm using the Nucleo-C031C6 board, and I chose this (NUCLEO-C031C6) from the board selector when starting the IDE. (STM32CubeIDE v1.15). I tried switching Timebase Source (in SYS menu) from SysTick to TIM16, then when I compiled, I got this error:../Core/Inc/stm32c0xx_hal_conf.h:237:11: fatal error: stm32c0xx_hal_tim.h: No such file or directoryIt is just a bare project with no user code added.I had to switch from SysTick to TIM16 because I was trying out ThreadX.
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.