Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I am USING BOTH ETHERNET+USB IN STM32H743ZI WHEN I CONNECT ETHERNET THEN NORMAL BUFFER UPDATE PROBLEM OCCURING cnt_10=11; ///this buffer is updated MX_LWIP_Init(); //ETHERNETHAL_Delay(10);cnt_10=12; //this buffer is not updated cnt_10=11; ///this buffer is updated &
I am trying to install STM32CubeMX-6.10.0 on Ubuntu 22.04.Following the instructions, I have unzipped the installation ZIP archive and changed the permissions for SetupSTM32CubeMX-6.10.0 to be executable. I have also made all files in jre/bin/ executable.I then run SetupSTM32CubeMX-6.10.0 from my home directory and pick an installation directory in my home folder, but during step 1/7 of the installation, it fails with an error:"Error executing /bin/chmod a+x /home/magnusl/STM32CubeMX/STM32CubeMX"I have tried running the installation as sudo and I get the same error. I have also tried to manually run /bin/chmod a+x /home/magnusl/STM32CubeMX/STM32CubeMX and it works fine. But if I restart the installation script after this, it complains that STM32CubeMX is already running, so I cannot make it continue unless I delete the whole directory and then I'm back on square 0.Does anyone have an idea on how to solve or work around this problem?
Hi I am currently using STM32CubeMX version 6.4.0 to configure the STM32H7 series. I have configured it as a USB host, and I want to send messages through USB. Therefore, I called the USBH_CDC_Transmit function. However, when this function reaches the if condition, it directly jumps into the HardFault_Handler. I don't know why. Below is the specific function USBH_CDC_Transmit: USBH_StatusTypeDef USBH_CDC_Transmit(USBH_HandleTypeDef *phost, uint8_t *pbuff, uint32_t length) { USBH_StatusTypeDef Status = USBH_BUSY; CDC_HandleTypeDef *CDC_Handle = (CDC_HandleTypeDef *) phost->pActiveClass->pData; if ((CDC_Handle->state == CDC_IDLE_STATE) || (CDC_Handle->state == CDC_TRANSFER_DATA)) { CDC_Handle->pTxData = pbuff; CDC_Handle->TxDataLength = length; CDC_Handle->state = CDC_TRANSFER_DATA; CDC_Handle->data_tx_state = CDC_SEND_DATA; Status = USBH_OK; #if (USBH_USE_OS == 1U) phost->os_msg = (uint32_t)USBH_CLASS_EVENT; #if (osCMSIS < 0x20000U) (void)osMes
Code generation with STM32CubeMx version 6.5.0 is missing the HAL_RTCEx_SetWakeUpTimer_IT () that should be in the MX_RTC_Init () function.
Posted on June 20, 2015 at 04:17What is the meaning of IP in the STM32CubeMX software? I looked at the documentation, but I don�t find it and google obviously show me TCP/IP. Thank you. #cube #stm32cubemx
..
Hello, ST experts STM32U595VJT6 is used on our own HW design. There is external SD3.0 compliant level translator NVT4857UK to help to work on UHSI mode. Everything is fine when SDIO clock sets as 96MHz or lower. But when the SDIO clock is higher than about 100MHz, the program which derived from cubemx stalls at HAL_SD_Init() . Is there any idea about this?BTW, the SD card can support UHS-I, and read speed can reach 80MB/s when attached to PC. BRYang
Hello everybody,for first time flash programming of private CAN bootloader i want to use the ST bootloader.Despite of the nBoot_SEL Bit i can flash data if the flash is empty.The bootloader mechanism is shown in Figure 55 in the AN2606.Now the questions :1. Do i have to set valid level for e.g the RXD pins of UART 1 and 2 and 3 or are the internal pullup R used ?2 During scan of all possible interfaces, see Fig. 55 in AN2606, are the corresponding output pins (e.g. TXD pins) of the interfaces in Tri-state ?E.g. UART3 is used for flash update, is it possible to use TXD of UART2 for input, that means an external driver circuitdrives into TXD of UART2 ?3. If i use FDCAN, do i have to use FDCAN1 (PD0 and PD1, AN2606, Table95) or FDCAN2 (Manual, 2.5, page68, pins ?) ? Thanks in advance,BR, Kai
Other than reserving pins for the hardware-implemented debug interface (Fig. 1), what are the effects of the highlighted settings of the "Trace and Debug" category of CubeMX (Fig. 2)? Fig 1: Debug infrastructure (RM0433) Fig 2: CubeMX Trace and Debug Changing those settings has no effect in regard of code generation. How would one utilize i.e. External Trigger Bi-directional? I would have expected the system to halt (essentially triggering a breakpoint) on a signal change of the reserved TRGIO pin when activating this setting - but nothing happens. The same is true for the other direction, triggering a breakpoint does not change the value on the TRGIO pin. The same goes for the setting Trace Synchro SW (x bits). SWDIO and SWCLK can be used to communicate with a debugger, but TraceD0 seems to do nothing? I could not find an answer in the datasheet as referenced by Table 595 in RM0433.
Hi,I have a Nucleo-F767ZI board, and am trying to configure it to use its LEDs, USART3 which is the virtual com port of the ST-Link on the board, and eth, I added LWIP, but I am unable to enable the LWIP_SOCKET as it requres to enable LWIP_NETCONN, by looking through the "General Settings" and "Key Options" with "Show Advanced Parameters" checkbox checked, I did not get a clue on how to do it. RegardsChao
I generated an Azure RTOS project with the FileX option with RAM disk simulator enabled. This was on a Nucleo-H723 board. I used STM32CubeMX 6.9.2-RC4. It was X-CUBE-AZRTOS-H7 v 3.2.0.The problem is the 'SRAM Disk Driver' option for the 'SRAM Disk Address' defaults a fixed address of D1_AXISRAM_BASE. The default linker places variables starting at D1_AXISRAM_BASE as well. The FileX SRAM simulator sets its buffer to zero and erases a FileX related variable. It likely corrupts other variables as well but that was the error detected by trying to run the generated code.The LevelX NOR Simulator Driver also uses a fixed address of D1_AXISRAM_BASE and would cause similar corruption as well as not coexisting with the RAM disk. I have not tried but I suspect the LevelX NAND Simulator Driver would suffer the same issues.I hope ST understands how frustrating it is to have to debug the generated code when there are such basic issues. Especially as we are just trying to learn
Hello,I am using STM32CubeIDE v1.14.1. I am trying to setup my project such a way that the code generator generates only Release configuration. Or to be more precise, just to update the only existing configuration (Release, defined in the .cproject file).In my case it works such a way that after code generation I am getting 2 new configurations (Release + Debug) besides my existing Release configuration.Any advise is appreciated.Thanx.Best regards,peter
So, I was having lots of trouble getting an I2C discrete I/O expander chip working with the STM32H745 Disco board, and discovered, besides needing to shift the I2C address left by one bit, that the I2C clock goes faster the more you increase any of the dividers in the chain to the I2C peripheral when using STMCubeMX to set up the I2C clock. That is, the baud rate on the I2C SCLK line, as seen by an oscilloscope, decreases with all three clock dividers: D3PPRE,HPRE Prescaler, andD1CPRE prescaler,all with I2C custom timing disabled and in standard speed mode, 1KHz frequency requested (couldn't make that work at all), 100ns/300ns rise/fall times, analog filter enabled, digital filter coefficient 0, and no slave features enabled. This is autogenerated code from STMCubeMX 6.9.2 and compiled with optimization turned off on IAR Embedded Workbench for ARM 9.5. I've added calls to read and write to an I2C memory only, and turned off a bunch of peripherals I'm not usin
Hi all,just found an error preventing the adc from working properly when the driver is generated by STM32Cube FW_G4 V1.5.2 (and 1.5.1).there are some missing lines like this one:sConfig.Channel = ADC_CHANNEL_2; you can compare my 2 attached files to see for yourself.kind regards,Yves
HiI think I found a small bug.I copied the settings from one project to another. After that I did a diff to show if I'm missed to change some value. And one variable was missing, so I checked double to find the variable in the GUI, but I did not found it. Till I found the bug described below.When Video Mode is "Non Burst Mode", it has an additional variable "Null Packet Size", when this variable is changed it is in the IOC file. Till now everything correct, but if now the Video mode is changed to "Burst Mode" then the variable is not anymore visible in the GUI, but still available in the .ioc file. In my opinion the the variable "NullPacketSize" should be removed from the .ioc file when it is not visible in the GUI. (See also pictures) Thanks in advancenobody
@Khouloud ZEMMELI, @Imen.D ,I am aware that FMC MRAM/SRAM (connected to NE1) (or even others) cannot be used until the main clock is configured, Pins clocks are configured, and FMC registers are set.Please help me connect to someone who can help me understand the STM32CubeMX settings to use the template:SystemInit_ExtMemCtl() And also help generate the code parts for below functions which does not use any RAM variables or otherwise clear them up when main() executes and the library function calls the internal RAM content clear code part. SystemClock_Config(); PeriphCommonClock_Config(); MX_FMC_Init() HAL_SRAM_Init() HAL_FMC_MspInit()It would be helpful if STM32CubeMX would help generate the desired code rather than me having to code it.If the FMC (for STM32H7 series) is initialized before the main executes, I will be able to store global variables in SRAM which are initialized during initialization.Please share your views.Thanks!Rajeev
The STM32CubeMX tool (I'm using 6.10.0) continuously hangs after GENERATE CODE on "Generating user source code..."The STMCubeMX.log file (within the .stm32cubemx directory) shows a java.lang.NullPointerException: 2024-02-20 08:52:19,505 [ERROR] CodeEngine:200 - catch error: There are no more files 2024-02-20 08:52:19,505 [ERROR] ProjectBuilder:2205 - java.lang.NullPointerException: Cannot invoke "com.st.microxplorer.codegenerator.TemplateFile.getPath()" because "this.template" is null at com.st.microxplorer.codegenerator.CodeEngine.genCode(CodeEngine.java:243) ~[STM32CubeMX.exe:?] at com.st.microxplorer.codegenerator.CodeGenerator.generateOutputCode(CodeGenerator.java:5673) ~[STM32CubeMX.exe:?] at com.st.microxplorer.codegenerator.CodeGenerator.generatePeriphConfigCode(CodeGenerator.java:2876) ~[STM32CubeMX.exe:?] at com.st.microxplorer.codegenerator.CodeGenerator.generateCodeFiles(CodeGenerator.java:1964) ~[STM32CubeMX.exe:?] at com.st.microxplorer.codegenerator.CodeG
CMSIS need to be updated to the new version.The version 6 changes some register name in header file.(Drivers\CMSIS\Core\Include\core_cm4.h etc.)Tested on MCU package F3 v1.11.4 and G0 v1.6.2. Guessing all MCU package using CMSIS v5.0.3.
Hi, i found a strang behaviour.I did some settings to the lwip library in MX and taught it would unlock some features but no.There are still grayed out. Often it works, but it's really confusing.
Hello guys!Now a days im facing issue with ethernet configuration in the latest version of CubeMx 6.8.1.When im configuring the ethernet for my F207 nucleo board in its getting stucked into startup file. and through debugging when im pressing F5 button for manay times, then its getting out from startup file and my code starts working and getting pinged from my PC. But when im generating code from CubeMx 5.4.0 version for same configuration, its working fine. im not geeting any issues with this version.has anyone resolved this issue?
I have modified the SBSFU for STM32G4 to use external flash. I have firmware updates working, but when i turn on SFU_MPU_PROTECT_ENABLE, I get a 'SFU_EXCPT_MEMORY_FAULT' at the following line within HAL_QSPI_Init(), where the QSPI registers are modified: /* Configure QSPI Clock Prescaler and Sample Shift */ MODIFY_REG(hqspi->Instance->CR, (QUADSPI_CR_PRESCALER | QUADSPI_CR_SSHIFT | QUADSPI_CR_FSEL | QUADSPI_CR_DFM), ((hqspi->Init.ClockPrescaler << QUADSPI_CR_PRESCALER_Pos) | hqspi->Init.SampleShifting | hqspi->Init.FlashID | hqspi->Init.DualFlash)); It seems like i need to update the MPU settings, but following the example projects results in different errors. Here is what I have for peripheral setting in sfu_low_level_security.h /** * @brief Region 0 - Enable the read/write operations for full peripheral area in unprivile
Hello.Recently I've been trying to set up a multichannel ADC. The data of both channels are supposed to be transfered to memory through DMA. I've looked through many examples, read many discussions but none of them addressed my issue. In my CubeIDE CubeMX application I just can't see certain parameters for choosing and therefore cannot keep up with the tutorials. The picture below describes what I should be seeing what I see. Any Help would be appreciated.
Dear @Khouloud ZEMMELI , @Imen.D , @TDK ,Please help add support for MDK-ARM version 6. Currently highest selectable Min Version is V5.32Also help add GCC folder instead of RVDS folder when MDK-ARM version 6 is selected.Currently I need to execute below steps manually. The downside is that whenever I regenerate the code, I loose the GCC folder and compiler setting.Steps:I first have to generate a MDK-ARM V5.32 project, then open it in Keil IDE, then change the compiler to be used from Version 5 to Version 6 (via the Options for Target... -> Target -> Code Generator: Arm Compiler)Then I need to save and close project.I then go inside ../Middlewares/Third_Party/FreeRTOS/Source/portable/ and delete RVDS folder and instead copy the GCC (folder which the IOC file generates for STM32CubeIDE).Finally I open up the UVPROJX file in Notepad++ and change RVDS in strings/paths to GCC, so that the new strings look similar to below:../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM
As I wrote in the subject, Upgrading STM32CubeMX from version 6.6.1 to 6.7.0 The SDCARD stops working.During mounting : fr=f_mount(&FatFs,"/",1); if(fr==FR_OK) { ... .... }returns "FR_NOT_READY"The micro is an STM32F4, I use SDIO in SD 4 bits Wide bus mode and it has always worked fine.RegardsDomenico
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.