Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on December 04, 2014 at 10:33I am developing an application using the Serial Audio Interface of the STM32F429ZITx.There appears to be a problem in the code generated by STM32CubeMX.The DMA handle hdma_sai1_a is declared as a global variable in main.c.The same variable name is declared as static within the scope of the function HAL_SAI_MspInit() in stm32f4xx_hal_msp.c.The consequence of this is that the DMA2_Stream1_IRQHandler() function uses the incorrect un-initialised DMA handle and no transfer complete callbacks are invoked.Workaround:Remove definition of hdma_sai1_a from HAL_SAI_MspInit().Add ''extern DMA_HandleTypeDef hdma_sai1_a;'' to stm32f4xx_hal_msp.c.Configuration:MCU : STM32F429ZITxSTM32CubeMX : v4.5.0STM32Cube FW : v1.3.0Atollic TrueSTUDIO : v5.2.0 #stm32cubemx-sai
Posted on January 06, 2015 at 07:27I want to use the ADC and UART for sending the converted data back to PC and display the same data to the LCD screen. Which peripherals and components are to be selected in ''Pinout'' after selecting the board? #stm32cubemx #stm32429i-eval-board
Posted on December 08, 2014 at 19:59I thought it would be instructive to look at the examples using the STM32CubeMX application. The ''Load Project'' dialog only looks for .ico files and I find none in all of the examples. Was this application used for none of the examples or does the executable look for a different file type?Or am I totally misunderstanding the purpose of STM32CubeMX. I thought it was to provide a starting point for a project. Do most folks just start with an appropriate template and use that instead?thanks,hank #stm32cubemx
Posted on December 12, 2014 at 11:46 Hi, I'm trying to migrate an existing project from the Standard Peripheral Libraries to the new ones and can't fine any guides. Do any exist? As an example I'm currently trying to convert this function. void I2C3_Configuration(void) { // I2C3, PA8, PC9 GPIO_InitTypeDef GPIO_InitStructure; I2C_InitTypeDef I2C_InitStructure; /* Enable the AHB1 peripheral clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE); RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C3, ENABLE); /* Reset I2C IP */ RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C3, ENABLE); /* Release reset signal of I2C IP */ RCC_APB1PeriphResetCmd(RCC_APB1Periph_I2C3, DISABLE); /* GPIO configuration */ /* Configure GPIO pin alternate function */ GPIO_PinAFConfig(GPIOA, GPIO_PinSource8, GPIO_AF_I2C3); GPIO_PinAFConfig(GPIOC, GPIO_PinSource9, GPIO_AF_I2C3); GPIO_StructInit(&
Posted on December 12, 2014 at 15:54Hi, I'm trying to read an encoder using the encoder interface provided by the STM32F3Discovery board. I've set up the peripherals using CubeMX and connected the encoder to the input pins (tried with timer 1 and 2), but the CNT register doesn't seem to get updated.I tried declaring the same pins as GPIO (Input mode) and blinking leds when the input is 1, and they seem to work properly (so I guess the encoder is fine).Can anybody tell me what's going on? Do I need to specificate other parameters/enable interrupts/DMA/other?Thanks #cubemx #i-can''t-help-you-with-that
Posted on December 07, 2014 at 21:12Hello everyone, I have used STM32F429 device along with two SDRAMs AS4C16M16S mapped to the two available banks. When the FMC controller was initialized using the generated code from STM32CubeMX with BANK1 initialized before BANK2, I got an error when reading from the BANK1 device (starting at address 0xC0000000) - it was returning only 2 times the LSB instead of MSB:LSB (e.g. I wrote 0x1234 and I read back 0x3434). I was inspecting my PCB many times, looking at the signals with my scope (unfortunately I do not have a logical analyzer), but everything seemed ok to me.When I was only using the BANK1 device or only BANK2 device (the other one was left uninitialized), everything worked properly, but when I wanted to use both devices, I had to initialize first the BANK2 and then the BANK1 device. Here is my code:/* FMC initialization function */void MX_FMC_Init(void){ FMC_SDRAM_TimingTypeDef SdramTiming; /** Perform the SDRAM2 memory in
Posted on November 06, 2014 at 13:25When selecting the STM32L152 discovery board in CubeMX the microcontroller is set to STM32L152RC while my STM32L152 discovery board has the STM32L152RB microcontroller. If I understand correctly the older discovery boards come with the xxxRB microcontrller and newer ones come with xxxRC. Can you please add the previous generation discovery board in the next version of CubeMX? Thank you. P.S. Also, why is it configured to run at 2.097MHz speed from the MSI clock by default as shown in the clock configuration tool? Why not to select the HSI 16 as the source (directly or through the PLL)? #cubemx #stm32l152
Posted on October 31, 2014 at 05:47I have set the value for LSI clock to 32000 in the clock configuration of STM32CubeMX . However the generated code in stm32f4xx_hal_conf.h defines LSI_VALUE wrongly as 40000.Is this a bug or how can I make the correct value appear in the generated source code? #stm32cubemx-lsi_value
Posted on October 20, 2014 at 11:39I had CubeMX installed and working fine. Then I updated the application and now all I see is dialog flashing by the says ''Check files''. After that nothing happens. When I start it from a DOS box I get: java -jar STM32CubeMX.exe HeapMemory: 16252928 Using Application install path:C:\Program Files\STMicroelectronics\STM32Cube\STM 32CubeMX Using Application install path:C:\Program Files\STMicroelectronics\STM32Cube\STM 32CubeMX loadPluginJar : clock loadPluginJar : add clock loadPluginJar : filemanager loadPluginJar : add filemanager loadPluginJar : ipmanager loadPluginJar : add ipmanager loadPluginJar : pinoutconfig InternalPropertyChange: ChangeKeepUser dont care loadPluginJar : add pinoutconfig loadPluginJar : power loadPluginJar : add power loadPluginJar : projectmanager This is Windows This is 32 Bit VM C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\\db\plugins\projectman ager\windows\32\toolgen.dll loadPluginJar : add projectman
Posted on October 20, 2014 at 10:58Hi all, Yesterday I tried to align my project developed with CubeMX 4.3.1 to the recent 4.4.0 version.I did itmainly to overcome a SysTickInit issue with FreeRTOS configuration. Since the regenerated project compiles but won't start, I noticed the following error: Generating a project using the attached file with CubeMX 4.3.1 will generate a correct main.c file. Generating a project using the attached file with CubeMX 4.4.0 will generate a main.c file in which all the MX_XXXX_Init(void) routines do not contain the related HAL_XXXX_Init(&yyyy) function call.Can someoneexplainthis behavior? Thanks in advance to anyone. Dario #stm32f4 #cubemx
Posted on September 29, 2014 at 11:38Hello,I am using the STM32F3 Discovery Board to try out CubeMX for IAR and FreeRTOS.I have encountered the following situation, where the system hangs:SysTick_Handler is never reached. The system hangs in the HardFault_Handler.I have replaced the code in SysTick_Handler as mentioned in the fora by ST employees to:if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { xPortSysTickHandler(); } HAL_IncTick(); but this is irrelevant, since the device branches to the HardFault_Handler before ever reaching the SysTick_Handler.The solution I have found to this, is to comment out the osDelay(1) line in StartThread thread, or completely avoid using this thread.I have tested this with a single other thread, written by me and it works well.I will reply to this post, after testing with more threads.I do not know the true cause to this mishap
Posted on July 07, 2014 at 13:26Hi, Up to MX 4.2.0 it newer happends, but after upgrade MX to 4.3.0 time to time all user project files are deleted in project folder!. STM32CubeF4 1.3.0 Windows 7 x64, Eclipse 4.3.2 + STM32CubeMX 4.3.0 plugin. It quite offten - after regenerate project all files created not by STM32Cube are gone! Anybody can confirm that? SOLVED: Before regeneration I alwas save project using icon with two disc - now is ''Save the Project in a new file''. AFAIR always done that and I sure before works different way - not delete user files ------------------------------------------------------- From MX 4.3.0 ''Save the current Project'' (one disc icon) keeps user files ''Save the Project in a new file'' (two disc icon) delete all - include user files and create project from begining ------------------------------------------------------- maybe it helps for someone Regards #stm32cubemx-4.3.0
Posted on October 13, 2014 at 09:10Hi, I'm facing a problem with the CubeMX generated code for STM32L151QDHx. The generated code seems to lack the definition of GPIO_AF10_USB which is referenced in the generated code.Versions of the software used: STM32CubeMX Version 4.4.0-A10 STM32Cube V1.0IAR Embedded Workbench for ARM Version 6.60.1.5104Steps to reproduce the problem: Created ''New Project'' for STM32L151QDHxChecked the checkbox: ''Pinout'' tab -> Configuration -> Peripherals -> USB -> Device (FS)Selected ''Communication Device Class for'': ''Pinout'' tab -> Configuration -> MiddleWares -> USB_DEVICE -> Class For FS IPConfigured clock crystal pins: Selected RCC_OSC32_IN for PC14Selected RCC_OSC32_OUT for PC15Selected RCC_OSC_IN for PH0Selected RCC_OSC_OUT for PH1 On ''Clock Configuration'' tab: Selected HSE in PLL Source MuxPicked x12 for PLLMulPicked /3 for PLLDivSelected PLLCLK in System Clock Mux Generated EWARM codeWhile building that code I get followin
Posted on October 07, 2014 at 17:38Hello, Basically everything is said in the title. I have the latest version of CubeMX and program STM32F3-Discovery with STM32F303VC. CubeMX generates this block multimode.Mode = ADC_DUALMODE_REGSIMULT; multimode.DMAAccessMode = ADC_DMAACCESSMODE_12_10_BITS; multimode.TwoSamplingDelay = ADC_TWOSAMPLINGDELAY_1CYCLE; HAL_ADCEx_MultiModeConfigChannel(&hadc2, &multimode); for ADC2 and ADC4 and then fails assert. Thanks. #stm32cubemx-stm32f303vc
Posted on October 21, 2014 at 15:28Hello. Please help.I uses: STM32Cube 4.3.1 + STM32F407 (STM3240G_EVAL) + KeilI configures: Ethernet MII + LwIPI adds ''tcp_echoclient.?'' and ''udp_echoserver.?'' from an example (http://www.st.com/web/en/catalog/tools/PF259243♯)UDP worked correctly.TCP did not work (cmd: ''ping 192.168.0.10'': Interval of expectation for inquiry is exceeded)https://drive.google.com/file/d/0B20gq_La47EANFl4VDlCNi15Ukk/view?usp=sharinghttps://drive.google.com/file/d/0B20gq_La47EARWFKd1F0ekU0NVE/view?usp=sharingWhat doing I make incorrectly?Excuse for my English #stm32 #lwip #tcp/ip #stm32cubemx
Posted on October 16, 2014 at 05:56I want to fix STM32F2Cube suitable for my device using STM32F107. My device use USB and CAN functions of MCU Certainly, I will modify HAL of STM32F2 cube First glance, I noted that USB and CAN pins of STM32F2 are same as STM32F107. so I don't need repair pins. But USB and CAN registers are different between 2 MCU. So I will repair the USB and CAN register Is there any thing else need modify in STM32F2 cube? #stm32f2 #cubemx #stm32f1
Posted on August 19, 2014 at 11:25Hi all,I am trying to configure a STM32F302VBTx using STM32CubeMX, and I am experiencing a strange behavior with ADC2/IN4 (PA7).Steps to reproduce: create a new projectpicks STM32F302VBTxenable ADC2 IN3 as single ended (uses PA6)enable ADC2 IN4 as single ended (uses PA7)go to configuration, System, GPIOlook at GPIO mode: PA6 is marked as ''Analog mode'' (which is expected), but PA7 is listed as ''n/a''click on PA7 row, a warning says ''There are no parameters to be configured'' (while again PA6 works as expected)Is it true that PA7 is somewhat special?Is this a bug in STM32CubeMX database?Thanks for any advice #stm32cubemx
Posted on September 26, 2014 at 11:40I have met such bug. Installing and reinstalling CubeMX and JavaVM few times does no effect. OS: win8.1. #clock-configuration #stm32cubemx
Posted on August 10, 2014 at 00:05Maybe a bug on cubemx for F3 #cubemx-stm32-nmi-headler
Posted on September 17, 2014 at 09:00At the moment it seems that Cube for STM32F3 prepares only the gpio files and calls MX_GPIO_Init in main, unless I'm doing something terribly wrong.Are there plans to generate peripheral support libraries and FreeRTOS in a close future update? #stm32f3 #cubemx
Posted on September 23, 2014 at 11:46After installing the STM32Cube plugin for eclipse. I would like to know how do we generate the C code for the eclipse platform. from (STMCube) PROJECT-Generate C Code - in the tool chan/ IDE we dont have eclipse option. It would be of great help if any1 could resolve my issue. #stm32cubemx #stm32f4 #discovery #eclipse #c-cod #eclipse
Posted on August 01, 2014 at 04:22I'm using STM32CubeMX v4.3 to generate my STM32F303x custom board pins.I need both USB and CAN enabled.I can set USB (as FS Device) pins as: PA11: USB_DMPA12: USB_DPAnd CAN pins as: PD0: CAN_RXPD1: CAN_TXBut for some reason, I can't enable USB and CAN at the same time.When I try to enable USB, CAN can't be enabled anymore (grayed-out) and on mouse hover, says: ''CAN Not Available: CAN IP can be selected if USB IP is not selected''When I try to enable CAN, USB can't be enabled anymore (grayed-out) and on mouse hover, says: ''USB Not Available: USB IP can be selected if CAN IP is not selected''Acc. to clive1:''In the original F1 design CAN and USB shared a common 512 byte SRAM buffer, this is supposedly not the case with the F303 design, but the logic in CubeMX might still be blocking this option.''Please confirm if this is an STM32CubeMX bug for STM32F303x devices.Related forum /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=https://m
Posted on July 31, 2014 at 14:11I'm using hardware controlled NSS in STM32F3. To have it enabled I need to set hspi3.Init.NSSPMode = SPI_NSS_PULSE_ENABLED; in the initialization routine. Since there is no option in Cube to set this the line get overwritten every time I generate code. Please consider adding an option in Cube to set this bit #stm32f3 #cubemx
Posted on August 31, 2014 at 23:29 Hi Everyone im new around here. I own a Discovery kit for STM32F407/417and I have a problem getting the usart to work, ive used STM32CubeMX to genarate all the initialization files along with FreeRTOS (which works well) I'm trying to send USART txdata in blocking mode however its not working, scope shows no data packets, computer terminal shows nothing. vie stepped carefully through the program and no error occurs, I don't get any HAL errors during low level initialization (hal_okay) and when I send data using see blew, I still get no errors, so what do I do now ? I have attached the full IAR project, its a simple skeleton project with freertos, any help will be greatly appreciated as I just started out. HAL_UART_Transmit( &huart2, (uint8_t*)aTxBuffer, TXBUFFERSIZE, 5000 ) != HAL_OK demo application project files. www.soundsreal.co.za/uploads/app.rar #stm32f4 #stm32cubemx
Posted on September 02, 2014 at 11:22I'm using STM32Cube to generate simple USB MSC project. I'm using STM32F417VG.So I'm selecting USB_OTG_FS - Device_only and USB_DEVICE - Class For FS IP - Mass Storage Class. Then I'm generating source code, compile it and download to board, put it's USB cable to PC and nothing happens. What am I doing wrong? #usb #cubemx #st32cubemx #msc
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.