Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
1. Delete existing Network in X-CUBE-AI section2. Add a new Network (I tried with .tflite), click on Analyze3. Generate the code, open CubeIDE
Hi,I use STM32CubeMx 6.9.1 on a STM32H563 project. Programming the I2C pins, there is no way to setup the I2C_SCL pin as Alternate PushPull. Only the Alternate Open Drain is possible. Why?In my application, the I2C_SCL pin is connected to a serial EEPROM, and in my opinion there is no reason to not have this possibility.Or I forget something?
I'm trying to run inference of Onnx model. I tried to use the manual 'How to run locally a c-model'. in all the guides I found the input for the network is one number in my case the input is array of[1][32][101].I want to inference the array once so I defined the array inside the code:int main(void){float arr[1][32][101] = {{{-3.11280847, 1.20812774, 1.35149229, 2.38075948, 1.44475543, 2.02790046, 0.953049302, 0.914898038, -1.36378086, -1.10036778, -0.643827021, 0.442990154, 0.127005145, 0.347257495, 0.96026051, 2.16111732, 0.911462247, 0.0638621524, 0.420568168, -0.454940706, 0.278535783, -1.72249091, -0.0312718078, 0.677090943, 0.677178025, 3.62985706, 6.1095314, 4.71714258, 2.52096772, 1.85782039, 3.56450081, 2.33646345, 0.74150598, 3.00033593, 2.18773079, 2.3708117, 1.90530002, 0.935163617, 1.84133303, 1.83260036, 1.26168466, 1.35615361, 1.47735798,0.794498026, 1.27766323, 0.669813454, 0.333116472, 0.557521105, -1.19389999, -0.558699965, -1.95603204, -2.00413299, -2.47239089, -2.98
Hello everyone. I installed STM32CUBEMX and STM32CUBEIDE on my Windows 11 and use them so as to get updates from STM32CUBEIDE but I can not update STM32CUBEMX : on the home page of CUBEMX when I click on "CHECK UPDATES" opens the window "Check Updates Manager" but when I click on the available version (MX.6.9.1) is not selected so I can not press the "Install" button but only "Update" or "Close.I already had this situation for the previous version (6.9.0).Thank you for your help in advancePs. I attach screenshot
Hello my friends, why is not generated setup from CubeMx for my Keil, why is distinguish setup ?
Hi there,I would appreciate support in CubeMX for FreeRTOS for STM32U5-series. Currently I cannot find out how to configure this via the tool.FreeRTOS.org recently released a demo for IoT Reference Integration, running on an STM32U5. My old code is written and tested for using FreeRTOS, now we have to use the STM32U5-series, because older µC-series were not available.Is the porting already planned and if yes, when do you plan the release?Thanks for your answer ind advance.Best regards,K.
I'm looking for M7 core in UFBGA169 Package with 3 ADC units.According to "Analog" part of table devices like H747AI, H753AI, H757AI have no ADC!The same problem exists in Cube Target selector: when I move "ADC Total (converters) to "1" or more, then STM757AI disappears from results.According to Reference Manual RM0399 Rev 3, there are 3 ADC instances.My dear ST, dont you want to sell them?
I am working to get one F767ZI board (master) to send 1 byte to a second F767ZI (slave). I'm using 4k external pull-up resistors on SDA and SCL. I am trapping errors in the master and they are:After the following code on the master I get "Error 32".ret = HAL_I2C_IsDeviceReady(&hi2c1, 30,1, 1000);if ( ret != HAL_OK) { uint32_t error_code = HAL_I2C_GetError(&hi2c1); printf("Error %d\r\n", error_code); } Then, after the following code on the master I get "Error 4".ret = HAL_I2C_Master_Transmit(&hi2c1, 30, TX_Buffer, 1, 1000); //up to 1 second to try and sendif ( ret != HAL_OK) { uint32_t error_code = HAL_I2C_GetError(&hi2c1); printf("Error %d\r\n", error_code); }Since this is my first time ever trying I2C, I'm sure I'm addressing something wrong or some other simple error.I can't find anything in the HAL/LL reference to tell me what those error codes mean.thank you, russp.s. My master F767 spits prin
Hi,I was wondering what is the purpose of the API HAL_FLASH_Program_IT(..) provided by CubeMX (based on NUCLEO-F746ZG but seems to be widely the same for other MCU references..).As it allows to write a single value at a time it seems useless to attempt writing data by interruption; Prefer polling API HAL_FLASH_Program(..) instead.Also I expected to use interruption callback to chain multiple value writing, But the current logic from CubeMX code is not able to work like this (erroneous logic to unlock next write directly inside the interruption callback HAL_FLASH_EndOfOperationCallback(..) ).Specially, I know that some of STM32 MCUs embed a dual bank memory to avoid blocking an application, and it could be particularly useful to let writing some flash data by interruption while the application is still running...So I was wondering what is the real purpose of this interrupt API? Because I currently don't imagine another way to use it...Note: erasing flash memory APIs offer possibility to
In the reference manual: https://www.st.com/resource/en/reference_manual/rm0468-stm32h723733-stm32h725735-and-stm32h730-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdf there is a clock symbol mentioned called: spdifrx_symb_ck which is shown on page 336 to connect to the SAI4 clock signal. However I cannot see ANY way to set this up in STM32CubeIDE.Can anyone please let me know how to set this up so that the SAI output is sychronized to the SPDIF in?Thanks.P.S. which STM32 MCU's have the ability to do this synchronization?
The newest CubeMX 6.9 does not generate HAL_SYSTICK_IRQHandler in SysTick_Handler Moreover, when you disable Hal handler in CubeMX, for disable this option for systick, it removes Hal_IncTick With enabled option:
In the System View Description file STM32WLE5_CM4.svd it says; <fpuPresent>true</fpuPresent> But the datasheet doesn't mention any FPU, the MCU Selector on st.com has a dash "-" for FPU column , and ARM docs about Cortex-M4 says that FPU is optional.So, is there an FPU or not in STM32WLE5 (and STM32WL55, as there the SVD says the M4 has an FPU but the M0 doesn't)?
Starting today, on existing .ioc file, CubeMX "suddenly" complaining that project generation had a problem. "Suddenly" refers to that I have generated code incrementally many times the last few days on the same project, and today I added "FatFS" which was the first time I got it. So I disabled FatFS, but the problem persists.Starting CubeMX from command-line I got to the following Exception;2023-08-03 09:01:41,438 [INFO] ProjectBuilder:3064 - Time for Copy HAL[1] : 40mS. 2023-08-03 09:01:41,442 [INFO] ProjectBuilder:4404 - Project Generator version: 4.1.0 2023-08-03 09:01:41,609 [INFO] ConfigFileManager:1457 - The Die is : DIE497 2023-08-03 09:01:41,993 [INFO] ToolchainGenerator:570 - stack trace : java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
HelloI am using CubeIde and cubeMx on a project for several years with no issues.But I am facing today a limit of CubeMx:On a STM32L431RCTx I need to have UART2_RX on PA15 and PA2 as GPIO_EXT, not as UART2_TX. CubeMX forces me to have PA2 as UART2_TX :(I also can't easily use "USER CODE BEGIN/END" areas because CubeMX uses elseif which I can't split (see attached image)1) Is there a trick to mixing MX setups and personal setups (and this "elseif" not nice)?2) Is it better to configure everything manually? if so, what is the best practice?Thank you very much in advancePS : I'm using CubeID3 1.13 with STM32Cube FW_L4 V1.18.0
Hello All,When I am configuring the ethernet for my F207 and F7 nucleo board in its getting stucked into startup file. and through debugging when I am pressing F5 button for many times, then its getting out from startup file and my code starts working and getting pinged from my PC.But when I am generating code from CubeMx 5.4.0 version for same configuration, its working fine. (checked ethernet pins according to schematic and corrected)Here I Have attached ioc file(generated with of cube Mx 6.8 not working). Same configuration Have done for cube Mx 5.4 and it is working.but If I migrate Cube Mx 5.4.0 configuration to 6.8 it's working.I am trying to generate ethernet stack form cube Mx 6.8.let me know any solution on this.RegardsLavanya.@LCE @Piranha. @Piranha
Hello friend, how to include function in library for Nand? I configuration my microcontroller from CubeMx for Nand memory and generated code, setup is bank and etc. In open code in Keil is including nand library, but is not in library is not include banks and etc.
Hello,I am using STM32CubeIDE version 1.13.0 together with STM32CubeMX version 6.9.0-RC9 and the STM32F746IGT6 microcontroller.I am trying to use TIM2 as a 4 channel Input capture unit, each channel with it's own independent DMA . For this i have the following DMA Streams available:- DMA1 stream 5 - for TIM2_CH1- DMA1 stream 6 - for TIM2_CH2/CH4- DMA1 stream 1 - for TIM2_UP/CH3- DMA1 stream 7 - for TIM2_UP/CH4 The problem i am having is that if I add the DMA1 stream 7 .... stream 6 & stream 1 can no longer be added due to conflicts. In the generated code i see that both events UP & CH4 get linked to this DMA stream so i am guessing that this is why the MX won't let me add the other 2. Now my question: - Even though the tool does not allow it since one trigger can be selected for one DMA tream (Channel selection) i think it should be possible to have the following configuration:- DMA1 stream 5 - for TIM2 CC1 - DMA1 stream 6 - fo
Hi friends I tried to configure the ethernet driver to use LAN8720 and also LAN8742 but I find that some icons missed.the menu that I faced is like this:but some search on the internet shows that I don't have some parts:look at lines and arrows. and also one of the headers missed too[advance parameters]. the version that I use is 6.9.0what can I do to solve problems?thanks for your attention
I'm looking at using the MX25L3233F for flash storage. This is a serial NOR device. It appears to support QuadSPI, but it also appears to support regular SPI:"MX25L3233F features a serial peripheral interface and software protocol allowing operation on a simple 3-wirebus while it is in single I/O mode. The three bus signals are a clock input (SCLK), a serial data input (SI), and aserial data output (SO). Serial access to the device is enabled by CS# input"I'm planning on using this with an STM32G03 series, which does not support QuadSPI, but does support SPI.Am I being too naïve to think I can use this as a regular SPI device and just use it for storage?
Hello to all from Germany,I try to set up a CAN communication between the STM32F105RB and PCAN-Ethernet-Gateway. I have configured all my peripherals with STM32CubeMX (Version 5.3.0) and generated the code for Keil uVision (V5 28.0.0) and Atollic TrueSTUDIO (Version 9.3.0). I know that the hardware of the CAN bus is perfectly working (because of an other project) so the problem has to be either in my code or in the HAL library. So, my problem is:I have made a CAN frame with header and payload and I tried to transmit it with the CAN1 peripheral. I activated all interrupt sources by means of the function HAL_CAN_ActivateNotification(...). I also activated the CAN peripheral using HAL_CAN_Start(&hcan1). I am trying to transmit the CAN frame when an interrupt occurs because of an empty transmit buffer. I have noticed that this kind of interrupt never occurs. But why?The flags BOFF, EPVF, EWGF are toggling between 1 and 0 all the time without a recognisable pattern. I try to set a
I am trying to implement a driver for an EEPROM. I created as follows: typedef struct { uint16_t address; uint16_t size; uint8_t *data; } test_t; And create a structure array as: test_t test[] = {{0x0000, 50, NULL}, {0x00AB, 70, NULL}, {0x0AB0, 98, NULL}, {0x7F0C, 64, NULL}, {0x24AB, 200, NULL}} I create 5 uint8_t arrays give their address to the pointers inside the structure as: // Assume I create 5 arrays via a function here test[0].data = array1; test[1].data = array2; . . . Now, I am trying my drivers with this test array, for(uint8_t var = 0; var 5; ++var) { write_function(test[var].address, test[var].data, test[var].size); read_function(test[var].address, test[var].size, output_array); } Assume output is defined somewhere else in the main function and is big enough to hold the data. My intention is that I wanna look at the value of the output_array so that I can deduce whether my driver works or not. In debug mode, if I go over t
HI all i have been working in stm32L072CBT6 controller i have the code to read the adc multiple channel and i can read the values for different channels individually by using separate code for each channel but if im reading all the four channels altogether the the value in one channel is reflecting in all the channels. And i have also checked whether the voltage in each channel is same and found that all the values are different though im getting the same values for example channel1 values reflecting in channel 0 any thought on this issue kindly share me. I have attached the code below.static void MX_ADC1_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc1.Instance = ADC1; hadc1.Init.ClockPres
When set divider by 8 for cortex system timer, Cube doesn't generate properly code like below: HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK_DIV8)
Hi there,is there a possibility in CubeMX to add a remark/comment/note to a peripheral or its configuration?Background:I would like to leave a note (in CubeMX) about what I use Timer5 for and why I configured it that way
Downloaded the new CubeMX version, started a new project, tried to configure TIM1, but clicking on TIM1 does nothing. I'm expecting it to show TIM1 configuration details which I can edit somewhere.Am I missing something? (TIM1 is not special, nothing on the left side produces a useful result when clicked.)
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.