Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I used Cubemx to configured the system clock to 180MHz. Why is the system clock in the generated project code...... 6 zeros...... 16MHz:grinning_face_with_sweat:? Can I change 16MHz to 180MHz?It simply changes the number after "SystemCoreClock" to 180000000?
..
Tying to use STM32CubeMX 6.6.1 on an M1 Macbook Pro but when I try to save a new Project I can navigate to the Documents folder but no files or folders are shown. STM32CubeMX will duly create a new folder but if you then try and open it by you can't because the File Open fails to show files and folders in Documents.If you try and open a .ioc file within a subfolder of Documents STM32CubeMX opens but fails to load the file, you just end up on the opening screen where you select your starting position.Is it only me with this problem as for me this makes using a Mac just now impossible.ThanksEDIT: Just found out if I run using sudo from a Terminal I can see all the expected files/folders.
Using a custom board with an STM32F769 I had successfully interfaced to an eMMC with the HAL-MMC driver. The limitations of the driver's ability to query the extended CSD were clearly noted on this forum. I implemented my own routines to retrieve this information and correct the block sizes (after HAL_MMC_Init call). After upgrading to F7 FW v1.16.1 (released mid February) I noticed this functionality had been added to the driver itself so I removed my version. The out of the box driver fails when calling MMC_ReadExtCSD() from HAL_MMC_GetCardCSD() with a command timeout (CTIMEOUT) error. After quite a bit of debuggin I compared the driver to the STM32L series driver and noticed in that version the SDMMC_CmdSelDesel() call was made prior to HAL_MMC_GetCardCSD(). After making the modification the code runs successfully. I'm by no means an SDMMC expert but I believe this fix needs to be made in the next firmware release. I would appreciate ST/Community confirming the issue. The "fixed" an
I had installed STM32cube in my desktop with windows 10.But when do the update manager, it does not work and shows that server connection is error.But I saw the update information was refreshed 17767 days and it is very strange.Thanks a lot.Saumine
I am using STM32F103C8T6.Using TIMER 1 channel 1 for complementary PWM generation using HAL with DMA array .But i also want to update CCR value when half of DMA buffer is done.i.e something like if( array_index < array_size ) CCR1 = array[x];else CCR1 = ARR - array[x];Now in STM32 CUBE MX I cant locate where CCR is set in HAL function.If you can tell , it will be of great help.Or if there is another method to do so.THANK YOU.
Hello, I have a problem with the X-CUBE-EEPROM expansion package being corrupted every time I download it. Currently, I am working on EEPROM emulation on the STM32G0, I could not find examples either on the ST website or on GitHub. I need a working copy of the mentioned package or at least some examples for that specific MCU. Thank you
I am using cubeMX 6.6.1.When selected FREERTOS cmsis-v2 and FATFS, everytime cubeMX generates code it oveerrides syscall.c with FREERTOS cmsis-v1 prototype funcions.int ff_cre_syncobj ( /* TRUE:Function succeeded, FALSE:Could not create due to any error */ BYTE vol, /* Corresponding logical drive being processed */ _SYNC_t *sobj /* Pointer to return the created sync object */ ) { int ret; osSemaphoreDef(SEM); //*sobj = osSemaphoreCreate(osSemaphore(SEM), 1);//cubeMX generates this *sobj = osSemaphoreNew(1, 1, osSemaphore(SEM));///cmsis-v2 equivalent ret = (*sobj != NULL); return ret; }int ff_req_grant ( /* TRUE:Got a grant to access the volume, FALSE:Could not get a grant */ _SYNC_t sobj /* Sync object to wait */ ) { int ret = 0; //if(osSemaphoreWait(sobj, _FS_TIMEOUT) == osOK) if(osSemaphoreAcquire(sobj, _FS_TIMEOUT) == osOK) { ret = 1; } return ret; } is there any way i could prevent cubeMX to override this two functions every time GENERATE CODE is cli
Get a problem with ETH on H7 family. On my dev-board-stand-with-ugly-wired-beard (pic.1) Nucleo_h743zi2+ Dp83869EVM my project works fine. Project (.ioc in attach) generated by CubeIDE, with some adds:1) MPU:/* Disables the MPU */ HAL_MPU_Disable(); /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.BaseAddress = 0x30040000; MPU_InitStruct.Size = MPU_REGION_SIZE_16KB; MPU_InitStruct.SubRegionDisable = 0x0; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /** Initializes and configures the Region and the memory to be pro
Following a similar procedure described in this question, I tried choosing "Makefile" as my Toolchain/IDE. However, the generated Makefile has a couple of major problems.Firstly, the C_SOURCES section had every file listed twice (specifically, it had a list of files, concatenated to itself.) This was easy enough to fix, giving the attached file. However, the next problem is far more difficult to deal with -- the result of running 'make' is as follows:$ make ... <snip> ... arm-none-eabi-gcc build/main.o build/stm32h7xx_it.o build/stm32h7xx_hal_msp.o build/main.o build/stm32h7xx_it.o build/stm32h7xx_hal_msp.o build/stm32h7xx_hal_cortex.o build/stm32h7xx_hal_tim.o build/stm32h7xx_hal_tim_ex.o build/stm32h7xx_hal_rcc.o build/stm32h7xx_hal_rcc_ex.o build/stm32h7xx_hal_flash.o build/stm32h7xx_hal_flash_ex.o build/stm32h7xx_hal_gpio.o build/stm32h7xx_hal_hsem.o build/stm32h7xx_hal_dma.o build/stm32h7xx_hal_dma_ex.o build/stm32h7xx_hal_mdma.o build/stm32h7xx_hal_pwr.o build/stm32h7xx_hal
After selecting the STM32L55E-EV evaluation board I have these default settings. On the other hand when I am in DEBUG mode these functions block me to debug the program.I just need the starting program to work with the I2S interface. Thank you for your advices
Sd 4 bits, but generate SDIO_BUS_WIDE_1Bdisplayed conflict USART6 and I2C1but UART6 assync and used PC6 PC7I2C1 used PB8 PB9SDIO used PC8 PC9 PC10 PC11 PC12 PD2CubeMX 6.6.1 Package for STM32F4 Series 1.27.1Please, help ( may be error in Cube )
I have created a clock of 38.4MHz for SAI4A and SAI4B but I am not able to get 24.0kHz sample rate for a I2S 32bit Master input.All sample rages seams to relate 4.8MHz clock.
I am using NUCLEO-STM32F446re board. It runs at 180MHz SYSCLK and ADC uses APB2CLK that can run at a maximum frequency of 90MHz. I am using STM32CubeIDE and the clock configuration looks as follows:My ADC setup looks as follows:My DMA setup: Just before the while loop I call ADC to start with DMA. /* USER CODE BEGIN PV */ volatile uint16_t adcResultsDMA[2]; const int adcChannelCount=sizeof(adcResultsDMA)/sizeof(adcResultsDMA[0]); /* USER CODE END PV */ ...... ...... ...... ...... int main(void) { /* USER CODE BEGIN 2 */ HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adcResultsDMA, adcChannelCount); /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { ....... } }And the complete call back function I toggle a PIN and start ADC with DMA again.void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) { HAL_GPIO_TogglePin(GPIOA, time_meas_Pin); HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adcResultsDMA, adcChannelCount); }QuestionWhen I us
I generate code for STM32F411 with freertos and keil 5.37 IDE, which not working and got may error, Please help
Hello Community,I'm a newly user and have a custom PCB.Now with having set up the Cube IDE I'm struggling that I can't compile just the code like it came out of the CubeMX's code generator.Can you give me a hint to start?I already set the compilers optimization for size and varied the min heap and min stack variables, but no improvement.If the code really is too big, is there any option how to reduce it's size in CubeMX?Best regards,Hannes
hiafter uninstalling:"en.st-stm32cubeide_1.9.0_12015_20220302_0855_x86_64.exe_v1.9.0""en.stm32cubemx-win_v6-5-0_v6.5.0""en.stm32cubeprg-win64_v2-10-0_v2.10.0"and installing:"en.stm32cubemx-win_v6-6-1""en.stm32cubeprg-win64_v2-11-0""en.st-stm32cubeide_1.10.1_12716_20220707_0928_x86_64.exe"in stm32cubeIDE any time push "ctrl+space" for autocomplete, working but after delay for 20 second ! :oand into 20 second, stm32cubeIDE is hang.example:"uint8" now press ctrl+space and after 20 seconds it will show uint8_t and other words...please help me---my pc information:Processor: Intel(R) Core(TM) i7-7700K CPURAM: 16GBSystem type 64-bit operating system, x64-based processorGraphic card: NVIDIA GeForce GTX 1060 6GB
Dear Mrs, Mr,I'm working with a Riverdi discovery board with a STM32. I'm developing a serial protocol for which I'm using interrupt for reception.I enabled the IT in CubeMxUsing HAL_UART_Receive_IT(), it is working fine for the first time and also if all characters received are readIf I relaunch HAL_UART_Receive_IT() and characters were sent to the uart RX buffer without being read, it fails to work The only way I made it working was to add a HAL_UART_Init function before it and it is working fine.But I guess this is not the best way to clean buffer, state and pending interrupts. Can you advise of the best way to do it ? Thank you in advance,Pascal
i cant uplode code in my stm32 Bluepill. error notification (could not verify ST device).how to solve this problem I also change change stm32fx.cfg file .but I face same problem .
As follows, LL UART interrupt code with ring buffer were compose.< stm32l0xx_it.c >uint8_t Uart1_recvData[64]; uint8_t Uart1_sendData[64]; volatile uint8_t Uart1_sendDataSize; volatile uint16_t Uart1_sendPush; volatile uint16_t Uart1_sendPop; volatile uint8_t Uart1_recvDataSize; volatile uint16_t Uart1_recvPush; volatile uint16_t Uart1_recvPop; void LPUART1_IRQHandler(void) { /* USER CODE BEGIN LPUART1_IRQn 0 */ /* USER CODE END LPUART1_IRQn 0 */ /* USER CODE BEGIN LPUART1_IRQn 1 */ uint32_t isrflags = READ_REG(LPUART1->ISR); uint8_t UartRDR = LL_USART_ReceiveData8(LPUART1); WRITE_REG(LPUART1->ICR, ((uint32_t)isrflags) & (USART_ICR_PECF | USART_ICR_FECF | USART_ICR_ORECF | USART_ICR_NCF | USART_ICR_RTOCF)); if ((isrflags & USART_ISR_RXNE)) { if (Uart1_recvDataSize < (COUNTOF(Uart1_recvData)-1)) { if (0 == Uart1_recvDataSize) { Uart1_recvPop = Uart1_recvPush = (Uart1_recvPush % COUNTOF(Uart1_recvData)); }
Hi,I have control H-bridge with 4 MOSFET .MCU: STM32G071RBPWM Topology : Push Pull Mode (Not Complementary)PWM Frequency : 10KHz.Dead Time : 2.5usDuty Cycle : 0% to 50%Emergency Stop : 2 Fault Pins for Individual ChannelsHow to generate Push Pull Mode with PWM Fault pin/Shutdown CubeMx for 2 channels with TIM1 with Above configuration:Will that possible ?--KaranFollowup Threads:https://community.st.com/s/question/0D53W00000yVEbRSAW/detailhttps://community.st.com/s/question/0D53W00000yVedLSAS/detail
Hello,I’ve just started using FreeRTOS with an ARM Cortex m7 core. I’m using a sensor that provides an interrupt at every 62.5uS. based on that interrupt I have to read the 27-byte sensor data over SPI for that I have created one task(Read sensor data task) as below.My issue is, that my task is not synchronized with the interrupt. That means whenever the first interrupt occurs the task runs to read sensor data using SPI and parsed the data, before completion of reading and parsing data the other interrupts occur.As per the sensor datasheet: DOUT is latched out at the SCLK rising edge. DRDY is pulled high at the SCLK falling edge. Note that DRDY goes high on the first SCLK falling edge, regardless of whether data are being retrieved from the device or command is being sent through the DIN pin.DRDY is the interrupt that active low. here I have attached the datasheet snap.I have configured coreM7 CPU clock 400Mhz. And code optimization level is 0. So I want to know what is the time r
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.