Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I'm using Atollic True Studio V 9.0 , CubeMx v5.1.0, STM32F407VG-DISC1 board and enabled DMA for UART2. My code:int main(void) { int i = 0; HAL_Init(); for(i = 0; i<10; i++) rx_arr[i] = 0; for(i = 0; i<10; i++) tx_arr[i] = i*2; SystemClock_Config(); MX_GPIO_Init(); MX_DMA_Init(); MX_USART6_UART_Init(); MX_USART2_UART_Init(); while (1) { if( HAL_UART_Transmit_DMA(&huart2, (uint8_t*)tx_arr, 10)!= HAL_OK ) { Error_Handler(); } while(UartReady != SET) { } UartReady = RESET; if( HAL_UART_Receive_DMA(&huart2, (uint8_t*)rx_arr, 10)!= HAL_OK ) { Error_Handler(); } while(UartReady != SET) { } UartReady = RESET; } } void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart) { UartReady = SET; } void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) { UartReady = SET; }What I'm trying to do is fairly simple. Transmit through DMA and wait till it gets transmitted. And then receive and
Hello,I'm trying to get DHCP working as an initial step in using LwIP. Have generated project with CubeMX and now I'm catching the problem. Using Wireshark, I can see that DHCP Discover packet is sent, but no response is received. IT seems that something is wrong with the packet. As a reference, I also captured DHCP packet from my laptop that does work and gets response.Any advice what is wrong ?Thanks in advance,regards,Rob.Packet from STM32F439 :No. Time Source Destination Protocol Length Info 3006 49.570106 0.0.0.0 255.255.255.255 DHCP 350 DHCP Discover - Transaction ID 0x5851f42d Frame 3006: 350 bytes on wire (2800 bits), 350 bytes captured (2800 bits) on interface 0 Interface id: 0 (\Device\NPF_{A7ACDF3A-ED3E-4FAD-B7B4-533C6D411BF2}) Encapsulation type: Ethernet (1) Arrival Time: May 1, 2019 10:37:34.873435000 Srednjeevropski poletni �?as [Time shift for this packet: 0.000000000 seconds] Epoch Time: 1556699854.873435000 seconds [Time delta from previous captured fra
A little of history.I was working on a board that had a stm32f407, where it had a partial code and printf function worked, so long.Soon after, I received an update to stm32f429 at that moment gave $% & #.Try debugging a third-party code where you do not have to read lines and lines of code to understand the problem.Add to this a third-party rtos, it will stink, at the very least!The tip is, I stopped debugging when I realized and I could not understand where the bad smell came from.To reproduce the problem:tools produced;purchased tools;tools used;By ST.Putting it together STM32CubeMX 5.1.0 + Atollic TrueSTUDIO + Freertos.Put a printf inside a task. Of course with a usart port configured.It certainly will not work.First add this in your usart.c without changing even a line in syscalls.c./ * USER CODE BEGIN Includes * / #include <errno.h> #include <unistd.h> / * USER CODE END Includes * / / * USER CODE BEGIN 1 * / int_read (int file, c
I'm running CubeMX 5.1 with FW_F4 V1.24.0 and Atollic TrueStudio 9.3.0. I have eleven RTOS tasks defined in CubeMX, but only one is actually invoked with its StartTask routine. As long as the priority on the task is osPriorityNormal(0) or lower, the code runs on my STM32F407 Discovery board. If I assign a higher priority (AboveNormal, High, RealTime), the code halts in the Hard Fault Handler routine. The actual fault is a Bus Fault, precise data access violation. This version of CubeMX/FW_F4 requires the use of CMSIS RTOS.Has anyone else run into this problem? As a workaround, I'm limiting the tasks to the priority levels of Idle, Low, BelowNormal and Normal.cjwilde
I am trying to implement CAN between two STM32F373, with one as master and another as slave. The problem I am facing is that it cannot be configured in slave mode. I am using Cube MX to create the initial configuration.When I configure in slave mode CAN pins doesn't appearWhen I configure master mode the CAN pins appear as belowCode also doesn't contain CAN initialization routines, when Master mode is dis-selected. I have kept the generated main files as attachment.
Hi,Wondering if it is possible to set LWIP on any microcontroller whihc doesn;t have Ethernet ...Thank you
Why does the SYS tab in the System Core category show me a stamp like in the attached screenshot?
Hello,i want to design a board around STM32L4R5QII6P. It is not listed in STM32cubemx tool. Another issue is the lack of availability of this chip with any distributor. Similar controller without dedicated Vcore pins is available (part number STM32L4R5QII6), but to reduce my power consumption i want the one with external SMPS supply option.-Is STM32L4R5QII6P too new a device to be supported in stm32cubemx (version 5.2.0) tool and not available to buy? Any plans by ST to add it in stm32cubemx? If yes than any approximate timeline?-is STM32L4R5QII6 a drop in replacement for STM32L4R5QII6P? So till the time i am not able to get the P version, i do my prototypes with STM32L4R5QII6.thanks for the help.
I recently switched an older project to CubeMX 5.1.0 and the F3 firmware package V1.10.0. We used freeRTOS and tim3 as the timebase source as tim1 and tim2 are already in use. The program does not pass the initial timebase configuration any more and the call of HAL_TIM_IRQHandler(&htim3) in the TIM3_IRQHandler(void) has disappeared. When using any other timer the call is generated and it works if I manually add it in the user code section, could it be that this is a bug in the code generation?
I'm trying to read and write to a microSD card using this reader from sparkfun https://www.sparkfun.com/products/12941 and a nucleo board with a STM32F429ZIT6U MCU via SDIO interface. I created the project through CubeMX V 4.21 (I used the most current version 5.2 at first and ran into issues then saw some forums that said 4.21 was more stable). SDIO and FatFs middle ware were enabled in CubeMx and well as LED1 and LED2 (PB0 and PB7). I got the program from and followed these series of videos for the main.c code https://www.youtube.com/watch?v=Y5UMTGQDmog and https://www.youtube.com/watch?v=0NbBem8U80Y&t=218s. Here's a snip of main.c /* USER CODE BEGIN 0 */ //define global variables FATFS myFATFAS; FIL myFILE; UINT testByte; /* USER CODE END 0 */ int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration----------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flas
I am working on a project which is an upgrade of an existing project. The existing project was done with an Atmel processor, the current upgrade is based on an STM32F767. The project involves, among other things, multiple serial busses communicating with multiple devices. I used STM32CubeMx to develop drivers for all the ports, and all of them but one is running. However, unknown to me until today was that one of the ports is using what Atmel called "multidrop",which is what I remember from projects a long time ago as "UART 9-bits protocol", where the 9th bit is used as an address bit, so that writing to a specific device can be done by addressing it, and after addressing the address bit is lowered, and data is sent 9 bits with the MSbit as 0 only bothering the addressed device. First, It is unclear from the documentation if this is what is meant by "Multiprocessor Mode". If so, two things are unclear from the HAL functions. The first is how to generate the address bit in a frame of da
Hello,I'm working with a bootloader so I need to change the Vector Table base offset to 0x00002000. This is done in system_stm32f1xx.c file:#define VECT_TAB_OFFSET 0x00002000U /*!< Vector Table base offset field. This value must be a multiple of 0x200. */But as this part of code is not inside a USER CODE section, every time I regenerate the code, I should change this macro manually. I'm looking for any better solutions.Regards,Shayan
I opened a project, upgraded to new CubeMX. Checked this option, regenerated the project. After re-opening the CubeMX file, this option is still set, because generation work correctly (no main() generated), but GUI isn't show it as set. The "set" sign (idk what is proper name for this :)) is missing.After opening settings tab, clicking on OK will result in re-generating main().
Hi. I am using CubeMX code generation for the STM32F767VITx. I recently updated to CubeMX 5.1.0. Since updating, every time I choose to generate code, I get the following warning:" - These IPs still have some not configured or wrong parameter values: [GFXSIMULATOR]" However, GFXSimulator is not used as a part of this project and has not had any of its parameters changed.As far as I can tell there appears to be no way to actually disable the GFXSimulator itself, and no amount of clicking 'Reset Configuration' will make the warning disappear. The only method I have found to actually make the warning disappear is to set my clock to 200MHz, but I cannot use that clock speed for the project and that "fix" only seems to work half of the time.This issue does occur on a blank new CubeMX project for the STM32F767VITx.In addition, when this occurs a pair of files named 'gfxsimulator.c' and 'gfxsimulator.h' are generated, both of which contain a bunch of empty method declarations.Any help would b
Once downloaded, the SetupSTM32CubeMX-5.2.0.app exits immediately.If launched with sudo (from a command shell) an error is reported:$ sudo open -a ~/Downloads/en.STM32CubeMX_v5-2-0/SetupSTM32CubeMX-5.2.0.app/ Password: LSOpenURLsWithRole() failed for the application /Users/dev/Downloads/en.STM32CubeMX_v5-2-0/SetupSTM32CubeMX-5.2.0.app with error -10810.Has anyone found a way to avoid this problem? Again, this is on a supported iMac running Mojave 10.14.4 (18E226).
Hi, I use stm32h743zi nucleo board.I did clock configuration for stm32h7 with cubemx ,but I want to write clock configuration without hal library with registers.My clock configuration codes in attachment.Is there anyone who can tell me where is the mistake ?
If you generate a project for Atollic and try to use it's Release build configuration, Atollic will show a warning in project settings:"Orphaned configuration. No base extension cfg exists for com.atollic.truestudio.exe.release.1518366166"You can reproduce this with a clear project, it happens every time. I'm working with STM MCU's for a year, and inbuilt Release configuration always showing this error.
..
Although I was quite excited to fire up the CUBEMX tool, I felt a little disappointed when, having selected on dev board (Nucleo etc), the tool did not then show me the mapping from the CPU pins to the board pins, with references to the on board LEDs and jumpers etc.Also if you could attach application labels to the board pins, these could reflect back into the generated code, say as a suffix e.g. _RELAY1 I think having this capability would greatly enhance the tool as a "getting started" tutorial by bridging the mental gap between physical board and registers and software.
I am using the eval board STM32L4R9I-EVAL.The generated code failde in OCTOSPI1_Init/ HAL_OSPI_AutoPolling:it runs by if ((hospi->State == HAL_OSPI_STATE_CMD_CFG) && (cfg->AutomaticStop == HAL_OSPI_AUTOMATIC_STOP_ENABLE)) {.....}else{..........}into HAL_Error.does any one know why?CubeMX: V5.1.0Package for STM32L4: V1.13.0Octospi2 on Hyperram works fine.
I have STM32H743ZI nucleo board. I want to generate code from CubeMx with FreeRTOS.But CMSIS RTOS API is mandotary. I dont want to use CMSIS RTOS API as interface. is there any way to generate code with FreeRTOS without CMSIS RTOS API.
My program suppose to be like following:defaultTask - MX_LWIP_InitserverTask - my FUTURE purpose (using socket)ntpclientTask - ntp purpose (using socket)Once I call MX_LWIP_Init() in defaultTask a got stuck in ntpclientTask on socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); // Create a UDP socket.at queue.cBaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue );If I call MX_LWIP_Init() ans socket(...) in same task I have no issue.Any idea how I can call MX_LWIP_Init() ans socket(...) in different tasks?Thank you Rudo
When doing complex Cube projects often you have to make decisions about peripherals or pins or I/O configurations for specific, but not always obvious, reasons. If nothing else it would be nice to be able to attach some notes to a project so someone using it down the road can figure out why you did what you did.
I'm using STM32CubeMX 5.2.0 to generate a project for an STM32L0x1 device.In the code generator settings everything is selected as LL (no HAL).Nevertheless, Cube generates the selected PVD (SYS -> Power Voltage Detector In) configuration (and the interrupt activation selected in NVIC settings) in the stm32l0xx_hal_msp.c file using the HAL library function.Expected result: use LL, it has all the required functions/macros for configuring the PVD.Thank you.Edit:I found out that this happens only when the Flash global interrupt is enabled. If I disable the Flash interrupt from Cube's NVIC settings, the PVD code is being generated in LL mode, no HAL used.The flash interrupt issue was reported earlier, so it seems this is related to that older bug.
Posted on October 11, 2017 at 17:26Hi,I have a L432KC Nucleo 32 and it never runs as fast as I expect it to.I have configured the clocks in STM32CubeMX as shown in my attached screenshot. I've configured MCO to match the SYSCLK so I can measure it with my oscilloscope.According to STM32CubeMX, the SYSCLK should be 80MHz, but when I measure it with my oscilloscope, it's only 8MHz. If I change some things (e.g. use HSI RC instead of MSI RC) then I can get different speeds, but they never match the value shown in STM32CubeMX.My only guess is that this being a low power version of STM32, does it work in some kind of low power mode with a lower clockspeed by default? If so, how do I get it out of that?Thanks for your help,Colin#nucleo-l432kc #stm32cubemx
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.