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'm developing firmware on a G0-family device. I've implemented a CDC-ACM device based on one of the USBX sample applications. Windows finds it, enumerates it and I can open it as a COM port. That's all working.Now I want to add a second interface, using a custom class that I'll define myself. I'll start with the DPUMP sample application, as found on the USBX GitHub and whose .h file is found at MyProject/Middlewares/ST/usbx/common/core/inc/ux_device_class_dpump.hIn ux_device_descriptors.h, I need to extend USBD_CompositeClassTypeDef to define a new class type, like this:/* Enum Class Type */typedef enum{CLASS_TYPE_NONE = 0,CLASS_TYPE_HID = 1,CLASS_TYPE_CDC_ACM = 2,CLASS_TYPE_MSC = 3,CLASS_TYPE_CDC_ECM = 4,CLASS_TYPE_DFU = 5,CLASS_TYPE_DPUMP = 6,} USBD_CompositeClassTypeDef;But every time I generate code with CubeMX (I'm using STM32CubeIDE), this change gets overwritten because it's not in a USER CODE section. I've read all the docs I can find but I can't
Hello,I want to try the examples in the package X CUBE USB AUDIO with X CUBE IDE and generate binary file for flashing it via DFU (I don't have ST LINK) .With others projects, I go to : project menu / properties / C/C++ build/ settings / MCU Post build outputs/ and select : Convert to binary file - and click Apply and Close, I do build project and it work.With all the 4 examples of the package, I can't generate the binary file. I have this error in the console : 12:45:37 **** Incremental Build of configuration Debug for project STM32F446E-EVAL_UAC10-ADV ****make allmake: Interrupt/Exception caught (code = 0xc0000005, addr = 0x00007FFA461D24E8)"make all" terminated with exit code 255. Build might be incomplete.12:45:37 Build Finished. 0 errors, 0 warnings. (took 191ms) I'am new to STM32. Did I miss somethink ?My board is STM32F446.STM32 CUBE IDE - Version: 1.14.1 - Build: 20064_20240111_1413 (UTC)
I would like to implement FatFs on my STM32 MCU with SPI Flash, W25Q16JV.Is there a sample code for this? How can I port it ?
Hello,I have implemented 4 wire SPI for my SSD1362 OLED controller. Here are my SPI transfer functions (both normal and DMA) void HAL_SPI_TxCpltCallback(SPI_HandleTypeDef *hspi) { // Deselect when Tx Complete if (hspi == &hspi1) { HAL_GPIO_WritePin(GPIOA, OLED_CS_Pin, GPIO_PIN_SET); } } void SSD1362_SPI_Tx(uint8_t data) { while (!__HAL_SPI_GET_FLAG(&hspi1, SPI_FLAG_TXE)); HAL_SPI_Transmit_DMA(&hspi1, &data, 1); } void SSD1362_SPI_TxBuffer(uint8_t *buffer, uint16_t len) { while (!__HAL_SPI_GET_FLAG(&hspi1, SPI_FLAG_TXE)); HAL_SPI_Transmit_DMA(&hspi1, buffer, len); } void writeCommand(uint8_t byte) { HAL_GPIO_WritePin(GPIOA, OLED_CS_Pin, GPIO_PIN_RESET); // select OLED HAL_GPIO_WritePin(GPIOA, OLED_DC_Pin, GPIO_PIN_RESET); // command SSD1362_SPI_Tx(byte); } void writeData(uint8_t byte) { HAL_GPIO_WritePin(GPIOA, OLED_CS_Pin, GPIO_PIN_RESET); // select OLED HAL_GPIO_WritePin(GPIOA, OLED_DC_Pin, GPIO_PIN_SET); // data SSD1362_SPI_Tx(byte); }
Hello,I have an STM32F407 (Master) communicating with an AHT10 device (Slave) over I2C as one to one. Till this part everything works just fine, the problem start when i add a new device (Slave) in the same bus (eg. MPU6050) after a while the I2C lines locked up (SCL High and SDA Low). As shown in the picture below. Once I power off only the AHT10 Device the lines goes back normal, and if I put it back in the bus, after some times (the period of time it's not synchronised) the problem will appear again. As shown below. At first i thought that the problem within the AHT10 Device and As I mentioned before in one to one connectivity he works just fine. Even tho, the master his the one that he should release the line. Aside from that, I noticed that the I2C not sending the 9th clock pulse to release the I2C lines. As shown below. So, I checked the I2C_ISR register to get the status of the I2C peripheral and I found that the ARLO Bit
Hi, i have build up a basic freertos and lwip setup. I just have one user task running. I start a sntp to get the time and wanted to print the time in that task. But it does not reach there.I get stuck. I'm using the cmsis v2 i recently upgraded the toolset of the IDE.When i switch back to cmsis v1 it works. Any ideas? Thanks
I am running STM32G431 board with USBC PD feature.CubeIDE 1.14.1I am trying to bring up the UCPD stack.I refer the basic guideline:https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_SinkIt worked ideally.However, if I add in my code a call "USBPD_DPM_RequestMessageRequest()", the operation gets broken.Negotiation with Source fails, leading to power loss, and call "USBPD_DPM_RequestMessageRequest()" is not even reached.I tried to search for the solution, but only found this, something probably related:https://community.st.com/t5/stm32-mcus-other-solutions/stm32g0-usb-pd-source-stack-periodically-sends-hard-resets-when/td-p/230775 Is there anybody, who hit the same issue?It is definitely source code issue. Is there a fix? Kind regards, Ivan.
Hello,I am trying to connect b-cams-omv(ov5460) camera module into STM32F746G-DISCO board.However I can not find an official sample code examples.I downloaded FP-AI-VISION1_V3.1.0 SW package from ST web-page. When I unzipped it. it found in Drivers\BSP\Components\ov5640.c, but there is no a sample code example regarding STM32F746G-DISCO board.How can I get help?
Hi,I am using the HAL function "HAL_UARTEx_ReceiveToIdle_DMA" as follows:void HAL_UARTEx_ReceiveToIdle_DMA(UART_HandleTypeDef *huart, uint16_t Size) {//my actionsHAL_UARTEx_ReceiveToIdle_DMA(peripheral, buffer, COMMAND_MAXIMUM_LENGTH);__HAL_DMA_DISABLE_IT(peripheral_dma, DMA_IT_HT);}It always works fine after I power up the MCU. I was continuously sending UART frames from my computer to the MCU for 2 days and it worked fine. The idle interruption was always detected.But when I stop sending frames and then start sending them again (by disconnecting and reconnecting the TX wire), the IDLE interruption is no longer detected… until I turn off and power up the MCU again. Why?
I'm having the same problem with STM32H723ZG, with our own board, Ethernet can only be connected after using ST link to download the code (either by "debug" or "run"). After power cycle the board, it won't connect anymore, reset button didn't help. I tried your change to uncomment out "#define DATA_IN_D2_SRAM" and it didn't help either. Checking LWIP echo servo example, it also has "#define DATA_IN_D2_SRAM" commented out but okay to connect after power up with Nucleo STM32H723ZG Eval board. But running the same example code on our board, it works after download but not after power up. I'm using Hal driver FW1.11.1.. How do you make memory dump using Cube programmer? The ST link utility doesn't work with this H7 chip. Anything else I should check? Thank you.
Hi amazing, Just a simple question.Do you know if exists a library or repo with some example better for communicating with wiznet 7500 p? I have found this.. Should it work inside stm32cubeide?https://github.com/Wiznet/W7500x_StdPeriph_Lib/tree/master Thanks a lot for your help
Hello ST Community,I am currently an intern working as an embedded software developer and I'm facing an issue with the nucleo L476RG and STSAFE A110 expansion board setup.My program couples the two boards and it was working fine until recently. Now, whenever I try to use the StSafeA_GenerateKeyPair function from the API, it returns a StatusCode number 10, 0x0A in hexadecimal, which corresponds to STSAFEA_KEY_NOT_FOUND (0x0AU).This is perplexing because the same setup and the same code were functioning properly just weeks ago. Even when I use the demonstration code provided by the X-CUBE-SAFEA1, it gets stuck at the key generation step and returns the same error (10).I have not made any changes to the hardware or the code since it last worked. I'm wondering if anyone else has experienced a similar issue or if there are any known conditions that could cause this error to occur unexpectedly? Any insights or suggestions would be greatly appreciated.Looking forward to your responses.Best re
Im using stm32h743zi2 microcontroller and , cortext M7 processor , so i need prescalar value and period values of TIM5 for 80milli sec . here im using main clock is 400Mhz and timer bus clock is 200Mhz . please can anyone suggest me a flexible solution. And give me the formulas for calculating the timers prescalar and period.
I want to access MEMS sensor available on STM32U5A9J-DK board for performing some operation. Anyone please guide me how to do that.Thanks and Regards,Suman
We are using a STM32L4Q5AGIx device with Hyperbus PSRAM IS66WVH8M8BLL chip on a custom board. We are having a number of issues getting the RAM to work corectly on Port 2 and right now are isolating it to reading any of the 4 internal registers, ID0, ID1, CR0, CR1. Assuming we can successfully read those registers, we will know our system is configured correctly and communicating properly. Our main clock is 120 MHz. We have setup to run the OSPI at 1MHz to aid debugging.Here is what we observe when we attempt to read ID0;Two Hyperbus commands are seen on the bus. (I would expect only one since we are reading only one register)The first byte of the Command/Address (CA0) is correct, indicating a Read, Register Address Space, and Linear Burst.The following bytes of the Command/Address fluctuate with seemingly spurious values. I would expect these to be all zeros as the ID0 register is at address zero.Looking at the AR register in our ospi->Instance, this should be
Hello, does it exist a demo project where stm32 is interfaced to l9780 chip (lambda sensor chip)?I've not found documentation. RegardsChris
I AM USING STM32H743ZI IN USB_HS IN CONTROLLER BUT WHEN I CONNECT USB CABLE TO CPU IN DEVICE MANAGER IT DISPLY winUSB BUT IN zadig software not install the libusb driver it seen the driver not install so how how to solve this problem suggest me
Hello,I have created and executed a TCP server project with Azure NetX library using Ethernet. Additionally, I need multihome support in this project. I want multiple clients to connect to a device with a static IP. Can you assist me with this?Best regards,Eren Akyol
Hi,I am trying to set up a basic HS USB MSC project on a custom board with an STM32F723.The project is based on these tutorials from ST, the only difference is, that I'm using USB HS and not USB FS.https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/STM32-USB-training.htmlhttps://www.youtube.com/watch?v=GjQqZd1keBo&ab_channel=STMicroelectronicshttps://www.youtube.com/watch?v=Us_sTdGGcOQ&t=363s&ab_channel=ControllersTechI'll shortly show the CubeMX setup and the code changes I made (all like in the tutorials) and then I will show what the error Message is on the Host.Project Setup: Linker Settings: Minimum Heap Size 0x2000 Minimum Stack Size 0x2000Clock Config USB_HS config USB_Device configThis is are all configuration I made. The rest is set to default when you start a new project with the project wizard. The IOC File is also attached to this p
X-NUCLEO-DRP1M1 と NUCLE0-G071RB を持っています。USB 開発には x-cube-tcpp を使用します。ただし、構成ファイル (.ioc) を使用すると、コード生成があることに気付きました。設定ファイル(.ioc)を使用したUSBPD設定ファイル(.ioc)を使用してUSBPD用のソフトウェアを開発することはできますか?サンプルプロジェクトはありますか?
Hello,I have an application that uses the TCPM/TCPC architecture, with a STM32U5 acting as the port manager, and the FUSB307B as the port controller. I want to use the USB-PD middleware stack for the policy engine, however, when looking at the available libraries, there is no USBPDTCPM_PD3_FULL_xxxx.a for the Cortex-M33. Are there any compatible TCPM libraries for the STM32U5? I do not want to use the inbuilt USBPD PHY, and only want/need to use the policy engine and port managing capabilities of the USB-PD library.Thanks
Hi, I am developing a project with an STM32H7 microcontroller, that has to do with ethernet connectivity. More specifically it is an embedded display that runs freeRTOS v2 code, which is being generated automatically from touchGFX. I used the cubemx in order to enable the ethernet peripheral, the LwIP to assign a static IP address to my board, and also I set MPU configurations. After that, when I generate my code, I set a section into the linker script file (lwip_sec) and set the DMA descriptors to run in RAM_D2 also with the RX_pool buffer. I manage to succeed to work with the peripheral I can ping my board correctly, although at a random time it generates a precise hardfault error. So I would like to ask a question about linkerscript. Is there any additional process that it needs to be done in linkerscript (for example, change the length of ram or other things, when a new section is being initialized) in order to avoid the hardfault error, or it isn't related the linkerscript w
I am using a stm32h743zi controller i tray to erase one byte and write one byte BUT HERE PROBLEM SECTOR ERASE NOT A ONE BYTE ERASE PLEASE SUGGESTED MEFLASH_EraseInitTypeDef erase_init={.TypeErase = FLASH_TYPEERASE_SECTORS ,.Sector = FLASH_SECTOR_0,.NbSectors = 1,.Banks = FLASH_BANK_2,.VoltageRange = FLASH_VOLTAGE_RANGE_3}; if (HAL_FLASHEx_Erase(&erase_init,sectorerror) != HAL_OK) {// Handle erase errorwhile (1){// Error handling}}flash_address =0x8100000;// FLASH_Erase_Sector(FLASH_SECTOR_0,FLASH_BANK2_BASE, FLASH_VOLTAGE_RANGE_3);if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, flash_address, ((uint32_t)FlashWord)) == HAL_OK){flash_address = flash_address + 1;}
Hi,i was working in stm32g4 series to implement CORDIC , but i have noticed cordic is taking 6.5 e-05 sec while normal cos/sin function is taking 2.6e-06sec. let me know where I am making mistake.below is code i have implemented.inline int f32_to_q31( double input ){const float Q_31_MAX_F = 1.0f ;// 0x0.FFFFFFp0F;//const float Q_31_MIN_F = -1.0f;return (int)roundf(scalbnf(fmaxf(fminf(input,Q_31_MAX_F),Q_31_MIN_F),31)); } #define pi 3.14159265359// convert notation integar to 32 bits float#define q31_to_f32(x) ldexp((int32_t)x, -31) //q31 represent no in range -1,1 float cordic_q31_cosf(float x){CORDIC_ConfigTypeDef sConfig;int32_t input_q31 = f32_to_q31(fmod(x,2.0f*pi)/(2.0f*pi))<<1;int32_t output_q31;sConfig.Function = CORDIC_FUNCTION_COSINE;sConfig.Precision = CORDIC_PRECISION_6CYCLES;sConfig.Scale = CORDIC_SCALE_0;sConfig.NbWrite = CORDIC_NBWRITE_1;sConfig.NbRead = CORDIC_NBREAD_1;sConfig.InSize = CORDIC_INSIZE_32BITS;sConfig.OutSize
I am having an issue using the STM32F469 processor. Previously using the STM32F407 and STM32F373 I have been able to implement a call to the internal bootloader via address 0x1FFF0000 as suggested in many previous posts. It all works fine and dandy and was a very useful piece of information. However, when trying to use the same method on the STM32F469, which is a close relative to the 407, the call to the internal bootloader just causes a reset. I can enter the bootloader using the external Boot0 pin without problems. Is there a key difference in the ST32F469 bootloader that I need to be aware of?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.