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
I am struggling to get an STM32G070RBT6 into bootload mode with the boot pin.Using ST-Link utility I have set nBOOT1 = 1, NBOOT_SEL = 0 and left nBOOT0 = 1.If I have understood the datasheet correctly this should allow me to enter bootload mode by holding BOOT0 pin high and toggling the reset pin. However the uC jumps straight into the main code.I have disabled serial wire debug as it share BOOT0 pin, but that didn't help.Just as a test I have managed to get the device into bootload mode by setting nBOOT1 = 1, NBOOT_SEL = 1 and nBOOT0 = 0 using ST-Link Utility. I then successfully confirmed I can bootload my code. However this mode of entrance defeats the whole point!Can anybody see what I am doing wrong or share their success with this partThanks Jonathan
Hi everyoneSorry for lazyness, but is there an example how to manage multiple channels of an adc and read from it by dma with low level library?Most usefull I found was made with HAL, but the HAL functions are doing a lot of stuff (in spedial the dma start function), much more as you can do with some simple register access.
STM32F765II uses dual bank mode for firmware upgrade, setting nDBANK=0 and nDBOOT=0,BOOT_ADDR0=0x2000(0x08000000), use ST-LINK Utility。In bare core, my code running correctly. update the firmware in bank1 and bank2 all successfully.When add FreeRTOS 10.2.1 use CubeMX, my code failed in prvStartFirstTask function "svc 0" instruction. when I change the nDBOOT to 1, freertos can correctly run.I checked the SVC_Handler in startup_stm32f765xx.s and FreeRTOS's port.c , they are correct. In debug mode, svc 0 cause reset, but the breakpoint in SVC_Handler cann't reach.I was wondering if it was an issue with the interrupt vector table. Referring to the description in AN2606, in dual boot mode, there should be no need to consider the issue with the interrupt vector table.However, my problem looks like a problem with the interrupt. Has anyone encountered this problem before, thanks!
I'm use USB3320 with STM32H753.And I want to control USB3320 with ULPI operation to boost drive strength.Is there any method? I can't found solution both in HAL API and register.Thanks.
Hi, I have an issue using the HAL in question. I'm trying to write the following 4 characters 'C', 'i', 'a', 'o' to the EEPROM at address 0x0000, but what I observe through the analyzer is that the first character 'C' is being lost.Instead, the read HAL works correctly. Do you have any suggestions for me?Thank you very much!Luca Castelli
Please help pointing to learning material on this.We can unserstnd that below library was written in proper engineering style so that it can be (a) ported to various STM chips. (b) can select use of POLL, Interrupt and DMA mode by "linking/select" the needed "function definition"1. New to these and we worked for some time and still did not got to understand HOW (a) and (b) is performed in practice. If skipping the 'proper' way (tons of Macro, define and ifdef), we can read the sensor with two HAL calls. But we need to learn the proper way :)2. Also, needing to get it right in "project" to link and work together with others code for inside and outside of the STM MCU. Our project is created using RAW STM chip WITHOUT the Board Support Package, like Nucleo. So, we need to deffine the hardware ourself (and still did not got it right)3. We are loss in multiple 'INIT' functions that 'need to be called in corect sequence". Some SOFTWARE setup data structure, i2c HANDLE
Good afternoon. I am configuring a NAND memory using FMC on the STM32H7. I am dealing with the following scenario: HCLK = 80 MHz (to match the example in AN4761) and a NAND memory SkyHigh Memory S34ML01G1 Following all the calculations specified in AN4761, I am encountering an error where the last byte fails on some pages. When a read is performed more than once, the byte is corrected, but there is this inconsistency. Where could the error be?
Hello,I'm developing an application based on the above mentioned NUCLEO board and need a CAN connection to control the board. I've done some embedded development, but this is my first time using an STM board, so please forgive my lack of experience.I've configured the CAN module in CubeMX to use a baudrate of 500kbit/s using value from a tutorial. The code uses the HAL library and using the debugger I can see the transmit function return with HAL_OK. But when i connect my oscilloscope to the TX line I only get a short LOW pulse of ~34µs and no actual data. I'm guessing it might be my lack of understanding the proper (clock) configuration but using different threads I'm now out of ideas. I've attached the CubeMX file below.Thanks for your help.
Hello,I want to generate 6 PWM signals for a 3-phase inverter, with 2 complementary PWM signals per leg, including dead-time. Is there an example or a starting point for this using the NUCLEO-G491RE?Thanks for any help.
Hello, I use STM32 for years, and on a new board I use for the first time a F3 series : STM32F302REI use exactly the same schematic as all my previous board, and for the BOOT0 pin, I have a 2.2K pull-up pull-down, and a jumper to set the pin to 3.3V when I need to reflash it through UART1 with internal system bootloader. On this project I don't use this jumper because I use an stlink/V2 cable to flash.On a board I work on, after some days with everything fine, with no reason the board stopped working. Read/write flash was OK but impossible to boot. I finally checked the BOOT0 pin, and found 1.6V on the pin, even with the 2.2K pull-down resistor ! Thus the BOOT0 pin now leaks ~700µA of current !!! If I short the pin directly to the ground, the chip boot normally, but this behavior is not normal, I never see that in 8 years I use STM32. What happened to this BOOT0 pin !?Also, I worked on a second board, and some hours later I had the same problem.It worry me a lot, because after producti
I'm working with USB_PD through a nucleo sink and a G474ER and want am receiving the ACK/Good CRC messages that are started from the laptop side (DIscover identit, discover SVID, Discover Mod, Enter Mode, dp status, dp config), but am unable to get the sendAttention VDM function to send the attention message to the laptop so that it can return the Good CRC to recognize that a hotplug device is connected. Anyone have any tips? I have used this (https://github.com/STMicroelectronics/STM32CubeG4/tree/master/Projects/STM32G474E-EVAL) as a basis, but even following the same methods I am unable to get the send attention to actually send a message even though while debugging the sendAttention function gets hit.
Hardware:NUCLEO-F446RE, X-NUCLEO-CCA01M1, X-NUCLEO-CCA02M2Software:Downloaded from STM: V1.2.0 and V1.1.0Github: V1.2.0 Hi, I am attempting to get sound output from the sound terminal expansion board CCA01M1 with no luck. I managed to follow UM1979 "UM1979-started-with-sound-terminal-expansion-board" Rev 2, and got audio output from the internal memory prior to starting UM2824 "getting-started-with-the-STM32-function-pack-for-acoustic-echo-cancellation". I have reconfigured the bridges as per UM2824, section 2.3.1 (Steps 1 through 3)I am running the power to the CN2.VCC connector from CN6.5 "5V". Nothing connected to CN2.GND.I can get input to audacity and play it back through my laptops speakers, however, the quick start guide does mention that you should actually get 2 tracks recorded back. An unedited track and then a track with noise cancellation. This is not happening. UM2824 step 2.3.2 only shows a mono recording 'like what I have' but also mention
Hello,I'm trying to get USBX CDC Virtual COM Device configured on an STM32U535CET6. I have downloaded and tried to play matchup with the projects out on GitHub for the U5 series but have had no success. I'm currently stuck on: /* Now check for invalid queue ID. */ else if (queue_ptr -> tx_queue_id != TX_QUEUE_ID) { /* Queue pointer is invalid, return appropriate error code. */ status = TX_QUEUE_ERROR; } queue_ptr -> tx_queue_id is empty but I can't find where it's supposed to be initialized. The project is barebones, I'm just trying to get CDC to work so I can write out to a terminal like Putty. I have also gone through the H7 tutorial with no luck. It has to be something I missed but can't find it.Going through the steps for the H7 that I found on YouTube, the U5 doesn't seem to have these methods: HAL_PCDEx_SetRxFiFo(&hpcd_USB_DRD_FS, 0x80); HAL_PCDEx_SetTxFiFo(&hpcd_USB_DRD_FS, 0, USBD_MAX_EP0_SIZE / 4); HA
I am running the "Ux_Device_HID_CDC_ACM" example project on a NUCLEO-H563ZI board.The example runs without issues, i can attach and remove the usb cable and the mouse connection appears and disappear.The issue is that the USB-stack does not seem to detect that the usb-cable is removed. When I hit the button to move the mouse pointer when the cable is removed the mouse movements que up in the stack and when i attach the cable again the mouse pointer moves the queued movements. This also happen in VCP part of the example. Messages queue up and are transmitted when the cable is attached again.This is not ok. My real system needs to know when the cable is removed so that actions do not queue up in the stack.The actual cable disconnection is not the problem, i can think of several ways to detect this. The question:How do I bring down the USB stack in a proper way so that messages are not queued up in the stack?
Hello, I am now try to do a BLDC motor driver with STM32G474. I used the tim1 to get the 3 channel PWM and PWMN to drive the 3 full bridge with 6 step solution. the problem is, I referred someone's code. the code is like below: // Bridge FETs for Motor Phase U if(BH1) { HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1); HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1); } else { HAL_TIM_PWM_Stop(&htim1, TIM_CHANNEL_1); if(BL1) { TIM_SelectOCxM(&htim1, TIM_CHANNEL_1, TIM_ForcedAction_Active); HAL_TIMEx_PWMN_Start(&htim1, TIM_CHANNEL_1); } else { HAL_TIMEx_PWMN_Stop(&htim1, TIM_CHANNEL_1); } } when I compiled the code. the error is, no TIM_SelectOCxM() function. I think it is not a HAL lib function. so if I want to do the same thing as TIM_SelectOCxM(), how should I do with HAL lib? please reply, thanks! @
Hello, I'm trying to implement a Power Delivery charger and communicator with a tablet using the STUSB1602 of the P-NUCLEO-USB002 with STM32F072RB MCU. I've looked everywhere, and it seems the STSW-STUSB010 library is no longer available, fortunately I've found this GitHub with projects that can be implemented in order to use the Nucleo with. The problem is when I compile the STM32F072_MB1303_SRC_ONLY or any other projects included in the files, there are errors in the builds and I don't know how to correct them. So is there any other way to configure the P-NUCLEO-USB002 with STM32F072RB MCU? Because my goal is to make it work and then be able to modify the code in order to make the P-NUCLEO-USB002 work with a NUCLEO-G0B1RE. Edit: After looking more in detail, it looks to be an issue with the files' pathway, I've changed them, it got rid of some errors but new one appeared. The console says there is no such or such files existing in those include (can
Hello,I am using the SDMMC1 interface with DMA and FATFS and write data to an SD card. When starting my application with inserted SD card, everything works as expected (reliably and fast). I use FreeRTOS.When ejecting the SD card during runtime, and re-inserting it, writing succeeds for 2-6 times, but stops working eventually, even after multiple re-initialisations and wait times. The only thing which works is to reset the whole MCU.Here is what I do:Before writing, I check the status of the SD card with HAL_SD_GetCardState():/* * Purpose: * Waiting for the SD card to process requests */ fenrirStatus_t SD1_WaitForSDInterface(){ // Check current SD card state HAL_SD_CardStateTypeDef sdState = HAL_SD_GetCardState(&hsd1); if(sdState == HAL_SD_CARD_PROGRAMMING) { // If state is currently in programming, wait for max 1 second uint16_t startWait = osKernelGetTickCount(); while((osKernelGetTickCount() - startWait) < 1000 && sdState == HAL_SD_CARD_PROGRAMMING){
Microsoft's netxduo is at version 6.3.0 released 23rd October 2023 see https://github.com/azure-rtos/netxduo/releases/tag/v6.3.0_rel The STM32H7 netxduo is at 6.2.0, committed on 5th April 2023 https://github.com/STMicroelectronics/x-cube-azrtos-H7/tags I am chasing an issue https://github.com/azure-rtos/netxduo/issues/177 where Microsoft has suggested upgrading to netxduo 6.3.0. Note the same code when run on a Renesas RX72N runs fine.Some of the other available packs are nearly 18 months old.The F4 pack was committed on 13th July 2022 https://github.com/STMicroelectronics/x-cube-azrtos-f4/tags The F7 pack was committed on 2nd July 2022 https://github.com/STMicroelectronics/x-cube-azrtos-f7/tags
Hi everyone, I’m working on a project using FreeRTOS 10.4.6 in combination with STM32CubeMX 6.11.0 and TouchGFX on an STM32H562 microcontroller. I’ve encountered an issue where the xQueueReceive and xSemaphoreTake (or using the API osMessageQueueGet and osSemaphoreAcquire) functions do not reach their specified timeouts, regardless of the value passed. Every timeout valueother than 0 behaves like portMAX_DELAY and waits indifinetely. However, a xSemaphoreGive or a xQueueSend called from another task will works and wake up the current blocked task. This behavior only occurs in release builds with higher GCC optimization levels (-O2, -O3, and -Os). In debug builds or when using lower optimization levels (-O0 or -O1), the functions behave as expected and return after the timeout. System Info: FreeRTOS version: 10.4.6 STM32CubeMX: 6.11.0 MCU: STM32H562 Additional: TouchGFX i
I use ThreadX (in addition to other X series middlewares) on nearly all of my projects. I have been in the habit of adding calls to _tx_thread_context_save/restore in all interrupt handlers inside stm32<xx>xx_it.c, per the guidance in ThreadX documentation.Today I was reworking an old project and pulled up the assembly for _tx_thread_context_save to see a note that states:/* DESCRIPTION *//* *//* This function is not needed for Cortex-M. */Referencing https://community.st.com/t5/stm32-mcus/part-1-how-to-create-a-threadx-low-power-project-from-scratch/ta-p/571446, I see no step outlined to add the calls for context save/restore. I've read various Issues on the official ThreadX github account and the old Microsoft Azure ThreadX Q&A board that go back and forth on whether these calls are necessary or recommended (https://github.com/eclipse-threadx/threadx/issues/381 , https://learn.microsoft.com/en-us/answers/questions/994826/azure-rtos-execution-profile-kit-with-
I'm trying to communicate with a SanDisk Ultra 16GB microSD HC card (mounted with this) using a NUCLEOf411RE board, SDIO and FATFS. I've been trying to follow this post as a guideline, and I keep running into an issue in f_mkfs where it constantly returns F_NOT_READY. I've slightly modified the code per some commentors suggestions in the original post, but still haven't had any luck. /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * *********************************************************************
I have enabled hardware checksum in STM32F427 it works fine for all packet except when it deals with fragmented packet. In wireshark I see checksum error for fragmented UDP packet and it maybe caused by "UDP checksum offload".In reference manual of STM32F427/29, it was mentioned that Fragmented IP frames (IPv4 or IPv6), IP frames with security features (such as an authentication header or encapsulated security payload), and IPv6 frames with routing headers are bypassed and not processed by the checksum.Any solution for fragmented packet?
Issue: Receiving NACK During STM32G0B1KEU6 Page Erase over I²C in Bootloader ModeContext:I am working with an STM32G0B1KEU6 microcontroller in bootloader mode over I²C and attempting to perform a flash page erase. The erase command is consistently receiving a NACK (negative acknowledgment) from the bootloader.Page Erase Command:Sent the page erase command (0x45), followed by the number of pages to erase (N - 1) and the page numbers.Observed Behavior:I receive an ACK after page erase command and number of pages command, but when I send the erase command the bootloader responds with a NACK.The flash is not busy but the erase still fails to proceed. Example 1: Erase Pages 1 and 2Page Erase Command (0x45):Command sent: 0x45 0xBA (0x45 is the erase command, and 0xBA is the checksum)Result: ACK receivedNumber of Pages (N - 1):Sent: 0x00 0x01 0x01 (Erase 1 + 1 pages, followed by the checksum 0x01)Result: ACK receivedPage Numbers:Sent: 0x00 0x01 0x00 0x02 0x03 (Erase page 1 and page 2, fo
Can you see the glaring bug, or is it? I left a clue *** some fail returns do not unlock HAL HAL_StatusTypeDef HAL_I2C_Mem_Write(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size, uint32_t Timeout) { uint32_t tickstart; /* Check the parameters */ assert_param(IS_I2C_MEMADD_SIZE(MemAddSize)); if (hi2c->State == HAL_I2C_STATE_READY) { if ((pData == NULL) || (Size == 0U)) { hi2c->ErrorCode = HAL_I2C_ERROR_INVALID_PARAM; return HAL_ERROR; } /* Process Locked ***/ __HAL_LOCK(hi2c); /* Init tickstart for timeout management*/ tickstart = HAL_GetTick(); if (I2C_WaitOnFlagUntilTimeout(hi2c, I2C_FLAG_BUSY, SET, I2C_TIMEOUT_BUSY, tickstart) != HAL_OK) { return HAL_ERROR; } hi2c->State = HAL_I2C_STATE_BUSY_TX; hi2c->Mode = HAL_I2C_MODE_MEM; hi2c->ErrorCode = HAL_I2C_ERROR_NONE; /* Prepare transfer parameters */ hi2c->pBuffPtr = pData; hi2c->XferCount = Size; hi
Dear forum, greetings.I need a recommendation with my Lwip stack project.First of all, I would mention that I have successfully installed lwip stack with freertos on h723 nucleo board and I can get ping.My project scenario is;There are multiple nodes on a network and each with a different fixed ip address. Each node in the network listen incoming packet requests from the PC. Whenever request packet income to the ip address matching node, then it will respond immediately. Unmatched ip address boards will stay Idle state.My question is;I just want to release separate semaphores or set user flags as soon as the data packet matching the ip address comes from the pc, and as soon as I send a reply back to the pc.Where is the right place to put these flags or semaphores for this in the LWIP stack?My main aim is to change or read the register of the PHY just before and just after the node with the matching ip address sends a response to the pc.I tried to add these In the RX and TX callback fun
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.