Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on March 13, 2015 at 16:08Hi,I'm starting 2 new projects (1 with STM32F407 and one with STM32L152).Currently the CubeMX integrates the freeRTOS 8.1.2, when will this be updated to the 8.2?What is the ST strategy regarding the updates?What would it mean for me to integrate the newest version myself? What are the risks?Thanks(PS: I just saw that the other request was also visible, I do not know how to delete it...) #st32cubemx #freertos
Posted on December 16, 2015 at 11:58I try to use the power consumption calculator for STM32F030F4Px, but I have some problems: -I can`t change Interpolation ranges and as result define clock frequency below 8MHz -I don`t see Peripherals -when I start carculator my PC MPU usage jump up to 100% My OS Windows XP SP3. STM32CubeMX v4.12.0 STM32Cube v1.0 STM32CubeF0 Firmware Package V1.4.0 #stm32cubemx #pcc
Posted on December 14, 2015 at 21:50Hi,If have a disco429 board modified, removing hardware that i dont use for an experiment and in order to connect and access an SD memory card by 4 bit.The settings in CubeMX is set to SD 4 bits wide bus, but the code generated is ''hsd.Init.BusWide = SDIO_BUS_WIDE_1B;''Is this because i started the cubemx project with the selection of the disco board or might it be considered a bug?Thanks! #cubemx-4.12-sdio
Posted on December 07, 2015 at 19:54Cube tool downloaded version 4.12 version and told me to restart the tool with Admin rights. I did that but nothing special happened. The version number did not change. Then I stopped all Java processes, Jushed and Javaw. When after that I accidentally started the tool normally, it updated itself and version changed to 4.12. ST please note. #automatic-update-cubemx
Posted on December 05, 2015 at 04:47I'm the new bee and string to use CubeMX on my simple board.And want to use Fatfs on Stm32F103c8 board.Due to non exist of SDIO on the MPU,I have to use SPI to control memory card.In fact, when I configure the CubeMX for fatfs, I could have configuration.But, there are still need to add user code for SD card IO.Anyone could share your own codes? please.I'm using the uVision 4.60.Please help me to access SDcard on my stm32f103c8 board.Thanks;Ian #cuebmx-spi-sdcard
Posted on December 06, 2015 at 12:58Hi. I am trying to create stm32f401 code using matlab. I can install the mat_target file and configure simulink code generator. My problem is that when i am trying to build my project, CubeMX does not start and the matlab is busy for many hours. In matlab diagnostic viewer the last message i get is that ''♯♯♯ Open STM32CubeMX for configuration and project code generation. Start command: ''C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\STM32CubeMX.exe'' -q ''D:\Electronics\STM32F401\Projects\Matlab Test2\Matlab Test\.script'''' I am using matlab 2014a. Any help please? #stm32 #cubemx #matlab
Posted on December 04, 2015 at 09:29Hi,Last night i copied a CubeMX project file (.ioc) from my Windows 7 desktop to my Win10 laptop and discovered that on the Win10 machine the configuration was different. I missed for example the SPI settings in the Connectivity pane.Not sure yet what caused this.. Maybe the Cube team can have a look at it.Thanks, RobSolved... Sorry, my fault... i was opening an .ioc file from other disk loaction.btw.. i don't know how to delete this forum item :( #4.11.0 #cubemx #win10 #windows10
Posted on October 12, 2015 at 20:54According to ''Description of STM32F3xx HAL drivers'' (UM1786) page 188 [Quote start] ''The comparators COMP1 and COMP2, COMP3 and COMP4, COMP5 and COMP6 can be combined in window mode and only COMP1, COMP3 and COMP5 non inverting input can be used as non-inverting input.'' [ Quote End]. However when I configure COMP1 and COMP2 in window mode in the ''Pinout'' panel of the STM32CubeMX software I can only use PA3 as COMP2_INP. There are no way in the STM32CubeMX software to configure COMP1 and COMP2 in window mode using COMP1 as COMP1_INP. In order to verify this conflict I am using STM32373C-EVAL board (with 100 pins package) and running ''COMP_AnalogWatchdog'' example project from STM32F37x_DSP_StdPeriph_Lib_V1.0.0 package. I am able to control both Comparators in Window mode just using PA1 as COMP1_INP input. I also modified example file to verify if I can use at the same time PA3 pin as digital Push Pull output and surely it does work. Since I hav
Posted on July 11, 2015 at 05:06Hi, been using STM32CubeMX for creating code for ''System Workbench for STM32''. The linker file created by STM32CubeMX has 0 for heap and stack: _Min_Heap_Size = 0; /* required amount of heap */ _Min_Stack_Size = 0; /* required amount of stack */ I am using latest V1.2.0. The chip is STM32L151RCTx. If I look at the linker files in the ''../Templates/gcc/linker'' folder of STM32CubeMX, they all have 0x200 heap size and 0x400 stack size. Not sure why the linker file in created code has 0. Think it should be 0x200 and 0x400 for linker file of created code too. #stm32cubemx-stm32l1-linker
Posted on May 12, 2015 at 09:45Hello,I have set up a CubeMX project with USB FS and CDC enabled. The device is STM32L151CCT6.Also, I have installed the VCP 1.4.0 drivers for Win7 (x64).When I start the debug session (IAR 7.40), Windows complain that the device is unknown and of course is not shown on the COM port list.Moreover I use the following code in my USB gatekeeper thread, to avoid illegal usage of the device:while (hUsbDeviceFS.dev_state != USBD_STATE_CONFIGURED){ osThreadYield ();}but it never goes through that check. The dev_state always evaluates to USBD_STATE_DEFAULT.Any thoughts? Thanks!Best regards,George #cubemx #stm32l1
Posted on October 03, 2015 at 08:27Hi,The Nucleo-F302R8 is the only Nucleo that has a different hardware configuration for the LD2 LED. Different from all other nucleo boards, the user led is connected to pin PB13 and not PA5. But CubeMX doesn't care about this, and it still shows in Chip View that LD2 is connected to PA5. Please, correct this because it generates a lot of confusion in newbies. #nucleo-f302 #cubemx #ld2
Posted on November 12, 2015 at 13:52Experiment Set-up:STM32CubeMX version: 4.11.0STM32F746NGH6Description:It limits the PCLK1 to 50 MHz and PCLK2 to 100 MHz. See the RED error below:However, The PCLK1 can reach 54 MHz and PCLK2 can reach 108 MHz after over-drive. #stm32cubemx-
Posted on November 30, 2015 at 09:52Hello.I am using STM32F0xx with stm32cube lib as the dev platform. My application requires TIM3 peripheral. I am using __HAL_TIM_SET_COUNTER to set the cnt value at runtime. I need the timer count value for some calculation and i re-set it using the above macro every fixed interval. What i am observing is when set the counter value, stop the timer and restart it. It doesnt report interrupts. What is the correct procedure to set the counter value while the timer is running?? #stm32-cubemx-tim-interrupt
Posted on May 24, 2015 at 18:38Hello All, 1) how can I have an asynchonous Transmit command ? 2) what is the largest amount of data I can put into CDC_Transmit_FS ? I am implementing CDC on my firmware based on CubeMx. So far it works (I have to increase the heap) when I quickly want to transmit severel chunks of data: CDC_Transmit_FS(buffer1, strlen((char *)buffer1)); CDC_Transmit_FS(buffer2, strlen((char *)buffer2)); CDC_Transmit_FS(buffer3, strlen((char *)buffer3)); only the first one is sent. What I do not understand is how buffer handling is done. in CDC_Transmit_FS it a) USBD_CDC_SetTxBuffer b) USBD_CDC_TransmitPacket Function a) copies the buffer pointer to the HAL and function b) sends the data via USB. Why does a second call of CDC_Transmit_FS does not overwrite data of the ongoing CDC_Transmit_FS? What is a safe time to call CDC_Transmit_FS? Do I have to check before? Is there a callback that tells me
Posted on November 24, 2015 at 12:51Hi, It's not very useful have the sample code for STM32CubeMX without the STM32CubeMX file!! Where are the *.ioc file!!!!! #stm32cubemx
Posted on March 03, 2015 at 00:30Hi,I did a initialization project with CubeMX for STM32F4discovery but when I click ''generate source code'' (selecting IDE MDK-ARM 4.73 and firmware package STM32Cube FW_F4 V1.4.0) appears the error message:''the code is succesfully generated under [.....] but MDK-ARM 4.73 generation project but have a problem''.How can I fix the error?Thank you so muchNF #stm32f4 #discovery #cubemx
Posted on October 30, 2015 at 11:05Hello all, when I am using STMcubeMX I can not find the SPI6 peripheral, but according the datasheet STM32F429AIH7 has SPI1, SPI2, SPI3, SPI4, SPI5 and SPI6 . thanks in advance. #spi6-stm32cubemx-stm32f429
Posted on November 11, 2015 at 22:11 Hi, I have spotted a potential bug in the HAL driver for the UART on (at least) the STM32L0. The macro for determining the BRR register value__DIV_LPUART is defined as follows: #define __DIV_LPUART(_PCLK_, _BAUD_) (((_PCLK_)*256)/((_BAUD_))) Any value passed to this macro for the _PCLK_ token over 16MHz will result in overflow as it is multiplied by 256 before being divided by the required _BAUD_. I noticed this as I tried to use the HAL driver to set my PCLK driven UART (32MHz) to 9600 and saw it come out as 19 Has this been raised before? Note: this is with the latest IAR compiler for ARM (7.1) #hal #uart #cubemx #stm32l0
Posted on October 22, 2015 at 19:28Dear All, I am making calls to the HAL_I2C_Mem_Read_DMA, HAL_I2C_Mem_Write_DMA provided by the STM32HAL driver, and in some cases expecting a Address ACK failure. It seems that the implementation of these functions involves a call first to the HAL_DMA_START_IT, which enables the DMA stream, and then proceeds to send the slave address/ memory address. However, since I expect there to be an Address ACK failure (I am trying to find multiple devices out of which only some of them will be discovered), the DMA transfer is started before the slave/ memory address is sent over, and we are constantly waiting for the DMA transfer to complete. If I swap the order-- the Slave and Memory Address is sent before the DMA transfer has been started up-- then everything works as expected. That is, I get a HAL_I2C_ERROR_AF and the DMA transfer has not been started because the call to HAL_I2C_Mem_Read_DMA has returned HAL_ERROR. Firstly, is there a reason for the c
Posted on October 19, 2015 at 22:14Hello everyone,I am trying to start working with ST programming tools and looking for a bit of advice.My first task is to build a project from a bunch of .c files which were developed by a proper programming engineer. The microcontroller we use is STM32F051C8. I wonder which software should I use? I have downloaded STMCubeMx, CooCox, STMStudio and something called STM32Cube_FW_F0_V1.4.0 which I cant understand what is.Realistically, I am just looking for learning resources, which I am sure there are plenty of them, somewhere. Many Thanks #st32cubemx #stm32-coocox-coide-cube
Posted on February 02, 2015 at 10:30STM32Cube provides project code generation for FreeRTOS along with a wrapper dedicated to use of the CMSIS-OS API. Nevertheless, it seems that this wrapper is brocken regarding the FreeRTOS API function ''vTaskDelayUntil()'' wich is wrapped to ''osDelayUntil()'' according to the following code from cmsis_os.c: /** * @brief Delay a task until a specified time * @param PreviousWakeTime Pointer to a variable that holds the time at which the * task was last unblocked. * @param millisec time delay value * @retval status code that indicates the execution status of the function. */ osStatus osDelayUntil (uint32_t PreviousWakeTime, uint32_t millisec) { &sharpif INCLUDE_vTaskDelayUntil portTickType ticks = (millisec / portTICK_RATE_MS); portTickType previouswake = (portTickType) PreviousWakeTime; vTaskDelayUntil(&
Posted on October 15, 2015 at 10:21 I'd like some help narrowing down the origin of my problem withSTM32F030 and CubeMX generated code. Just made some project using the newest version of CubeMX software, and it didn't work. I could simplify the code (see below) to focus on the problem. In short, the UART transfer isn't working for some reason. If I single-step throughHAL_UART_Transmit_IT() call, it works ok. However if I start in free-running mode, the code would never reach the while(1) loop. Instead, it would infinitely call error callback with huart->ErrorCode set to 4 (framing error) which is nonsense as it should not normally occur upon uart transmission I'm using Keil v.5 , optimization level set to 0. main code int main( void ) { HAL_Init(); /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ SystemClock_Config(); /* Configure the system clock */ MX_GPIO_Init(); /* Initialize all configured peripherals */ MX_USART1_UAR
Posted on October 14, 2015 at 16:41Hello, I have to receive some data in a ''set_feature'' command. It's possible because the packet is: Offset Field Size Value Description 0 bmRequestType 1 Bit-Map D7 Data Phase Transfer Direction 0 = Host to Device 1 = Device to Host D6..5 Type 0 = Standard 1 = Class 2 = Vendor 3 = Reserved D4..0 Recipient 0 = Device 1 = Interface 2 = Endpoint 3 = Other 4..31 = Reserved 1 bRequest 1 Value Request 2 wValue 2 Value Value 4 wIndex 2 Index or Offset Index 6 wLength 2 Count Number of bytes to transfer if there is a data phase I can't find were is the code to read this data but if I respond to the command I can see in the sniffer the data!! Somewhere the code writes the buffer with the data. thanks! #stm32cubemx-cdc-set_feature
Posted on October 14, 2015 at 05:20I am using Cube, everytime that I make a small change in the cube project and regenrate the code, it generates this line in stm32f1xx_hal_msp.c /**DISABLE: JTAG-DP Disabled and SW-DP Disabled */ __HAL_AFIO_REMAP_SWJ_DISABLE();Everytime I have to go and comment this line out. The other codes that I write in between the special comment sections remains fine, but this line always makes some problem. Is there a special comment tag or something to let cube know that it should not touch that particular line or block of code?Thanks. #hal #cubemx #stm32 #bug
Posted on October 14, 2015 at 18:13after few frequent connects and disconnects, the program fails to detect pendrive connection/disconnection. Is there any minimum duration required between connection and disconnection.??i am working with STM32f205 and USb stack i got from STm cubeMX. #stm32 #otg #cubemx
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.