Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on September 01, 2016 at 00:12Hi,I have been wokring on STM32F030 Discovery.I have initialized UART. Whenever I send data from my PC to STM32. It adds the data into previous data. For example if I send ''123'' and next time I send ''456''. The whole string would be like ''123456'', even though they both are different strings. How to clear the buffer? I tried clearing the buffer, but it clear everytime the UART interrupt occurs and clear everything and shows nothing.Please help?Here is my code&sharpdefine BUFFER_SIZE 9void USART2_IRQHandler(void){ HAL_UART_IRQHandler(&huart2); uint8_t i; HAL_UART_Receive_IT(huart,(uint8_t*)ReceivedData,BUFFER_SIZE); for (i=0;i<BUFFER_SIZE;i++) { ReceivedData[i]=0; //clear Rx_Buffer before receiving new data } } #uart #!stm32 #stm32 #stcubemx #hal
Posted on September 01, 2016 at 07:29Hi, I have a hands-on document about cube mx. I am trying to configure wwdg as my hands on document tell me. But there is a configuration bug I guess, cos after I enable wwdg it fires immediatly. (I have a bare project so I am sure there is no delay cos wwdg fire ) Best Regard #wwdg #bug #cubemx
Posted on August 31, 2016 at 13:12I am creating a project using Nucleo F401RE and cubemx and visualgdb. I've got a problem where there seems to be a clash between eeprom on spi and a 4bit sdio sdcard. I've got them working independently and together but on their own. When in the same project if I add buttons (interrupts) and leds and an lcd (outputs) they still work but if I try adding any of adc/timer/rtc/i2c/usart the problem occurs. I can either have: eeprom read/write and just sdcard erase. or No eeprom functions and sdcard read/write/erase. If I try having both the project always fails in sd mount returning a wrong number of volumes, including if I have sdcard function in the project but not used, i.e. on a button press.I know it�s not the heap/stack, hardware or shared variables and I�ve tried changing the order of inits.Does anyone know of any possible bugs that may have happened in cubemx generation? Any help would be much appreciated.Marcus #f_mount-sdcard #nucleo #st32cube
Posted on June 21, 2016 at 17:51 Hello, I would report a strange issue in generating the low level driver for NAND. In particular there is a problem in function HAL_NAND_Address_Inc located in stm32f2xx_hal_nand.c: uint32_t HAL_NAND_Address_Inc(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress) { uint32_t status = NAND_VALID_ADDRESS; /* Increment page address */ pAddress->Page++; /* Check NAND address is valid */ if(pAddress->Page == hnand->Info.BlockSize) { pAddress->Page = 0; pAddress->Block++; if(pAddress->Block == hnand->Info.ZoneSize) { pAddress->Block = 0; pAddress->Zone++; if(pAddress->Zone == (hnand->Info.ZoneSize/ hnand->Info.BlockNbr)) { status = NAND_INVALID_ADDRESS; } } } return (status); } As BlockNbr holds the total number of blocks in NAND, and ZoneSize holds the size of a zone in terms of number of blocks, the test should be performed in this way: if(pAddress->Zone == (hnand->Info.BlockNbr / h
Posted on August 22, 2016 at 01:30I had built a project with cubeMX and I had been working on it.I wanted to make a change in the configuration, so I ran CubeMX and re-generated the code.Only this time, CubeMX did not include the Drivers/Inc/stm32l4xx_ll_gpio.h file in the project.I need that .h file because I use GPIO_PIN_RESET and GPIO_PIN_SET macros, and I use LL_GPIO_ReadInputPort.Why would cubeMX stop copying the stm32l4xx_ll_gpio.h file to the project? #stm32cubemx-stm32l4xx_ll_gpio.h
Posted on August 10, 2016 at 11:08Hi to all, i use cubeMX and stm32F401re, all work weel but tree days ago i update the libraries for STM32F4 family, lather this update i create a simple project with cubemx, when i compile whit IAR i have this error : Error[Ta097]: Cannot call intrinsic function ''__nounwind __DSB'' from Thumb mode in this architecture C:\MRC\example\Drivers\CMSIS\Include\core_cm4.h 1792 Error[Ta097]: Cannot call intrinsic function ''__nounwind __DSB'' from Thumb mode in this architecture C:\MRC\exemple\Drivers\CMSIS\Include\core_cm4.h 1797 Error while running C/C++ Compiler if i use KEIL all work well, can you help me? best regards Antonio #cubemx #!bug #iar
Posted on August 18, 2016 at 21:37hello,i want to know can we transfer data from CAN Bus to DMA memory on board on HAL Library? if yes or no can some one please explain how ?Thanks in advance!!! #hal #hal #can #!stm32-!cubemx-!can-!bug #canbus #cubemx #uart #stm32 #stm32
Posted on August 17, 2016 at 09:01After generating code using CubeMX 4.14.0 for an STM32F030C6, I noticed a bug in using the blocking (non interrupt or DMA) functions for SPI.When switching between using the functions HAL_SPI_Transmit and HAL_SPI_TransmitReceive, the function HAL_SPI_TransmitReceive writes only zeroes in the RX array when it is called after HAL_SPI_Transmit. Actual received bits are confirmed on an oscilloscope.This was tested while communicating with serial flash IS25LQ010B-JNLE, but it is very likely unrelated to the answering device.If only the function HAL_SPI_TransmitReceive is used, it works every time. No problem. #bug #stm32 #cubemx #spi
Posted on August 11, 2016 at 08:17Hey,i'm using CubeMX to generate code. In one of the examples is an EEPROM emulation (STM32Cube_FW_F1_V1.4.0\Projects\STM32F103RB-Nucleo\Applications\EEPROM\EEPROM_Emulation) which I want to use. My Problem is that I can not find the Button in CubeMX so that the generated stm32f1xx_hal_conf.h enables the HAL_FLASH_MODULE_ENABLED define.I hope you can help me.Jens #cubemx-hal-flash
Posted on August 10, 2016 at 15:43Java version 1.8u102.I can't set project name in project settings, any name will get a alert ''Location cannot be found or created, Please change project location Name''when I use root run it, things seems fine, can you to fix this? #stm32 #!cubemx #cubemx
Posted on August 03, 2016 at 15:18 Hello, I've got a project build on custom PCB around STM32F051K6T6. There are a couple of other things on this PCB: ULN2003 driver, CD4511B driver , TLV73333 3.3V regulator and the main ''problem'' NRF24L01+ module, connected through SPI1. Board peripherals and init code are generated with CubeMX software. So far everything worked just well: PWM on gpio, timer 6 for some periodic interrupts, CD4511 7 segment driver... When I tried to connect NRF24L01+ through SPI with custom library (modified tm_nrf library) using SPI HAL drivers, strange things happen. uC halts in Hard Fault Handler after a few SPI transmit and/or receive commands. It halts at in stm32fxx_hal_spi.c file in function HAL_SPI_Transmit()at specific line (): HAL_StatusTypeDef HAL_SPI_Transmit(SPI_HandleTypeDef *hspi, uint8_t *pData, uint16_t Size, uint32_t Timeout){ /* ...other code... */ /* Transmit data in 8 Bit mode */ else { while (hspi->TxXferCount >
Posted on August 05, 2016 at 11:56I wanted to try out the CubeMX. I'm a bit stuck with some time issues. In standard peripheral I used system_get_time();What is the equivalent of this function in CubeMX?I found HAL_RCC_GetHCLKFreq(); that could be in my case, but it doesn't really work out for me, or at least I don't know what is the difference between them two. #cubemx #system_get_time
Posted on July 20, 2016 at 00:51I am using STM32CubeMX to generate code to create a USB CDC device on the STM32F4x9I-EVAL MB1045 Rev B board which has a STM32F429VGT6 microcontroller. For testing I connect the OTG FS1 USB connector on the STM32F4x9I-EVAL board to a Raspberry Pi acting as the host Linux system. When I run the Cube generated code (see attached project) I do not see a virtual TTY appear on the Raspberry Pi system. I have run the same test using Cube generated code for the STM32F4-DISCOVERY board with an STM32F407 Microcontroller and with that board I do see a /dev/ttyACM0 virtual TTY appear. With the failing test on the STM32F4x9I-EVAL board I have tried both the OTG FS1 and the OTG FS2 connectors. I do see the associated LD7 and LD9 LED's turn green when I connect the micro USB cable. I am wondering if there is some board configuration or jumper that I have missed? Note that I am running the CUBE generated code without modification exc
Posted on August 04, 2016 at 10:36Hi everyone, I developed STM32L0 USb hid application with Cubemx,I send to data computer with usb hid interface.But I cannot send ascii zero(null )character.Other character send succesfully. For example my buffer like this buffer[5]={0x01,0x02,0x00,0x03,0x04}; If i send this buffer only send 0x01,0x02.The other values are not send succesfully.I think usb hardware seen null character close the connection or thinking buffer is empy maybe Have any idea ? #cubemx-usb-hid #stm32-usb-hid-communication
Posted on August 01, 2016 at 08:56I'm trying to run the CAN Network example (\STM32Cube_FW_F7_V1.4.0\Projects\STM32F769I_EVAL\Examples\CAN\CAN_Networking\MDK-ARM). EVAL board Jumpers are set according to the documentation, I'm running the example without any changes. I have one EVAL board connected to a USB CAN-USB monitor (PEAK PCAN-USB). After I hit the tamper button in order to send a CAN message, the CAN monitor gives a BUSHEAVY error. Very often BUSHEAVY is caused by bit timing issues. This example based on EVAL units running in the same CAN network. Maybe it�s never tested with an external CAN USB tool, to be sure the bitrate is really according specifications? Anybody familier with this issue? #canbus #stm32 #hal #can #cubemx
Posted on July 29, 2016 at 16:10We use CubeMX .We have selected ''FreeRTOS''In the file ''stm32l4xx_hal_conf.h'' ''USE_RTOS'' is set to 0.See the following line:&sharpdefine USE_RTOS 0U It seems strange .the goal was to modify the __HAL_LOCK macro in the file ''stm32l4xx_hal_def.h'', in order to enter critical section , when freertos used.&sharpif (USE_RTOS == 1) /* Reserved for future use */ &sharperror '' USE_RTOS should be 0 in the current HAL release ''&sharpelse... #hal #cubemx #freertos
Posted on July 28, 2016 at 19:10Hello, https://www.youtube.com/watch?v=kRhF44v2ezMhttp://https//www.youtube.com/watch?v=kRhF44v2ezM https://www.youtube.com/watch?v=kRhF44v2ezM The initialization code was generated using STM32CubeMx #sd-card-mmc-stm32cubemx
Posted on July 28, 2016 at 19:06Hello, https://www.youtube.com/watch?v=kRhF44v2ezM https://www.youtube.com/watch?v=kRhF44v2ezM The initialization code was generated using STM32CubeMx #stm32cubemx #mmc #sd-card
Posted on July 25, 2016 at 22:02We have spent weeks getting the CubeMX setup just right, and have decided that we need a processor that has more memory. I really don't want to start from scratch, the processor is almost identical except that it has twice the Flash.Is there anyway to change the selected processor but leave all the pin assignments and IP setups as-is?Currently configured for STM32L011K4Tx, going to an STM32L031K6Tx-Matt #stm32l031 #cubemx #stm32l011
Posted on July 25, 2016 at 08:22Hello, I am trying to configure external clock(HSE) for STM32L476 uC using STM32CubeMX, Problem is that its disable in GUI , any way to enable this ? Same goes for LSE #stm32l4 #cube #cubemx #stm32cubemx
Posted on July 13, 2016 at 04:05Hi, I encountered following. When I set device type as ''ST STM32F401xE'' on EWARM, the project was build successfully. Is the device type should determined everytime? with, STM32CubeMX Version 4.15.1 STM32Cube FW_F4 V1.12.0 procedure,by CubeMX File -> NewProject Board Selector -> MCU Series -> STM32F4 -> NUCLEO-F401RE Nothing change Project -> Settings -> Projcet Name:f401_projectname Toolchain / IDE -> EWARM OK Generate Code Open Project(IAR Embedded Workbench ofr ARM 7.10.3.6932, with 32KB code size limitation) Alt+F7(see option) -> device is set as 'None'.Sice MPU type is not set, EWARM says as following at comilation. Error[Ta097]:Cannot call intrinsic function ''_nounwind _DSB'' from Thumb mode in this architecture Error[438]:This instruction is not available in the selected cpu/core Error[Ta097]:Cannot call intrinsic funct
Posted on July 21, 2016 at 16:03I have a question on how to modify the Flash Latency under RCC Configuration. No matter what clock configuration I choose, this field is always greyed out. In some application, I had to modify myself the Flash Latency from 0 to 1 just to see it running and not getting into Hard Fault handler. Anyone? #flash #stm32cubemx #rcc
Posted on July 04, 2016 at 21:55Hello, is there any way to change the output dir (I guess it's the same as Toolchain Folder Location?) in CubeMX? #cubemx-output-folder
Posted on July 06, 2016 at 15:41Hello, I habe a two problems with the SPI-communication between a Nucleo64 and a X-Nucleo-IHM01A1 => STM32F446RE to L6474. 1. The CubeMx 4.15 creates following code in the �void HAL_SPI_MspInit(SPI_HandleTypeDef* spiHandle)� **SPI1 GPIO Configuration PA5------> SPI1_SCK PA6------> SPI1_MISO PA7------> SPI1_MOSI */ GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); �.} Why GPIO_PIN_6 (= MISO) is defined as an output? I think it should be an input!? (I tried this also with other F4xx, F3xx and F7xx => all the same. It's already shown in the CubeMX->Configuration->SPI-Settings->GPIO-Settings and can&sharpt be changed. Funny thing: Creating project for a STM32F103RBT6 => MISO is an input!! 
Posted on July 08, 2016 at 20:06Hi, I am generating a CubeMX project for a STM32L476 (on a Nucleo boared). I'm using 3 ADCs, 2 and 3 with DMA. When I try to start a conversion, I am getting aHAL_ADC_STATE_ERROR_INTERNALin the conversion complete interrupt handle. Does anyone know what can cause that? I''m using CmeMX 4.15.1, with firmware package 1.5.1 for STM32L4. Thanks,RIcardo #adc-dma-cubemx-internal-error
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.