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 using the example for ModbusF429TCP from a GitHub repo for Modbus and get the following error: undefined reference to 'netconn_set_sendtimeout' I'm unfortunately still very new to STM32 and that's why I'm slightly overwhelmed nowGitHub repo is Modbus-STM32-HAL-FreeRTOS/Examples/ModbusF429TCP at master · alejoseb/Modbus-STM32-HAL-FreeRTOS · GitHub
Dear all ! I in my project have 1 led was blink to know CPU still working, display TFT LCD ST7735. At the first time, led blinking as timer 3 interrupt, LCD can display all information. after i add ADC with DMA continuous mode, CPU hang, led didn't blink, LCD didn't display, i don't what happen. i try to replace new IC but can't fix. pls help me
I am configuring USBD to turn the STM32F4 Discovery into a headphone, meaning it can play music through USB and transmit data from the PDM microphone to the computer. I have completed the music playback part, but I am now working on the recording part and don't know how to configure USBD audio. Can you help me? #ifndef USE_USBD_COMPOSITE/* USB AUDIO device Configuration Descriptor */__ALIGN_BEGIN static uint8_t USBD_AUDIO_CfgDesc[USB_AUDIO_CONFIG_DESC_SIZ] __ALIGN_END ={/* Configuration 1 */0x09, /* bLength */USB_DESC_TYPE_CONFIGURATION, /* bDescriptorType */LOBYTE(USB_AUDIO_CONFIG_DESC_SIZ), /* wTotalLength */HIBYTE(USB_AUDIO_CONFIG_DESC_SIZ),0x02, /* bNumInterfaces */0x01, /* bConfigurationValue */0x00, /* iConfiguration */#if (USBD_SELF_POWERED == 1U)0xC0, /* bmAttributes: Bus Powered according to user configuration */#else0x80, /* bmAttributes: Bus Powered according to user configuration */#endif /* USBD_SELF_POWERED */USBD_MAX_POWER, /* MaxPower (mA) *//* 09 byte*//* USB Spea
Hi everyone,I’m working on an STM32C0 setup where TIM1 CH1 (Pin A) and UART RX (Pin B) are physically shorted together, and I’ve encountered some unexpected interrupt behavior. Specifically, the UART RXNE interrupt always triggers before the TIM1 Capture Compare (CC) interrupt when the UART receives a byte 0x00.Setup Details:TIM1 Configuration:TIM1 CH1 is configured for Input Capture on the rising edge.IRQ priority is set to 0 (highest priority).Rising edge detection, no prescaler, no filter.UART Configuration:UART RX is enabled with the RXNE IRQ to handle incoming data.IRQ priority is set to 1.Goal:The goal is to establish precise timing for sensor data communication:The UART master sends data at a known timestamp (master clock).The STM32 UART slave:Uses TIM1 Input Capture to record the timestamp of the rising edge (TIM1 capture value).Handles the UART RXNE IRQ to read the incoming data.Compares the TIM1 capture timestamp with the current TIM1_CNT value to calculate the time differenc
I am using the STM32H7B3I-DK for my project. I am trying to integrate uSD card usage with a touchgfx program. I have gotten a simple write to a file working on a non rtos project; however, when I use it in my project with RTOS I keep getting a hard fault. I had to make the SDMMC have a clock divider of 2 to get it to work on non-rtos. Are there some conflicts with FreeRTOS that I need to be considering?Here is the code I am using in both: FRESULT res; /* FatFs function common result code */ UINT byteswritten, bytesread; /* File write/read counts */ uint8_t wtext[] = "STM32 FATFS works great!"; /* File write buffer */ uint8_t rtext[_MAX_SS];/* File read buffer */ [...] BYTE work[4096]; // Work area for formatting /* USER CODE BEGIN 5 */ printf("Starting\r\n"); if(f_mount(&SDFatFS, (TCHAR const*)SDPath, 1) != FR_OK) { printf("Failed to mount -- Formatting\r\n"); if (f_mkfs(SDPath, FM_FAT32, 0, work, sizeof(work)) != FR_OK) { printf("Failed to format SD ca
I have followed How to create a file system on a SD card using STM32CubeIDE the best I can using the STM32H7B3I-DK. With this board I do not see the DMA tab under SDMMC1, so I have skipped that. I am failing the f_mount(). I am using a touchGFX project and a 128GB microSD card. The failure occurs while calling fmount(). I have debugged and got the following stack: HardFault_Handler() at stm32h7xx_it.c:93 0x8007d6e <signal handler called>() at 0xfffffff1 memcpy() at 0x8036658 prvCopyDataToQueue() at queue.c:2,102 0x8020a04 xQueueGenericSendFromISR() at queue.c:995 0x80202d4 osMessageQueuePut() at cmsis_os2.c:1,766 0x801ef94 touchgfx::OSWrappers::signalVSync() at OSWrappers.cpp:95 0x8002de2 HAL_LTDC_LineEventCallback() at TouchGFXGeneratedHAL.cpp:196 0x8005a2e HAL_LTDC_IRQHandler() at stm32h7xx_hal_ltdc.c:713 0x8011446 LTDC_IRQHandler() at stm32h7xx_it.c:233 0x8007df2 <signal handler called>() at 0xffffffed SDMMC_GetCmdResp1() at stm32h7xx_ll_sd
Hello.I have a TIM3 configured to generate a PWM signal with frequency 1 MHz and duration 200 ns using CC1 channel. TIM3 also generates a DMA request on CC1.DMA1 is configured to transfer value 0xFFFF from AXI SRAM to SPI2_TXDR register, triggering transfer from TIM3_CH1.The problem is that there is a delay of 70 ns between the end of the PWM signal and the CLK signal of SPI2. Here's the image illustrating it.Yellow channel is TIM3 PWM signal. Blue channel is SPI_CLK signal. DMA transfer is triggered on TIM_CH1 (at the moment of the falling edge of the yellow signal). As you can see there's a delay of 70 ns, which is a lot and not acceptable in my application.Does anyone know the reason for this delay?MCU: STM32H743, revision VSystem clock: 480 MHzAHB, APBs clocks: 240 MHzSPI clock: 80 MHz DMA1 configuration: // Disable stream DMA1_Stream1->CR &= ~DMA_SxCR_EN; // DMA is the flow controller DMA1_Stream1->CR &= ~DMA_SxCR_PFCTRL; // Directi
Hi,i am developing an embedded software based on the TCP Client example for CubeMX. During tests with large number of packets I have got an hard fault error. It seems that it happens on a re-transmit. The hard fault can be easy reproduced with original code. For this the right IP address must be set. Also the packet count should be increased to have time to remove the LAN cable while running. The Project was setup like this: My only modification:#define TCP_SERVER_ADDRESS IP_ADDRESS(192, 168, 0, 213)#define MAX_PACKET_COUNT 10000 Here a screenshot:It seems that a pointer gets damaged as the address 0xF338000 makes no sense. Best regards,Roman Thiel
Hi folks,I am facing one issue for external flash in memory map mode, I am using stm32U585 . I am unable to write/read/access external flash(NOR) while in memory mode. but in Indirect memory mode all actions are working.but in manual they have given as shown below. its showing not recommended, but its not like its not possible. anyone can help me , how can I achieve OCTOSPI1 (QUADSPI) interface in memory map mode.
I'm using STM32WB55. The reference example is BLE_p2pServer with custom modifications. The power consumption of STOP2 mode ( by enabling CFG_LPM_SUPPORTED ) is around 6mA (board level), and it will be around 9mA after LPUART is enabled with RCC_LPUART1CLKSOURCE_HSI. Is that reasonable? If (3.85+5.25)*64 is the correct extra current consumption of LPUART in STOP mode?
Hello, Currently I implement a I3C function of mass readback data from the target device. I use the HAL_I3C_Ctrl_MultipleTransfer_IT, the mass write data into target device that is worked. But readback data operation is not worked well. If it readback data under 16 bytes, it is worked. Therefore, readback data above 16 bytes, that data is limited in 16 bytes. For example, the first operation that it is setup to readback 32 bytes data, but the waveform shows the readback data is 16 bytes. And repeat again the same read data operation, it is stucked. If any specific setting is needed to modify to unlock the read data 16 bytes limitation? on the controller side, function as below: void HXREG_READ(uint8_t cas_ID, uint32_t datalenght) { uint32_t ctrlread_buffer[0xF]; I2C_TxBuffer[0]=cas_ID; // Configure private messages aPrivateDescriptor[0].TargetAddr = TARGET1_DYN_ADDR; aPrivateDescriptor[0].TxBuf.pBuffer = I2C_TxBuffer; aPrivateDescripto
Hi,I'm using an STM32H7A3ZI MCU, with freeRTOS, fatFS & DMAI have set the SDMMC2 peripheral with 4 bit mode & DMA (by default in STM32H7 MX config). I have implemented the code from this example to test my SD card (microSDHC 32Gb, also test on 2Gb SD).I set the example code inside a RTOS task (1024 stack size) (CubeMX detects that I use RTOS so the sd_diskio file is set for rtos with queues and so, however I didn't implement queues in the example code)My problemen is that at the HAL_SD_InitCard part, I have and HardFault_Handler error at this line : >>> HAL_Delay(1U + (74U * 1000U / (sdmmc_clk)));(in stm32h7xx_hal_sd.c) On the hardware part I have 47k pullup on data & CMD pins, the voltage supply is OK. I try also without the 47k pullup & with internal pull up. I have set the SD clock to 12.5Mhz.Any idea on what could cause this problem ?You can find my full code here:https://github.com/pa0694/IOC_SDMMCThanks!
Hi Tech Support Team,I would like to connect the B-U585I-IOT2A board to Azure IoT cloud using STM32CUBE IDE.I am confusing on the setup steps.Should I go through the steps 1 and 2 then follow steps 3.b?Or just start with steps 3.b? And also, when build the TFM_Appli_Secure project it come out error, there is no pid.h file under psa_manifest folder. Please help. Thanks.
I am using the STM32H7B3I-DK and followed How to create a file system on a SD card using STM32CubeIDE. I noticed that DMA options are not available on the SDMMC1 configuration tab, so I just skipped that step. The rest of the steps I followed. In FATFS Platform settings I set Detect_SDIO GPIO:Input PI8.I do not have a microSD card inserted but the f_mount() is still successful: void SDInit(void) { // Mount the file system on the SD card (assumes SDPath is defined) if (f_mount(&SDFatFS, (TCHAR const*)SDPath, 0) != FR_OK) { printf("Failed to mount\r\n"); } else{ printf("Mount Good\r\n"); } } I have checked PI8 state and it is set which is correct for no device inserted, so I am unsure why f_mount() passes
I want to make Websocket Client in STM32CUBEIDE and I am using NUCLEO-H755ZI-Q Board, I have completed the Program with Ethernet, LWP and FREERTOS.I would like to know if it is possible to implement websockets on the NUCLEO-H755ZI-Q Board.Does anyone have a successful example of implementing websockets on the NUCLEO-H755ZI-Q Board?
I need to have USB PD connectivity so I am using the examples provided. There are SNK and SRC and DRP examples. However, they all use the TCPP which is also included in all of the 3 demo boards. I don't see any way to disable the TCPP component itself and keep using the X-CUBE-TCPP middleware because it seems there is a library file provided that has the TCPP manipulation within it and I can't edit that file.Is there any recommended strategy for developing a USBPD application on the STM32G071 that does not include the use of the TCPP hardware? I can uncheck the Board Part and the Board Support package but then I don't get good code generation. Thanks
I was wondering if it is even possible to use the secondary USB port 'USB' in order to write to a USB flash drive?If so, what is a good starting point to begin learning the process(es) to do so?
Hi,I'm using Nucleo board with Stm32CubeIde and HAL library.I have a periodic interrupt every 10 ms and I want to acquire data from 8 sensors with I2C bus each with a different address. At the interrupt output I must already have all the data to copy into a circular buffer. For I2c requests I want to use DMA. So I start eight requests at the same time, what I want to know is if the callback DMA interrupt is called in the same order as the request to have the correct data. If not, how can I solve this problem?Thank you in advanceDomenico
Hello Iam using STM32H562RGV6 for my project and iam using SPI6 on this MCU in order to communicate with LSM6DSOX which is an IMU from ST itself but i couldn’t get proper data from the IMU, as its giving random data sometimes and sometimes its zero.Pin connections :SPI6_SCK -> PB3SPI6_MOSI -> PB5SPI6_MISO -> PB4CS -> PH0 (This is an external crystal oscillator pin but iam using it as GPIO, Will this be an issue as on this pin even if i set the GPIO to high its giving a maximum voltage of 1V)I tried to change the CS pin instead of toggle before and after communication to ground always and used pull-up in cube ide also but nothing seems to work as i cant communicate and get proper data , chip id itself.Here are my SPI6 configuration settings of my project, I changed the prescalar to different values but nothing is working. When I measure voltage on SPC and MOSI pins its giving 1.35V (If this would be an issue)How to debug this issue i dont have print log iam
Hi All I am using STM32L053 board for a product development. I am using RS485 communication Protocol. I am sending Data from Computer to the processor to get the response. When I send the data, I get proper response. but out of 10 times say 1 time the processor Resets with the error number 19, that is POR(25) This is reset due to CLASS B VAR FAIL. CLASS B VAR error comes as a result of Clock Status STL_Main Clock Test(void) function which is written in the file STm32fxx_STLclockRun.c file. this function has one condition, if (((PeriodValue ^ PeriodValueInv) == 0xFFFFFFFFuL)\ && ((LSIPeriodFlag ^ LSIPeriodFlagInv) == 0xFFFFFFFFuL)\ && (LSIPeriodFlag != 0u) ) in this condition, actually LSIPeriodFlag = 0 and also (LSIPeriodFlag ^ LSIPeriodFlagInv) are not exactly inverse of each other as LSIPeriodFlag = 0x00000000; LSIPeriodFlagInv = 0x55555555; How to solve the problem? Thanks in Advance Regards Ashwini &
Hello, I am having trouble connecting my nucleo board to my pc because the port is not being recognized. I downloaded the st-link 009 usb driver without any problems but when i connect the board the com port and the device doesnt show up. In the description it says its compatible up to Windows 10 but I read on other forums that people with windows 11 did get theirs to work. I'm not getting errors its just not showing up. What am I missing?
Hi,How to glow LED2 AND LED4 Which is connected through MFX_V3 in eval Boardany sample I2C format for that?How to wakeup MFX_v3? steps or sample code need to follow to glow Ledsplease provide any examples or doc.thanks
I am using a user defined diskio function (found online here https://github.com/kiwih/cubeide-sd-card/tree/master/cubeide-sd-card/FATFS/Target) for doing read and writes using SPI2. I am trying to read 50,000 floats from a file that containsway more than that. My SPI baudrate is setup at 48 Mbits/s(SPI clock at 96 with prescalar divided by 2) and attaching the spi signals to a oscilloscope does show that the clock speed and the data speed is correct. However, f_read(&file, arr_floats, 50000* 4, &bytesread); takes over 7 seconds to read all the bytes when at 48Mhz it should be reading it in way less than a second. I am using a LEXAR 32gb V10 sdcard in FAT32 format, and was wondering what I could do to increase the read speed of the floats??? I have tried several different methods to improve it: reading 512 bytes at a time instead of the 50,000 * 4 at a time, I have tried to implement the dma, I have tried to use a different SDcard, but none of the things helped in increasin
Here's the code of my app_threadx.c file.https://pastebin.com/qj8ZUYg3I followed the STM32 AZURE RTOS workshop for the H7 MCUs, however, I'm currently developing on a STM32F401RE.Basically, when I debug the program the function it's called and then go to sleep, despite the fact of it doesn't wake up, so it doesn't work as a thread anymore.I don't know if there's any timer problem, I've set TIM10 as timebase source because I can't use the SysTick due STM software constraints (to avoid any conflict with the SysTick interrupt handler).I think it could be a library problem, however I don't know what can I do except these basic things.Thanks in advance!
Hello,I am a student and a newbie with microcontrollers. I have worked with ESP and Arduino before. For a low-powered IoT project, i got the B-L462E-CELL1 board. I looked for examples regarding this board but failed to find any. I saw the example from X-CUBE-CELLULAR but it was too complicated to understand. It also showed errors when i built the project. Is there any step by step guide to build the first blinky project with this board or can anyone help or suggest how to proceed with it. I saw some youtube videos and tried to use the reference manual and datasheet to turn on LEDs. The code built was without error but the device is not acting as it is expected. Below i have attached a ss of the IDE. Regards,Sarfaraj
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.