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
Hello everyone,I’m working on a project with the STM32H503 microcontroller and need to implement USB Type-C connection detection using FreeRTOS. Specifically,I have come across several examples that utilize Azure RTOS ThreadX environment with nucleo STM32H503 , but I have some question in my mind ,I'm using RTOS already with my application now I want to add USB support also so azure RTOS stack will not work with my FreeRTOS, but I’m looking for guidance on how to implement this using FreeRTOS. Is it possible to manage USB Type-C detection with FreeRTOS?If so, what would be the best approach to start?Are there any libraries or resources recommend that can assist with USB Type-C implementation in a FreeRTOS environment?Any insights or examples would be greatly appreciated!Thank you!
Hi,I'm working on the project using STM32H723 with an external flash (GFX02Z1), I'm moving the application code to that 8MB external flash on GFX02Z1, I saw the guidence mentioned that only read access after memory mapped enabled?The reason I asked is that we will need to support firmware upgrade, so we may need to conside other solution if not have the write access after memory mapped mode enabled.Please help to confirm, thanks. Best Regards,James Shih
Suppose I define a global array called DATA in a .c file for an STM32F103 like so:#include ... uint32_t DATA[0x1000] = { // data goes here }; int main(){ // main }Questions.0) Where does DATA get stored? Flash or SRAM? Or somewhere else? (Is there somewhere else?)1) If it's stored in SRAM does that mean that SRAM is persistent storage?2) How can I control where it is stored? Eg. how can I store it at position 0x08004000 in Flash or at position 0x20004000 is SRAM?
Hi, I'm working on a bootloader for a board using the STM32H750IB (the Electro-Smith Daisy Seed), and have a few questions about what all needs to be done before jumping to the main image.The main image (a flat '.bin' file) is stored in a QSPI flash chip, which is copied to the main SRAM at 0x24000000.In looking at various other ARM Cortex M7 bootloaders, it seems like most of them are NOT setting the SCB->VTOR register. But from what I otherwise read, it should be set. But then I was also seeing some mentions that it should be copied to address 0x0, and/or that there may be an offset.Here's the current code, it seems to work by just setting the SCB->VTOR to the base SRAM address, but is this correct? Also, I saw conflicting info on whether interrupts should be disabled or must not be disabled.And what about the Watchdog timer? I don't think it's being used.And anything else that needs to be done? It _seems_ to be working, but
Hello,I'm debugging the following piece of code that is executed as part of the fault handler:currentExceptionData.data.CFSR = SCB->CFSR;currentExceptionData.data.HFSR = SCB->HFSR;currentExceptionData.data.DFSR = SCB->DFSR; //TODO: Not copied correctly!currentExceptionData.data.MMFAR = SCB->MMFAR; //TODO: Not copied correctly!currentExceptionData.data.BFAR = SCB->BFAR; //TODO: Not copied correctly!The target CPU is STM32L4P5, the code is built using IAR studio. In order to get io the fault handler, I execute an erroneous code that fires the Usage Fault.I am able to read (via the code) correctly the CSFR and HFSR values only. The DFSR is read as 0, the MMFAR and BFAR registers are read as their addresses. I compare these values to the register values read by debugger.The underlying assembly code is:currentExceptionData.data.DFSR = SCB->DFSR; //TODO: Not copied correctly! was 00000002 then 000000030x805'839e: 0xf10d 0x0015 ADD.W R0, SP, #21 ; 0x150x805'83a2: 0x4910 LDR.
Hi guysI made a project with CubeMX for a STM32F334. This project built fine already multiplet times.Now, I get suddenly this error message:#error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"As I said, the project was built fine most times, and in the SystemInit function in system_stm32f3xx.c, there is the fpu present check. I do not see any reason why this message comes up.As I looked for an explanation, I found someone whith this problem, and it seemed to be about wrong including order. If this is a reason: How can I ensure the right order?I already regenerated the code by CubeMX multiple times. If I accidently removed an include file or did other things wrong, I assumed that this will fix the problem, but it does not. Does anyone have any other ideas how to solve?Best regards
Hi,I am debugging an issue with infrequently occurring Ethernet RBU's in my own Stm32H723 application and decided to check the official Stm32 ethernet examples to see if they were having the same issue. I imported the Stm32H723 LwIP_HTTP_Server_Socket_RTOS example and deployed it to my Stm32H723 Nucleo. I placed a breakpoint at HAL_ETH_ErrorCallback at line 565 where the rx sema is released if an rbu occurs. Sure enough, I am seeing RBUs consistently, although the application "works". ST, surely this example should never be seeing an RBU? I am guessing there is a bug in the ethernet MAC drivers which is also affecting my application, but I'm still trying to understand how the MAC IP block works, so I haven't fully arrived at a reason myself yet. Given the descriptors should be being serviced very quickly by the application in this example, I have a hard time believing that any packets should be lost.
I have setup my STM32 MCU to be a USB Device with OTG FS and when I list the details of the device on my computer, I can see that the USB endpoint used for data transfer is of type Bulk. It works perfectly fine, when I use the function `CDC_Transmit_FS` to transfer strings I can receive them on my computer. But I would like to change the endpoint type to be Interrupt instead of Bulk and I cannot figure where is the code or where in the GUI of STM32CubeIDE am I suppose to do this.
Hi all,We are currently using the stm32h5-hal-library in our project. Our preference is to use the LL drivers rather than the HAL and for the Octospi, we only see a HAL drive for it (stm32h5xx_hal_xspi.c). Is there a LL driver equivalent for this? I have also tried generating the code with STM32CubeIDE and didn't see an option to switch to the LL driver as I normally would for other peripherals Thanks in advance.
I am using internal Temperature Sensor stm32h743zit6 , i notice that when i connect power some time after that it stable temperature approximately 46 degree or 47 degree, after i start streaming it came temperature also stable on this 46 degree or 47 degree temperature ,so when i work or not work continues but i give continues power always stable it give stable temperature after some time 46 degree or 47 ..but when i heat external 50 degree Celsius then it came internal Temperature 51 degree Celsius , again i heat external 60 degree Celsius then it came internal Temperature 58 degree Celsius so can you tell me behavior of internal Temperature Sensor stm32h743zit6!!!!!!!!so it is true that if i work or not but it give continues power supply than after some time it will always stable 46 or 47 degree Celsius and if i do external heat it will increase according to external heat provide if it true than explain
Hi, I am trying to use a Nucleo-H745ZIQ to implement the USB CDC HOST functionality over the USB OTG FS port. I succeeded to do it and make it work if the device connected to my board is another STM32 board which is configured as an usb device, and the communication works alright.The problem comes when I try to do the same with a modem. The modem has 1 configuration, and 4 interfaces. I increased the USBH_MAX_NUM_INTERFACES to match that and forced it to choose the CDC class from the device which is the Third interface and his CDC data class interface the fourth.The problem is that it cannot get past the HOST_CLASS_REQUEST state on the state machine because I'm getting this result: CDC: Device Get Line Coding configuration failed. Does somebody knows which could be the problem?The sections of code I've changed so far if anyone is interested to check:Inside usbh_core.c:Changed ltf_desc[0] for [2] because the interface I want to use is the third, cause its CDC.if (phost->pCl
Hi!when I run the HAL example code LwIP_HTTP_Server_Netconn_RTOS I get HAL_ETH_ErrorCallback() called on every packet, but the program seems to work fine.its this bit that gets called (so something hapenning with DMA)if((HAL_ETH_GetDMAError(heth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU){ osSemaphoreRelease(RxPktSemaphore);}I've read as much as is humanly possible on this and other forums to see if this is normal or what the issue could be, but I have found nothing.I've played around with using different LwIP & Ethernet buffer sizes etc, and different memory sections/protection options etc, but it wont go away, yet the program still runs fine.Can anyone explain what is going on please.the code I'm using is inSTM32Cube_FW_H7_V1.11.2\Projects\NUCLEO-H723ZG\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOSthanks all,Mark
I am trying to implement MODBUS-TCP on a TouchGFX generated project. I have successfully enabled Ethernet by following this tutorial on this forum: How to create a project for STM32H7 with Ethernet and LwIP stack working and can ping my board.In the tutorial mentioned above CMSIS_V1 is used, but for the MODBUS library which I want to use CMSIS_V2 is required ( Modbus-STM32-HAL-FreeRTOS ).Now if I simply change CMSIS to V2, i get the error: make: *** No rule to make target '.../Ethernet_Test_TGFX/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c', needed by 'Middlewares/FreeRTOS/cmsis_os.o'. Stop. Is this caused by dependencies not being updated properly or how can I solve this? I already tried Refresh+Clean..ioc file is attached.Thanks!
I inherited an old STM32 project (STM32F373) that uses FreeRTOS and the old Standard Peripheral Library (apparently v1.0.0, dated Sept 20, 2012). Among other things, the project uses USART1 with interrupts to receive LIN messages, and also has a task that runs every 10ms to check the status of input signals (buttons) and writes 3 words to the last flash page if one of them is pressed.In the scenario where there is a lot of traffic on the LIN bus (essentially no time gaps between messages) and the button is pressed, the code repeatedly calls the USART1 ISR and nothing else can run.I have not been able to determine why the ISR keeps getting called; I have handlers in it for each of the interrupts I have enabled, and examining the USART1 registers in debug mode did not reveal anything. That led me to consider other problems, which led to the flash operation, and I discovered the Standard Peripheral Library flash functions have blocking delays in them; if I comment out the flash operations
Hi all, We have an STM32H735VGH6 on a custom board with a LAN8742a PHY chip to allow ethernet communication. This custom board is minimally tested so it's possible that there's a hardware issue though I'm uncertain where the issue would be. I generated the MCU project using STM32CubeMX (ver 6.12.0) and have been running it with STM32CubeIDE (version 1.16.0). In all versions that I'm running, the MPU is setting all 4GB of space to be non-cacheable. After a lot of playing around with it, I have been able to get communication to work (basic ARP announcement and ICMP responses) but only in two conditions: 1. If I regenerated the MX project but with the D-Cache enabled under "Cortex Interface Settings" (the MPU is still set up with cache disabled). Then running that build (which doesn't work). Then, without powering down, re-generating the build with D-Cache disabled. Running after that would allow the STM32 to respond to incoming packets.&
Hello ,I am using STM32H750B(host) device and STM32H743ZI as target board . I am using spi2 from host side and spi1 for target board, after putting my target board in boot mode i am running application from my host device , i can able to see on logic analyzer that synchonization byte(0x5A) is being send followed by dummy byte(0x00).But i am not able to get any ACK or NACK.I am using the spi bootloader from here https://github.com/glegrain/STM32-SPI-Bootloader-hostI have kept these settings for SPI.
Hello all I'm trying to write to the flash memory on an STM32F746 discovery board. This is the code so far, just a test to write a single word.. #define FLASH_USER_START_ADDR 0x080c0000 int Flash_Write(void) { HAL_StatusTypeDef status; uint32_t address = FLASH_USER_START_ADDR; // Start address for writing // 1. Unlock the Flash memory HAL_FLASH_Unlock(); printf("memory unlocked\n"); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR ); //| FLASH_FLAG_PGSERR ); FLASH_Erase_Sector(FLASH_SECTOR_7, VOLTAGE_RANGE_3); // 2. Erase the required flash sector FLASH_EraseInitTypeDef eraseInitStruct; uint32_t sectorError = 0; eraseInitStruct.TypeErase = FLASH_TYPEERASE_SECTORS; eraseInitStruct.VoltageRange = FLASH_VOLTAGE_RANGE_3; // Voltage range 2.7 to 3.6V eraseInitStruct.Sector = 7; // Change sector as per the location eraseInitStruct.NbSectors = 1; // Erasing 1 sector printf("erasing .\n"); status = HAL_FL
I am trying to establish communication between two Nucleo boards (STM32G431RB as master and Nucleo F446RE as slave). I used the example codes from the STM32 GitHub page (NUCLEO-G431RB/Examples/SPI/SPI_FullDuplex_ComPolling_Master and STM32F411RE-Nucleo/Examples_MIX/SPI/SPI_FullDuplex_ComPolling). I made some changes to the slave code, including GPIO settings, but the communication still doesn't work. I chose NSS as [ hspi1.Init.NSS = SPI_NSS_SOFT; ]. The codes also include LED configurations as mentioned in the README files, which indicate an error based on the LED status.I know I have an error acording to led 2 but I don't know the problem. LED2 toggles slowly when there is a timeout or an error in transmission/reception process.
Hello everyone, i am trying to configure one STM32H723 as TCP Client and another as TCP Server. I am very new to networking. I used the example project in this github link and didnt change anything except IP addresses and MAC addresses https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/tree/main/STM32H723_Nucleo_ETH.I am having problem in the client side TCP_Connect function. The function calls ip_route function and this function returns -4(Routing Problems). While debugging i saw that my device doesnt get into this loop inside ip4_route function which i believe indicates i dont have any network interfaces. NETIF_FOREACH(netif) { /* is the netif up, does it have a link and a valid address? */ if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { /* network mask matches? */ if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { /* return netif on which to forward IP packet */ return netif
I am using open source lwip ethernet connection code and I am cehcking wireshark if i lose any connection. TCP ECHO parts are my true outputs but i was wondering if ARP parts means that my connection is lost and I reconnect or is it just checking gateway only. I try to stable my connection and dont want to disconnect. So what does arp broadcasts really means in that situation?Wireshark Test ss
Hi all,Has anyone been successful in creating their own custom PCB with an STM32 and the LAN8742 PHY IC?I have followed the reference design of the nucleo-f756zg Lan8742 implementation and used a stm32f107 IC.I am struggling to understand how to use the lan8742.c driver with the Ethernetif.c file generated by LWIP in the cubeIDEIf anyone could talk me through initialisation and beyond or show a design with code where they have it working it would be much appreciated!Thanks,Joe
Hello I am Working with EC200U & STM32F411CEU6. I want to uplode code using AWS/cloud or hostinger on my embedded device.I tryed working with AWS S3 But I Did not Undestand How it worksAre there any way by which I can do this, if yes please help with step by step guide.
stm32L476VC + CubeMX + IAR + X-CUBE-CRYPTOLIB STM32CubeExpansion_Crypto_V4.2.0 i copy the example from "NUCLEO-L476RG\Applications\ECC\EDDSA_SignVerify" to my project, cmox_eddsa_sign will cause HardFault:The processor has escalated a configurable-priority exception to HardFault.A precise data access error has occurred (CFSR.PRECISERR, BFAR)At data address 0x58024c00.An imprecise data access error has occurred (CFSR.IMPRECISERR, BFAR)At data address 0x58024c00.Exception occurred at PC = 0x800901e, LR = 0x20002cc4 call stack:HardFault_Handler()<Exception frame>[cmox_md_generateTag + 0x51] other api work well (cmox_rsa_pkcs1v15_verify, cmox_ecdsa_sign ...)
CubeMX generated project defines #define LWIP_RAND() ((u32_t)rand()) which fails with the following call stack...and the following assert textassertion "REENT malloc succeeded" failed: file "/build/gnu-tools-for-stm32_12.3.rel1.20240612-1315/src/newlib/newlib/libc/stdlib/rand.c", line 82Line 82 of rand.c is: _REENT_CHECK_RAND48(reent); which in turn ends up calling a malloc... I've read that reentrancy in newlib could cause problems, but I thought it would be memory corruption.Is there a solution for this?Thanks in advance!
Hi all, on stm32f746 disco, I'm using the Mbed ide but i have the stmcube installed as wellI've been writing a simple updater app that sits at 0x080e0000 with mixed success switching to a previous project, the code downloads but on running the board appears to run the updater code instead. How can I fix this? I've added an mbed_app.json to both projects with "target.mbed_app_start": "0x08000000"in it for the main app and 0x080e0000 in the updater I'm unable to get my main app running again I think the easiest way would be if I can just reset the device to factory?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.