Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on December 08, 2016 at 12:31hi everyone. im new at stm32 and im trying to use lwip with cubemx (firmware :stm32cubef4 v1.14.0). my board is stm3241g-eval. and i investigated example projects and it works (ex. udp echo client) I created a new project with selected true board(my board is new and all jumpers at default) and my cube settings are: SYS : systickEth : MII (its ok for default eval board)Clk Conf : uisng HSE and CLK Mhz = 168RTOS: noLWIP : enabled lwip :dhcp disable ( for static) phyaddres: 1 eth global interrupt: enable and priority 5i use clean code(i didnt add anything) for trying to get link at MX_LWIP_INIT function but it does not work. what is the problem? or what i must to control ? thx#stm32cube #cubemx #lwip
Posted on November 27, 2016 at 02:16I tried the new version of STM32CubeMX 4.18.0. If I generate project for MDK-ARM V5 will be deleted the startup_stm32fxxxxx.s file in the path Drivers/CMSIS/Device/ST/STM32Fxxx/Source/Templates/gcc. Similarly, if I generate project for SW4STM32 will be this file deleted in the path Drivers/CMSIS/Device/ST/STM32Fxxx/Source/Templates/arm. It is not possible to generate simply the project for both development environments. #startup_stm #stm32cubemx-4.18.0
Posted on November 28, 2016 at 23:27I converted my project from using a '407VGT6 to using a '405VGT6 (very painless), BUT I lost all of my DMA settings and all of my interrupt priorities.Version control is my friend.Andrei from The Great White North. #cubemx-bug
Posted on July 20, 2016 at 23:00Hello,I'm trying to get the internal temperature sensor to work. But the whole time, the sampled values are too low. If I use that fancy formula from the reference guide, it says there are about 10�C, but believe me, it's not. The sampled value is always about 970 with 1040 calibrated at 30�C. I tried a lot of configurations but now I don't know how to proceed. Maybe someone can see the problem. There is my code:ADC Config by CubeMX:ADC_MultiModeTypeDef multimode; ADC_ChannelConfTypeDef sConfig; /**Common config */ hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV8; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc1.Init.LowPowerAutoWait = DISABLE; hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.NbrOfConver
Posted on November 15, 2016 at 11:00Hello everyone,I am planing a few Sensors and remote switches which communicate using the CAN Bus. I'd like to use the STM32L433CC MCU because of its easy solderability by hand for prototyping. The boards should be low power, a CPU Frequency of 26 MHz is probably sufficient for the tasks.My question is now, will the CPU work without external clock source when using CAN, I2C and SPI only? So is the internal RC oscillator enough for such tasks?Thanks, Willem #hse #stm32l4 #can #cubemx
Posted on February 26, 2016 at 10:34Hi CubeMX team, why are not firmware examples for development boards written using STM32CubeMX ? I think it would help to quickly find errors in STM32CubeMX. Also, customers should share original ioc file for development boards. Petr #cubemx #firmware-examples-stm32cubemx
Posted on November 28, 2016 at 15:38 Hi, I recently discovered in UM1718 that CubeMX can work with a command line. That's a cool feature for continuous integration. But it seems that the command line switch are not handled. If I use -s or -q followed by a script name, I get something like this: systemId: file:/D:/Dev/Pic/Msa/devices/diamond%20ST/scripts/cubeMxGenerate.txt; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. command: java -jar ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' –q scripts\cubeMxGenerate.txt error: systemId: file:/D:/Dev/...T/scripts/cubeMxGenerate.txt; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. if instead I call: java -jar ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' –q conf.ioc It works but does not run a script.... Does the syntax has changed or is it a bug? Thanks Julien #cubemx-script
Posted on September 26, 2016 at 07:16Hello,I used STM32CubeMX with 4.16.0 or 4.16.1 version.below situation :''STM32Cube Firmware Library Package'' option is ''Add necessary library files as reference in the toolchain project configuration file''IAR's error message is all same below Fatal Error[Pe1696]: cannot open source file ''D:\Work\IAR_WORK\ARM\Projects\ZNC-514B_3MCU-S1\EWARM\D:\Temp\STM32CubeMx\STM32Cube_FW_F7_V1.4.0\Middlewares\Third_Party\FreeRTOS\Source\timers.c''So, IAR cannot find Driver files(HAL_Driver's files)Because included wrong path for Driver files.- �Toolchain Folder Location� is D:\Work\IAR_WORK\ARM\Projects\ZNC-514B_3MCU-S1\EWARM\- �Repository Folder� is D:\Temp\STM32CubeMx\STM32Cube_FW_F7_V1.4.0\Middlewares\Third_Party\FreeRTOS\Source\timers.cWhy combined file path in generation code? #bug-stm32cubemx
Posted on October 11, 2016 at 02:28to be migrated, sourceId: 9912:0EA5537E-3674-4A46-8D71-9B00EC9F6F4B #dual-adc #bug #stm32cubemx
Posted on October 31, 2016 at 13:29Hello!After migrating to version 4.17 I have encountered problem with temperature sensor channel. I am working with it on a daily basis and I've never had any problems with it before.Problem:When i open fresh project with STM32F411VET6 and I enable Temperature Sensor Channel, I get a problem in configuration tab.Screens below. Best regardsBartek #stm32cube #adc #bug #cubemx #temperature
Posted on November 25, 2016 at 12:45Would be good to avoid generation of peripherals initialization code if using CMSIS Driver.CMSIS Driver does complete initialization of the related peripheral. So, the code, generated by STM32CubeMX is not used.I think, that CMSIS Driver uses only the MX_Device.h file generated by STM32CubeMX. #stm32cubemx #cmsis-driver
Posted on November 19, 2016 at 18:48I am attempting to configure the Ethernet on a Nucleo-F207ZG board. After two days of unsuccessful work and web search, I finally decided to ask your help. Here are the operations executed: 1) creation of a new project with the latest CubeMX, selecting my Nucleo board and setting ''All IP with default mode'' (as suggested in Carmine Coviello's blog) 2) Activation of FreeRTOS and LPIW with default parameters 3) Cube code generation, compilation with GCC, upload, debug. The scheduler runs, but there is no way to get an address from the DHCP server. The code fails the first call to netif_is_link_up() so possibly the problem is before the DHCP. Anyway, an attempt with a static address failed as well. The board is brand new, so I would exclude any hardware problems at the moment. It seems that I am in good company of other developers struggling with this issue, yet I am not able to find a solution :( Any suggestions? #lpiw-ethernet-stm32cubemx
Posted on April 13, 2015 at 14:17HI I just have a simple question; I think I�m missing something.I using cubeMX for getting the ADC up running with 2 ch ( IN8 and IN15)And the DMA for transferring the data to a buffer.I have added a picture showing the cubeMX ADC setup And I Use the:if( HAL_ADC_Start_DMA( mpHadc, (uint32_t *)rawAnalogData, 4 ) == HAL_OK )For starting the ADC.And I have implemented the:void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc){ analogConvDone = true; HAL_ADC_Stop_DMA(mpHadc);}The problem is that I only get data from ch8 (rank 1) and NOT from ch15Hops someone can give a hint. #adc-dma-cubemx
Posted on November 22, 2016 at 18:17Hello Everyone ! My first project on STM32 is to make a NUCLEO shield to record four analogue signals : Dual stereo codec ADAU1979 for 16-bit 44.1 kHz sampligmicroSD slot for PCM logging using FatFS, communication via 4-bit SDIO (spi is too bandwidth limited)micro USB to retrieve PCM files from microSD card (USB-MSDI have chosen the NUCLEO-F401RE because it was the only available development kit that can have CubeMX HAL initializations for both USB, i2s, i2c and SDIO. The problem is that the ADAU has two stereo i2s outputs. The only available i2s in Cube MX is i2s(2), because i2s(3) pins are occupied by SDIO. Is this project feasible to you ?Shall I use two i2s ? or adding an additional pin to i2s(2) is possible ?If I have to use i2s(3), can I change the SDIO pins ir these are specific pins ?Thanks Clovis #fatfs #sdio #cubemx #i2s
Posted on November 12, 2016 at 20:34 I configured RCC Master Clock Output within cubeMX 4.0 and using a STM32F The generated Code does not output the selected clock. I have found, after code analysis of generated file gpio.c, that the Alternate function for PA8 in MX_GPIO_Init() is not as expected. /*Configure GPIO pin : PA8 */ GPIO_InitStruct.Pin = GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF0_TRACE; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); After changing the Alternate Function of PA8 to GPIO_InitStruct.Alternate = GPIO_AF0_MCO; the Master Clock Output works as expected. Regards AB cubemx stm32f303
Posted on July 31, 2015 at 15:25 Hello all, I have configured the ADC to trigger based on Timer 6 update event every (1/48000) seconds. DMA is used to transfer the ADC conversion to memory. However, when I debug, I see the timer count being incremented, but I don't see any ADC conversion being made or anything in the memory location where it saves the ADC values through DMA. I have used ST's CubeMX to generate the initialization code. #include ''stm32f7xx_hal.h'' uint16_t ADC3ConvertedValue = 0; uint16_t ADC_Value = 0; /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private variables ---------------------------------------------------------*/ ADC_HandleTypeDef hadc3; DMA_HandleTypeDef hdma_adc3; TIM_HandleTypeDef htim6; /* USER CODE BEGIN PV */ /* Private variables ---------------------------------------------------------*/ /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(voi
Posted on November 10, 2016 at 09:40Hi,I have a problem about ethernet echo server.Sended data from client can be readed but with echo. Besides, I want to send data to client.Because of this;uint8_t buffer[8]; buffer[0] = (0xFF000000 & (uint32_t)(100)) >> 24; buffer[1] = (0x00FF0000 & (uint32_t)(100)) >> 16; buffer[2] = (0x0000FF00 & (uint32_t)(100)) >> 8; buffer[3] = (0x000000FF & (uint32_t)(100)); buffer[4] = (0xFF000000 & (uint32_t)(300)) >> 24; buffer[5] = (0x00FF0000 & (uint32_t)(300)) >> 16; buffer[6] = (0x0000FF00 & (uint32_t)(300)) >> 8; buffer[7] = (0x000000FF & (uint32_t)(300)); /* enqueue data for transmission */ wr_err = tcp_write(tpcb, ptr->payload, ptr->len, 1); wr_err = tcp_write(tpcb, &buffer, 8, 1);Th
Posted on November 02, 2016 at 15:37Hi,I am using an STM32F746G Discovery Board with the ''lwIP_HTTP_Server_Netconn_RTOS'' from STM32CubeF7 (V 1.5.0). My IDE is the SW4STM32 in V1.8 for Linux. What I am trying to do is to replace the standard website of the webserver with an own html site. However, I have failed doing so until now. I have tried many different things but unfortunately without success. Can anybody tell what I have to edit or replace? How can I view the files on the board? When I am connecting my board to my laptop I can only see the ''details.txt'' and ''mbed.htm''?Thanks in advance! #cube #cubemx #html #freertos #netconn
Posted on March 06, 2016 at 09:28Hi,I recently got a ST Nucleo board (Nucleo F070RB) and want to develop a device where it uses the on board USB (of the microcontroller) as a virtual com port.I've been able to configure a test project which has setup the USB Com port fine. (I am using the USB pins from the MCU and not the ST Link one).However I'm now at the stage of trying to figure out how to send stuff from the MCU to the host computer. Apart from the setup to do the configuration of the MCU I can't find any documentation of how to actually use it.If anyone would be able to help it would be appreciated.Thanks -Ryan Walmsley #stm32-usb-cdc-cubemx #stm32-usb-cdc-vcp
Posted on October 18, 2016 at 12:50THE SAME BUG IT WAS OBSERVED BY OTHERS, (compared to other posts this eventually helps to reproduce and understand the problem).After upgrading STM32CubeMX from 4.16.1 to 4.17.0 I found a bug.Environment: I use STM32Cube_FW_F0_V1.6.0 firmware library.Symptom:In the stm32f0xx_hal_dma_ex.h the __HAL_DMA1_REMAP macro, together with the change introduced by the generator in usart.c does not compiles.Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h:796:10: error: expected expression before 'do' do { assert_param(IS_HAL_DMA1_REMAP(__REQUEST__)); \In the usart.c by generator, it is replaced the line__HAL_DMA1_REMAP(HAL_DMA1_CH3_USART1_RX);with if (__HAL_DMA1_REMAP(HAL_DMA1_CH3_USART1_RX) != HAL_OK) {
Posted on October 14, 2016 at 15:14Hi, is there anything wrong using HSE(8MHz) as RTC clock source for an L476 ? CubeMx reports a configuration error when I tried (see screenshoot). Is this a tool bug or a device limit I failed to identify reading DS+RM ? #hse #cubemx #stm32l4 #rtc
Posted on October 26, 2016 at 14:10I updated STM32CubeMX Firmware to version 1.5.1 and opened my project (I used 'migrate' function). On 'Configuration' page now I see an issue for ADC1: ADC_CHANNEL_TEMPSENSOR is highlighted with red color. GUI says: 'Please select a new value other than Channel Temperature Sensor from the provided list. Value not found.', but there' s only one channel in the list. It looks like a bug, and the previous firmware version didn't have such an issue. #stm32cubemx-adc1-temp-sensor
Posted on October 08, 2015 at 17:00My goal is to build a very simple HTTP server provided by the MCU.With CubeMX I generated out an MDK-ARM project using the LWIP stack on Ethernet PHY with RMII.Ethernet links up with 10Mb/s, but on some reason the DHCP request (generated by CubeMX) does not succeed, so my board does not acquires an IP address.Also if I set a fix IP (through the CubeMX interface) - it is still not getting applied.I have not done any modifications on the generated codes yet, just compiled and uploaded to the MCU board.Do I need to add any additional start-up codes to enable DHCP or at least the FIX IP to work?Unfortunatelly all of the application notes are for the standard libs, saying that it is already superseeded by CubeMX ... However I cannot find a usable tutorial/documentation/example for CubeMX on howto build a simple HTTP server on LWIP and Ethernet MAC+PHY.Please advise!Thanks,Balas #cubemx #lwip #ethernet #stm32f1
Posted on June 05, 2015 at 23:40Hello, I am trying to use STM32CubeMX to generate a simple Ethernet example for the Olimex STM32-P107 board. I'm using SWSTM32 and the problem appears to be in stm32f1xx_hal_eth.c line 215 while (((heth->Instance)->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) (heth->Instance)->DMABMR has a value of 0x20101 So I guess that lsb is 1 when it's looking for RESET which is 0. Anyway, STM32CubeMX is a pretty cool tool. Hopefully, this will make sense to someone and we'll get it fixed quickly. The project was generated with STM32CubeMX Version 4.8.0 and STM32CubeF1 Version 1.0.0 thanks, Paul #lwip #cubemx #ethernet #stm32f1
Posted on October 28, 2016 at 14:45 Hello, I'm trying to solve a problem with I2C and the new HAL 1.5.2. Since HAL 1.5.1 very much code was modified in the file stm32f4xx_hal_i2c.c. With version 1.5.1 it worked like that: HAL_I2C_Master_Transmit(&I2c3Handle, (uint16_t)slave_adr, (uint8_t*)I2C3_DATA, 1, I2C3_TIMEOUT) HAL_I2C_Master_Receive_DMA(&I2c3Handle, (uint16_t)slave_adr, (uint8_t *)I2C3_DATA, cnt) After that, the transfer starts and then the callback function HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c) was called, so I could use the read values. Beside some other changes the function HAL_I2C_Master_Receive_DMA was also changed in the new HAL: One difference is, the HAL_I2C_Master_Receive_DMA was calling internally I2C_MasterRequestRead(hi2c, DevAddress, I2C_TIMEOUT_FLAG, tickstart) != HAL_OK (to Request Data from the slave?!?) But this is missing in the new HAL. In the receive version without DMA, both the old and the new
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.