Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on June 28, 2018 at 15:04 Hello, im generating default ethernet codes from CubeMX. im using freertos+lwip and i set static ip. All other lwip settings are default. My clock config: My default lwIP settings: My default FreeRtos settings: And i use simple below iperf codes for test. void iperfthread(void *arg) { ethernetif_input(&gnetif); } void iperf_test_start(void) { sys_thread_new(''iperfthread'', iperfthread, NULL, 128, osPriorityRealtime ); } static err_t iperf_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { LWIP_UNUSED_ARG(arg); if (err == ERR_OK && p != NULL) { tcp_recved(pcb, p->tot_len); pbuf_free(p); } else if (err != ERR_OK && p != NULL) { pbuf_free(p); } if (err == ERR_OK && p == NULL) { tcp_arg(pcb, NULL); tcp_sent(pcb, NULL); tcp_recv(pcb, NULL); tcp_close(pcb)
Posted on June 29, 2018 at 15:16Hi, Please suggest ST microcontroller STM32F051R8T6 can support MQTT protocol.If supports have MQTT library support?Thanks,#stm32cubemx #discovery
Posted on June 05, 2015 at 17:08 I'm a little bit confusing with question of UART. So, I need to receive data through UART from PC. Ok, as said in stm32f4xx_hal_uart.c file: *** Interrupt mode IO operation *** =================================== [..](+) Send an amount of data in non blocking mode using HAL_UART_Transmit_IT() (+) At transmission end of transfer HAL_UART_TxCpltCallback is executed and user can add his own code by customization of function pointer HAL_UART_TxCpltCallback (+) Receive an amount of data in non blocking mode using HAL_UART_Receive_IT() (+) At reception end of transfer HAL_UART_RxCpltCallback is executed and user can add his own code by customization of function pointer HAL_UART_RxCpltCallback (+) In case of transfer Error, HAL_UART_ErrorCallback() function is executed and user can add his own code by customization of function pointer HAL_UART_ErrorCallbackthis way is also used in examples (UART_Hyperterminal_IT, etc).Does it means that there are no
Posted on June 24, 2018 at 09:04STM32CubeMX fails to download documents with the following error:In STM32CubeMX.log (for more details please find attached STM32CubeMX.log:(~~~...2018-06-24 10:50:07,628 [ERROR] ServerAccessManage:989 - Problem during Server Connexion : IO error Remote host terminated the handshake2018-06-24 10:50:07,628 [ERROR] ServerAccessManage:487 - Problem during Server Connexion : : DS9773.pdf.~~~##stm32cubemx
Posted on September 15, 2017 at 13:34 If I setup custom string USB string descriptors in the CDC Middleware configuration... ..these strings will be generated to the usbd_desc.c file in the following format: /** @defgroup USBD_DESC_Private_Defines * @{ */ #define USBD_VID 1155 #define USBD_LANGID_STRING 1033 #define USBD_MANUFACTURER_STRING ''Digitroll Ltd.'' #define USBD_PID_FS 22336 #define USBD_PRODUCT_STRING_FS ''XLiNE-USB Converter'' #define USBD_SERIALNUMBER_STRING_FS ''00000000001A'' #define USBD_CONFIGURATION_STRING_FS ''CDC Config'' #define USBD_INTERFACE_STRING_FS ''CDC Interface''�?�?�?�?�?�?�?�?�?�?�? When compiling this code with gcc I got the following warnings: pointer targets in passing argument 1 of 'USBD_GetString' differ in signedness [-Wpointer-sign] usbd_desc.c /xlineusb/Src line 76 C/C++ Problem�? It is because the the USBD_getString expects unsigned pointer: void USBD_GetString (uint8_t *desc, uint8_t *unicode, uint16_t *len);�? I would rec
Posted on June 13, 2018 at 09:31Hi, I've updated CubeMX to 4.26. When start a new project, rise many errors for .json files: problem during download (download cancelled). The downloads for packages update work. Any one can help me?#json #cubemx-4.26
Posted on June 22, 2018 at 22:03Good afternoon!My name is Alef, I'm trying to set up the usart2 baudRate from STM32F030C8 to 2Mbps but I can not succeed.I'm using 48MHz clock so according to the manual, at 16 samples, I should be able to reach up to 3Mbps, but CubeMx says the limit is 500kbps. But if I go in code and manually put 2000000 it seems to work normally.My questions are: I wonder if this is a Bug from CubeMx?If not, why this lower limit?Using USART2 with 2Mbps briefly, could it generate any problems in the future?Thank you all.#cubemx-stm32f103c8t6 #baudrate
Posted on November 30, 2017 at 05:22Hi All-I'm using SW4STM32 with STM32CubeMx for configuration of an STM32L431RB MCU. I noticed that WakeUp events timed by the RTC appeared slow, and it appears that the RTC is being clocked from LSI rather than LSE as-configured.In CubeMx, I have configured the RTCCLK source as LSE, and verified that the generated code sets this correctly. In the debugger's register view, I've confirmed that LSEON=1 and LSERDY=1, and that RTCSEL=01. (These values seem to persist, even after a chip erase and power cycle. This seems odd.)I have confirmed that both LSI and LSE oscillators are running, and that LSE is at the correct frequency, by configuring PA2 as LSCO and measuring the output frequencies with LSCOSEL=0 (31.6KHz) and LSCOSEL=1 (32.76KHz).However, when I configure PC13 as RTC_OUT_CALIB and set this to 512Hz, the output waveform is only at 504Hz (measuring between rising edges, as the reference manual advises), indicating that RTCCLK is somewhere around
Posted on June 26, 2018 at 00:49Hi,I'm trying to enable the USB device peripheral for the STM32F042F4 in STM32CubeMX but it is greyed out and I don't seem to be able to enable it. I've checked the datasheet for this part and it seems to support USB so is there a reason for this?#stm32f042f4 #usb #stm32cubemx
Posted on January 15, 2018 at 13:32Using STM32CubeMX to setup an STM32L496AGIxP controller and configuring the RTC IP to map the calibration clock output to PB2, the initialization procedure of the generated code correctely sets the RTC output remap (RTC_OUTPUT_REMAP_POS1), but it does not configure PB2 during GPIO initialization. According to the Reference Manual, it should be configured as alternate function with type AF0. If I manully add PB2 GPIO initialization, the calibration clock output works.I think that's a bug in CubeMX code generation and should be fixed.#rtc-calibration-clock-output #cube-mx #pb2
Posted on June 19, 2018 at 13:56Information on Wrong Code Creation with STM32CubeMX Version 4.26.0.STM32CubeMX creates wrong call for USART6 Interrupt Handlings for SMT32H743 processor:It generates a call to HAL_UART_IRQHandler instead of HAL_USART_IRQHandler. The S is missing and produces an error when translating.Created code in stm32h7xx_it.c looks like this:void USART6_IRQHandler(void){ /* USER CODE BEGIN USART6_IRQn 0 */ /* USER CODE END USART6_IRQn 0 */ HAL_UART_IRQHandler(&husart6); /* USER CODE BEGIN USART6_IRQn 1 */ /* USER CODE END USART6_IRQn 1 */}(Just for your information.) #stm32cubemx.
Posted on June 18, 2018 at 10:20hello ST community,I have a little problem with STM32CubeMX.The problem is, when i generate new code with cubeMX to my existing programm, some of my existing work is not working as intended anymore (here it is my I2C that only returns 255 all the time after the modification). But if i make the modification without CubeMX (copy and past the exact same code) i don't have any problem. I even checked, all the files are the same.Does someone have an idea why this is happening and how to solve this issue ?Thanks for your time.#stmcubemx #st-cube
Posted on June 13, 2018 at 15:34Hello,I have just generated a new Project in CubeMX and imported it to Atollic True Studio, but I can't debug it.apparently I am missing a .elf file, and I am not sure how to generate it. Why doesn't CubeMX do this automatically?I hope someone could help me.Thanks and Greetings Henrik#cubemx-4.26 #truestudio-9.0.0
Posted on May 10, 2018 at 19:34The same version (4.25.1) of STM32CubeMX behaves differently if it is the 'plugin' (installed on TrueSTUDIO 9.0.1) from the 'standalone'.The MCU is: STM32H743ZIThe problem: in the PLUGIN version, by setting the HSE clock in MHz it is rewritten wrong as '0.000000 .....'. For example: I write 8 MHz, press ENTER, the writing becomes 0.0000080. Obviously this generates an error and the 'Input Frequency' box turns red. If I press the 'Resolve Clock Issue' button, after a few minutes it stops and writes 'Can not found a solution for some constrain'. If I repeat the same operations on the 'standalone' version everything works properly, if in HSE I write 8 MHz it remains written with that value.Steps to reproduce the defect: Open TrueSTUDIO, start STM32CubeMX plugin (inside trueSTUDIO).New project.Part number search: STM32H743ZIClick on the MCU on the right down. Then 'Start Project'.In the PINOUT select RCC, set the High Speed Clock (HSE) to: 'Crystal/ceramic r
Posted on June 15, 2018 at 11:201. Cube?? version 4.262 . Device STM32F429ZI3. Erroneous module usbd_conf.c4 Erroneous functions HAL_PCD_MspInit, HAL_PCD_MspDeInit5. CubeMX configuration see attached conf file.5. Description.when both usb ports configured as devices or/and hosts with any registered class , inside HAL_PCD_MspInit function is not contained initialization code for both ports but for FS only (some times under certain circumstances , for HS only).#st32cubemx
Posted on June 13, 2018 at 17:21STM32CubeMX: 4.25.1MCU: stm32f427In my application, EXTI is used for external signal triggerring. In STM32CubeMX generated codes, MX_GPIO_Init() initializes GPIO & EXTI related stuff but without enabling SYSCFG clock, in which case the EXTI is not functional.I think as I selected pins as EXTI in GUI of STM32CubeMX, the generator should enable SYSCFG clock automatically otherwise the function of generated code is not complete.I also noticed that STM32CubeMX 4.26 has been released. I have not tried the lastest version and I don't know if this problem is fixed.#stm32cubemx #stm32f4 #syscfg-exti #stm32-rcc
Posted on June 11, 2018 at 13:11Hi i use stm32f103rct6 for w/r sd card but it not work exactly , it just work once and dont work again . i look to logic analyzer and i think it not work true . what can i do ? my code :if (f_mount(&myFat,SDPath, 1) == FR_OK) { HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3,GPIO_PIN_SET); res=1; f_open(&fil,'javvah2.txt',FA_WRITE|FA_CREATE_ALWAYS); f_write(&fil,'xxxx hellow world',20,&byteCount); f_close(&fil); }else{ HAL_GPIO_WritePin(GPIOB,GPIO_PIN_4,GPIO_PIN_SET); f_open(&fil,'javvah2.txt',FA_WRITE|FA_CREATE_ALWAYS); f_write(&fil,'xxxxhellow worldzzzz',20,&byteCount); f_close(&fil); }#sdio #cubemx-4.26 #stm32f103rct6 #sdcard
Posted on June 12, 2018 at 00:32Hi all!I use a https://community.st.com/tags♯/?tags=stm32f4xx MCU and I've created a very simple project in https://community.st.com/tags♯/?tags=cubemx‌ forhttps://community.st.com/tags♯/?tags=atollic%20truestudio‌. While browsing in the project's code and files I run into a strange issue when I tried to use the __INLINE, __STATIC_INLINE or__ASM macros in the main.c file.Let's me explain better.Since I use the CortexM4 CPU, the reference file for such as macros is the core_cm4.h one. In fact, if I try to call a macro like __CORTEX_M it regularly 'belongs' to such as file (if I open its declaration) and it appears in the drop-down menù of the TrueStudio code editor. On the other hand, the aforementioned macros are not available in the drop-down menù. In addition, they got flagged as 'syntax error' and underlined in yellow if I disregard this defect and write them
Posted on January 17, 2018 at 09:03The STM8 and the STM32 variant of the CubeMX seems to be using the same recent file list.This could be confusing because the files are not compatible vice versa:Please separate the list somehow (filter for ioc/ioc8 files for e.g.)#bug-report #stm8cubemx #stm32cubemx #cubemx #bug
Posted on June 08, 2018 at 12:19Hello!I am using the usb host driver generated by stm32cube. I saw that not all acm driver is implemented (commands like CONTROL_LINE_STATE and notifications). I want to to extend the driver to support more commands and features, and also support other classes than at commands. What is the best way to do this? Thanks for helpers!#stm32-f4 #stm32f4-cdc-acm-usb-cubemx #usb-host #usb
Posted on June 06, 2018 at 16:00Hi,I have a simple custom PCB which drives a TFT controller via 8 bit FSMC. It works well.When I add the USB CDC I get hard fault after ~1 sec run even without any USB transmission.I used CubeMX to generate the code. Finally I didn't add any user code and experienced that when I comment 'MX_USB_DEVICE_Init' or 'MX_USB_DEVICE_Init' I don't get hard fault.Have you ever experienced something like this?Environment details:- CubeMX v 4.26.0- MCU: STM32F412RG- SW4STM32 IDEThan you in advance!Gabor#usb-cdc #stm32f4 #cubemx #fsmc #hard-fault
Posted on June 06, 2018 at 03:32I ordered and received NUCLEO-L476RG and X-NUCLEO-53L1A1, in the X-NUCLEO-53L1A1 they had and 'expandsion pack' for STM32Cube but when I click on the Additional Software Components selection there is no means to add the code for the 53L1A1.How does this all work?#stm32cubemx
Posted on May 30, 2018 at 12:04is there any other way to reduce current intake?- One way is i turned off All the GPIO Pins. (This helped a lot)But I need to know is there any other Things which can be turned off?Thanks in advance#swd #nucleo-f0 #stm32f091rc #stm32f091rc #stm32cubemx #stm32f0-cube #power-consumption
Posted on March 17, 2018 at 21:08 Like • Show 0 Likeshttps://community.st.com/0D50X00009Xkg1FSAR Comment • https://community.st.com/0D50X00009Xkg1FSAR&sharpcommentsUsing CubeMX V4.7.25.0 I get initialization code for RTC.c that won't compile when I request initialization be generated as .c.h file pairs.Simple demo case:Start CubeMXNew ProjectSelect STMf103C8Tx as targetUnder Pins Select RTC-> Activate Clock Source.Under Project settings: Project Name: Test Location: C:\Temp\ Under Code Generator Tab: Check Generate peripheral initialization as pair of .c/.h filesGenerate code for TrueStudioWhen I build the generated code I get the following errors:..\..\..\Src\rtc.c:73:5: warning: implicit declaration of function 'LL_PWR_EnableBkUpAccess' [-Wimplicit-function-declaration] LL_PWR_EnableBkUpAccess();..\..\..\Src\rtc.c:75:5: warning: implicit declaration of function 'LL_APB1_GRP1_EnableClock' [-Wimplicit-func
Posted on April 11, 2016 at 11:19I used CUBEMX (Version 4.14.0) to generate a small usb test program for stm32l4 discovery board. The L4 Lib is Version 1.4.0. When i only initialize USB as device (class CDC) it doesnt' work. All registers seem to be ok, but it doesn't enumerate, the DP pin remains low after USB_Start. If i also initialize teh UART1, USB works. I even don't need to initialze UART1 completely, but have to enable the UART1 Clock, initialze the GPIO-Pins, and set UART1.CR1 TE and RE to 1. It is strange because the USB core shuldn't have anything to do with UART1. I used a 32khz on LSE and PLL. The CubeMX generator doesn't show any error or warning. The same behavoir shows also the Arduino board. Can one explains why? or If someone have a working ioc file which only initialze the USB for STM32L4 Discovery board or Arduino board? #l476gdisco #usb #usb #stm32l4 #cubemx #device
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.