Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi,I work with STM32H753zi , and I used the example SPI_FULLDuplex_ComDMA.I took 2 boards and connected 4 wires between them , as shown in the Readme file.I run the test .In master , the 2 LEDS that indicate Rx and TX completion turn ON.In slave , LED 2 that indicate Rx completion turn ON, LED 1 is OFF. But LED 3 that indicates error is ON.After debugging , the error arrives from trying to compare the received data (aRxBuffer ) to expected data.The data in aRxBuffer is 0.I tried to replace all 4 wires -> it did not help.I tried to move to another example SPI_FULLDuplex_ComIT -> same failure.What may be the cause ?Am I missing something ?Thanks,Rafi.
Hi Guys,I have a problem with erasing Flash sector. I am using STM32F746ZG Nucleo Board. When I run this code, mcu works perfect it works but I can't install new firmware to mcu. I've also tried example code, same problem. I take (DEV_TARGET_NOT_HALTED) when I run the program.I am getting the same error in debug mode as described in the link below.https://community.st.com/t5/stm32cubeide-mcus/how-to-solve-error-finishing-flash-operation-in-stm32cubeide/td-p/53113/page/2Code Here they are FLASH_EraseInitTypeDef FLASH_Erase_Init; uint32_t SectorError; HAL_FLASH_Unlock(); FLASH_Erase_Init.TypeErase = FLASH_TYPEERASE_SECTORS; FLASH_Erase_Init.VoltageRange = FLASH_VOLTAGE_RANGE_3; FLASH_Erase_Init.Sector. FLASH_SECTOR_3; FLASH_Erase_Init.NbSectors = 1; if(HAL_FLASHEx_Erase(&FLASH_Erase_Init, &SectorError) == HAL_OK) HAL_Flash_Lock(); How can i solve it ?
Hi everyone,I'm using an STM32G431KBT6 MCU (STM32G4 Series) and I'm trying to generate a sine wave of 1 kHz using DAC and DMA . I've initialized the DMA as a half word, but it's not creating a sine wave. When I switch to word, it works perfectly. Can anyone help me figure out what's going on?My SYSCLK is at 16MHz. I have put Prescalar as 0 and ARR to 124 for generation of 1 KHz sine wave. I've attached my code snippet below for reference. #include "main.h" #define SINE_TABLE_SIZE 128 DAC_HandleTypeDef hdac1; DMA_HandleTypeDef hdma_dac1_ch1; TIM_HandleTypeDef htim2; const uint16_t sineLookupTable[SINE_TABLE_SIZE] = { 2048, 2148, 2248, 2348, 2447, 2545, 2642, 2737, 2831, 2923, 3013, 3100, 3185, 3267, 3346, 3423, 3495, 3565, 3630, 3692, 3750, 3804, 3853, 3898, 3939, 3975, 4007, 4034, 4056, 4073, 4085, 4093, 4095, 4093, 4085, 4073, 4056, 4034, 4007, 3975, 3939, 3898, 3853, 3804, 3750, 3692, 3630, 3565, 3495, 3423, 3346, 3267, 3185, 3100, 301
Hello, I encounter a problem with creating a TLS client connection with a client certificate and private key. The server side is Ubuntu based with OpenSSL 3.0.13 30 Jan 2024.Server certificate validation works without any problems. But a weird issue happens when I want to add a client-side certificate with a private key. OpenSSL ends with a weird error: [ERROR] header too longRunning on STM32H5 - ThreadX Version 6.2.0The server has the following options:mode = 'server',protocol = 'tlsv1_3',key = options.ssl..'/server.priv',certificate = options.ssl..'/server.crt',cafile = options.ssl..'/client.crt',verify = { 'peer', 'fail_if_no_peer_cert' },options = { 'all', 'no_sslv2', 'no_sslv3', 'no_tlsv1', 'no_tlsv1_1' } When I switch the server side to tlsv1_2 everything works as expected When I disable 'peer', 'fail_if_no_peer_cert' and keep 'tlsv1_3' it also works But with both options, it just does not work. The connection from
I am using STM32C011F4 mcu on my project. I want to send my device to sleep mode with HAL_PWR_EnterSTOPMode(). STM32C011F4 does not have build-in Walke-up option in RTC driver. So, I'd like to learn if it is still possible to use AlarmA to periodic sleep/wake-up sequence. Any help is appreciated. Thanks in advance.
Hi, I have got the filex + levelx working with qspi nor flash chip ( 16 MB size )along with threadx.However I am not able to get the USBX MSC to work to see the files by attaching the STM32H563 Nucleo board to a PC.But the USBx stack doesn't seem to work. I have checked and used all the code from a ready STM32H573 discovery project give by ST Micro.The USBPD stack uses the void USBPD_DPM_Notification(uint8_t PortNum, USBPD_NotifyEventValue_TypeDef EventVal) function to call start the USB interface.But the USBPD_DPM_Notification() doesn't get called. I am unable to get the USBx CDC ACM working along side Filex as well.
Hi,where can I find a list of all the drivers/libraries supplied by ST?In particular, because of the need for fast time to market, I am trying to find those for all QSPI flash ICs so I can choose external flash (for video and graphics) accordingly (mainly those that can be used with DMA).Thank you
I am currently working on a project using LWIP with RTOS to send large web data files. I am using the STM32H573VIT MCU. However, I have encountered an issue where I am unable to send the entire file at once. To resolve this, I divided the file into smaller packets of 1KB, which allows the transmission to succeed.While this approach works initially, after reloading the webpage a few times, I experience a problem where the MCU stops responding after sending only a few packets. The transmission fails, and the program halts unexpectedly.I would greatly appreciate your assistance in diagnosing and resolving this issue. Could you please guide me on possible reasons for this behavior and suggest any potential fixes?I attached the lwip config file:
I want to create two nodes program, one node has two publishers and the other one handles a serviceIf I create each node independently both work, however, when running both simultaneously the program crashes ones the service is called. void StartDefaultTask(void *argument) { rmw_uros_set_custom_transport( true, (void *) &huart2, cubemx_transport_open, cubemx_transport_close, cubemx_transport_write, cubemx_transport_read); rcl_allocator_t freeRTOS_allocator = rcutils_get_zero_initialized_allocator(); freeRTOS_allocator.allocate = microros_allocate; freeRTOS_allocator.deallocate = microros_deallocate; freeRTOS_allocator.reallocate = microros_reallocate; freeRTOS_allocator.zero_allocate = microros_zero_allocate; rcl_node_t node; rclc_support_t support; rcl_allocator_t allocator = rcl_get_default_allocator(); rclc_support_init(&support, 0, NULL, &allocator); rclc_node_init_default(&node, "controlST", "neurobot", &support); rcl_nod
Hi,I am trying to update the firmware with an xmodem protocol over a uart with stm32. I convert the hex file created by CubeIDE into an Xmodem 1k package and send it. The bootloader I wrote in Stm32, receives this data and writes it to the necessary address. There is no problem on this side.However, there is a difference between the program I sent and the program compiled and written by CubeIDE. This causes the program to not work properly.There are some lines in the hex file that are not completed to 16 bytes, I add 0xFF to the end of them, package them and send them like that. . .
I'm facing an issue connecting STM32 to the MQTT broker.
Hello all,I have been trying to implement the MSC_Standalone example (device mode with SD card) with the STM32469 discovery board and CubeMX for some time now (OTG_FS_MODE).The example works perfectly in standalone mode, but when I now try to set up the same project with CubeMX, it is a huge mess.I could leave it like this but it is desired and required to create the project with a CubeMX file so that other peripherals and settings can be made as I go along.I proceed as follows: I first activate the USB_OTG_FS. Set the global interupt here.Then I activate the Mass Storage Class under USB_DEVICE.Furthermore, I have loaded the BSP from the example into my project folder.As an optimist, I now assume that this should work. As I understand it, I don't need FatFS and I don't need to activate an SD card, as this should be taken over by the MSC and it is not used in the STM example. I also assume that CubeMX does the clock configuration correctly for me.But that does not seem to be the case.It
Hi everyone,I'm trying to configure my STM32F769NIH6 via the ETH port in "MII full duplex Only" mode and the LwIP library, but I can't make it work as soon as the default task starts everything freezes. void StartTask_SYS(void const * argument) { /* init code for LWIP */ MX_LWIP_Init(); /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) Non capisco dove sto sbagliando, avete dei suggerimenti?
Hello everyone!I am contacting you because I have not succeeded in creating an executable eCompass software using ST32CubeMX despite several attempts.However, there are no problems with the ‘ISK01A3_DataLogTerminal’ application.Have any of you ever got this sample software to run, or can anyone tell me who created it?
Hi there,just found out, that there's a severe bug in STM32Cube_FW_H7_V1.11.2, file stm32h7xx_hal_ospi.c at line 1599 (Function HAL_OSPI_Receive_DMA), which prevents the OSPI DMA Receive mode from working correctly: /* Enable the transmit MDMA Channel */ if (HAL_MDMA_Start_IT(hospi->hmdma, (uint32_t)pData, (uint32_t)&hospi->Instance->DR, hospi->XferSize, 1) == \ HAL_OK) This code seems to be copied from the HAL_OSPI_Transmit_DMA function and should read /* Enable the receive MDMA Channel */ if (HAL_MDMA_Start_IT(hospi->hmdma, (uint32_t)&hospi->Instance->DR, (uint32_t)pData, hospi->XferSize, 1) == \ HAL_OK) for the HAL_OSPI_Receive_DMA function.Best regards, Heino
The update function using the DUALBANK SWAP function added to the firmware for the old CPU (STM32L4R5QII6) has been ported to the firmware for the new CPU (STM32L4P5CGU).The firmware rewrite process is as follows:1. Transfer the binary file .bin via UART and X-MODEM communication2. Rewrite from the start address (0x08080000) of the non-booted BANK in the FLASH area3. Change the register "FLASH_OPBT" to BFB2=1 to enable the BANKSWAP function4. Soft reset5. Start from BANK2 (the rewritten firmware).All steps 1 to 5 worked without problems with the STM32L4R5QII6 firmwareBut when ported to the STM32L4P5CGU firmware, steps 1 to 4 worked without problemsbut a HardFault occurred during the initialization process at startup of step 5, causing a reset.Analysis with a debugger revealed that the cause was an invalid address reference when executing the function "LL_SPI_TransmitData16()".When porting this function to the STM32L4P5, it seems necessary to write code to specify the memory address ref
i am getting sistematically the exact problem described in this post https://github.com/STMicroelectronics/STM32CubeG0/issues/46 at 100kHz I2C frequency. I am using a nucleo with stm32fg031. Even tho i have set up 5 trials, i only get on my analyzer one trial and than i end up with the error. When setting the I2C at 400kHz i no longer get the error from the HAL. How can i get it to work without having to deinit the i2c?
SO I HAVE STARTED MY PROJECT WITH STM32L072 SERIES WHICH IS HAVING 192B FLASH 64 PIN IC along with bluenrg-m2sa. my concern and doubt is regarding implementation of ota feature to stm32l072 ic which i never implemented and work on before and also the examples and other refrences are mostly availabe for L4 or F series IC so my request to give me and help me with appropriate resoures and file so that i can easily implement the ota feature to my project and can easily understand also.
Dear Members, I'm using the STM32F030CC controller for my RTOS-based project and currently developing a bootloader for it. The application code has been relocated to 0x08004000. The bootloader successfully jumps to the application, but after initializing all peripherals (GPIO, timers, etc.), calling `HAL_GetTick()` returns a `uwTick` value of 0. This is the fuction iam using to jump from bootloader to application. when i try to do _enable_irq(); the jump fuction is not working . am i missing anything?
I am currently working on the STM32F072RBT6 microcontroller and have developed a bootloader that successfully jumps to a specified location. The bootloader is located at address 0x08000000, and the main application is at 0x08006000. The bootloader is able to jump to the main application, but when the main application starts, it stops at the very first HAL_Delay() statement. Could you please help me troubleshoot this issue and suggest any possible solutions? Any assistance would be greatly appreciated.Thanks in advance! below the mention function for jump bootloader to application code:static void goto_application(void){ void (*app_reset_handler)(void ) = (void (*) (void))(*(volatile uint32_t *)(0x08006000 + 4)); __disable_irq(); __set_MSP((*(volatile uint32_t *)0x08006000)); __enable_irq(); app_reset_handler(); }
Hello Forum,I have an issue performing continuous conversions with the ADC on my STM Nucleo board. I want to continuously convert once the ADC is initialized and started and do something with the data afterwards (what is irrelevant to the problem). However, for some reason, if I place the HAL_ADC_Start_IT function call outside the while loop the HAL_ADC_ConvCpltCallback function is only called once. I would expect that in continuous mode I don't need to Start the ADC every time I want to make a conversion.Board: STM32 Nucleo F446RESTM32 IDE version: 1.14.0The main:ADC_HandleTypeDef hadc2; UART_HandleTypeDef huart2; /* USER CODE BEGIN PV */ uint16_t adc_val; uint16_t counter = 0; /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_USART2_UART_Init(void); static void MX_ADC2_Init(void); /* USER CODE BEGIN PFP */ /* USER CODE END PF
I have a NUCLEO-G0B1RE board generating 4 PWM signals at 10kHz using TIM1, which is working fine.For my application I also need to be able to read 4-5 PWM signals in - so for now I am trying to read these same signals generated on TIM1 to test the input capture. I am using TIM2 and TIM3 in input capture mode with DMA for this purpose. TIM2 and TIM3 are run from the APB clock at 16MHz, with a prescaler value of 16-1.Looking at the "Live Expressions" in the debugger, the results are *mostly* correct, but it appears that occasionally one of the timers will miss a transition, leading to the measured period being twice what it should be. Am I asking too much of the STM32G0B1RET6 part here, or (more likely) have I done something wrong/overlooked something which would prevent this?I have attached my main.c file below - please let me know if I've missed any important information to help with identifying the issue and I'll update it.Thanks!
Hello, I continue my journey toward build a STM32 hardware emulator for the famous Apple II Disk II. I am implementing UF2 firmware management, USB drag & drag update. the new firmware is not starting, even if I see log of tinyuf2 passing to the appand I do not understand why I put the boot loader (tinyuf2) and I changed :- system_stm32f4xx.c and I add #define USER_VECT_TAB_ADDRESS#define VECT_TAB_OFFSET 0x00010000U I also changed : STM32F411CEUx_FLASH.ld with /* ****************************************************************************** ** ** @file : LinkerScript.ld ** ** @author : Auto-generated by STM32CubeIDE ** ** @brief : Linker script for STM32F411CEUx Device from STM32F4 series ** 512Kbytes FLASH ** 128Kbytes RAM ** ** Set heap size, stack size and stack location according ** to application requirements. ** ** Set memory bank area and size if external memory is used ** ** Target : STMicroelectronics STM32 ** ** Distribut
Dear Community,We're just building up a product with NetXDuo on a STM32H563 having some issues with the Link-Establishment.We use newest CubeMX (6.11.0) with newest Firmware-Package (1.2.0) to generate the init-code and use the same PHY as in the Eval-Board (lan8742).If a link is not available on boot, because auto-neg takes a while the network will never come up. In this case dhcp tries to sent a request again and again and will be blocked at _nx_driver_packet_send because link is not established (nx_stm32_eth_driver.c @757 )As I can follow the code, the NetXDuo IP thread will only call the driver with NX_LINK_ENABLE on the first initialization before the thread-loop ( nx_ip_thread_entry.c @207 ) which will call "_nx_driver_enable" ( nx_stm32_eth_driver.c @494 ).There is only a way to call the NX_LINK_ENABLE again with a call to nx_interface_attach ( which is the wrong way I think as the interface is already attached ).For my opinion "_nx_driver_enable" needs to be called again on a l
Hey community, I am struggling with the setting of the window mode of the COMP1 and COMP2 comparators and a standalone COMP3 comparator of the STM32G0B1CET. The settings are done via the CubeMX .ioc file. The COMP1 gets its INPUT+ and the COMP2 is setup in Window Mode. Each INPUT- is setup via a DAC output. The COMP3 is setup with its own INPUT+ and INPUT- analog pins. Now when the code gets auto generated, the resulting code in main.c is this:/* ... */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_COMP1_Init(); MX_COMP2_Init(); MX_COMP3_Init(); /* ... */ /* Check bitfields */ uint32_t comp_cr = LL_COMP_ReadReg(COMP2, CSR); /* Extract WINMODE */ uint32_t winmode_value = (comp_cr & COMP_CSR_WINMODE) >> COMP_CSR_WINMODE_Pos; bool winmode_correct = winmode_value == 0b1; The problem: After MX_COMP3_Init() finished, the Window Mode of COMP2 gets removed. Solution: Change the order of MX_COMP2_Init
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.