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
HiI use the HAL library and CMSIS-RTOS2infinite loops should not be used in the thread, but I need to wait, for example, for the packet to be sent via I2C, because I need to write and read right after each other, and if I don't wait for the HAL_I2C_STATE_READY state, only writing is performed, but reading does not take placeis the solution to use osThreadYield() ?static void Task1(void *argument) { while(1) { HAL_I2C_Master_Transmit_IT(&hi2c1, I2C_addr, write_data_array,sizeof(write_data_array)); while(hi2c1.State != HAL_I2C_STATE_READY) { osThreadYield() ; } HAL_I2C_Master_Receive_IT(&hi2c1, I2C_addr, read_data_array,sizeof(read_data_array)); while(hi2c1.State != HAL_I2C_STATE_READY) { osThreadYield() ; } } }or set a semaphore(event) in the I2C interrupt handler and watch it in the thread?osSemaphoreId_t I2C_semaphore; void I2C1_EV_IRQHandler(void) { HAL_I2C_EV_IRQHandler(&hi2c1); if(hi2c1.State == HAL_I2C_STATE_READY) osSemaphoreRelease(I2C
Hey Guys,I have problems about configure my STM32H743VIT SysClock.On my own PCB, i have a Crystal with 8 MHZ, and a LSE of 32.768 khz.Settings are in my Screenshots, now if i debug my application, it ends in a Error Handler.. but why?BTW: UART4,5,7 and USART1,2 enabled, and USB_DEVICE + USB_HOST is enabled. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { Error_Handler(); /** JUMPS TO ERROR_HANDLER **/ } my complete SystemClockConfig: void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2); while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscIn
While setting up Ethernet connectivity on STM32H753, the HAL layer exited with HAL error during initialization. I found out that the SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR); fails to reset the register and the initialization exits with HAL error on timeout. I am using DP83848 as Ethernet PHY. I was able to verify that the link state is 100-Mbps Full Duplex and 25MHz clock is available as TX_CLK and RX_CLK. The PHY is used in MII mode.
Hey,i got a specific Problem with the STM32H7 Ethernet, sometimes when performing SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR); /* Get tick */ tickstart = HAL_GetTick(); /* Wait for software reset */ uint8_t force_reset = 0; while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) { if(((HAL_GetTick() - tickstart ) > ETH_SWRESET_TIMEOUT)) { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; /* Return Error */ return HAL_ERROR; break; } }The error gets detectet, so ETH_DMAMR_SWR doesnt get activated within this timeout period. Is there aother way to reset the ETH Controller except from restarting the whole mcu?I tried __HAL_RCC_ETH1MAC_FORCE_RESET but it didnt work out.
Hello, I'm having an issue with my STM32H725ZGT6, I'm trying to get basic communication with it working through ethernet, lwIP, and FreeRTOS (I'm just going to call this configuration 'eth' going forward). Specifically all of my code compiles and runs just fine (with a blinking status LED for good measure), but no matter what I cannot get a single packet from it.Before I got started with eth on my actual board, I of course tried to get a proof of concept working on the most similar development board I could find which was the STM32H723 Nucleo board. Although getting all of those pieces of software to work was a hassle (I followed and used these templates), I was able to communicate with the board pretty reliably afterward. My baseline for this is setting the board to a static IP (192.168.050.010) and subnet mask (255.255.255.000), double checking the ICMP module is enabled, setting my PC's ethernet adapter to the same subnet mask and IP to 192.168.050.020, double checking the def
Tôi đã triển khai thành công việc truyền dữ liệu giữa STM32 NUCLEO F429ZI của mình và một broker MQTT.
Hello I'm developing RTOS environment of dual-core in STM32H757.I could refer to the examples provided by STM32, and I read the application note AN5617. I want to set OPENAMP_M4 Communication Mode to Master, so I would like to find a project with OPENAMP_M4 Communication Mode set to Master. Any help is greatly appreciated! Friendly regards, Tau
Posted on September 13, 2017 at 14:49When enabling the FreeRTOS idle hook STM32CubeMX generates a function with the following prototype in the freertos.c file:__weak void vApplicationIdleHook( void )However __weak isn't defined in any one of the included header files (I'm using GCC with Makefile target) so the file can't be compiled until defining the __weak as __attribute__((weak)) somewhere.#idle-hook #freertos
Hello,I'm trying to do a proof of concept using the STM32429I-EVAL1, which basically sends a PTP command to a camera. All the USB host library documentation only covers MTP, but there is nothing about PTP. I understand that this board offers out of the box support for MTP, but in the "MTP_Standalone" project example, the files "usbh_mtp_ptp.h" and "usbh_mtp_ptp.c" are part of the projects and the function USBH_PTP_SendRequest, seems to be what I need to send a specific PTP command, but there is no documentation about those functions. I'd appreciate a bit of guidance on this.Thank you!
Hello,as the title says, I wanna use the display with the µC. Aim:The aim is just to learn to know how to use SPI. And for the begin I want to use only a display with a ready to go driver. The display runs with the driver ili9341. I just wanna give text outputs to the display. Reccources:I searched an STM-compatible: ILI9341-HAL-Driver-afiksonA website (also with a link to the data sheet) for the display: MSP2202 STM32G431 User Manual: UM2397 I use the STM32CubeIDE. What I already configured:Cube settings (Pinout & Configuration):System Core/RCC: Crystal/Ceramic ResonatorConnectivity/SPI1: Full-Duplex Master as mode, without NSSBasic params: Motorola, Size 8 Bit, MSBClock params: 64 (prescaler), CPOL Low, CPHA 1 EdgeI have set the PA11 as GPIO Outpus and named it SPI1_CS for Chip Select (In the User Manual for the G431KB at the pinout table, there is an entry what says that CS for SPI is on this pin and with a notation that it functions as GPIO on page 22 C
Hi im using stm32g474vet6 mcu , in that im using internal comparator for PWM SHUTDOWN for protection purpose.im using comp4. comp4 input pin is directly shorted to ADC pin and reference voltage is giving using DAC.in the below attached image yellow color : sudden change in adc signal which is going to comparator input.blue color : comparator output is taken out using gpio of mcugreen color : pwm signal from mcu.in that image u can see that the sudden change in adc crosses the threshold value of comparator, and comparator output is become high , during that time pwm signal is not stoping exactly , it is shutdown at after the completion of that ON cycle, where as in pwm OFF cycle this is not happening pwm is shutting down fastly.'to shutdown that pwm fastly what to do ? these things are done in stm32cubeide ioc file configuration setting of timer1, in that i have enabled only comparator output and not the TIM1_BKIN.
Despite the USE_STATIC_ALLOCATION is defined to 1, code is showed in gray, I added a break point on gray section and stoped well. Down below the sequence to found the path to marco definition:app_azure_rtos.c include app_azure_rtos.h this include app_azure_rtos_config.h this one has the sentence : #define USE_STATIC_ALLOCATION 1
I need 40 us delay. I made my own function using timers, which works on NUCLEO, just using it in main. Now that I put my program my circuit, I moved that SPI part on freertos, but now I have problem, because that delay doesnt work anymore. I would use osDelay, but that is only ms and I need us. Why my delay using timers doesnt work and is there any other way to make it. Thank you for help.
How can they be both "Active" and "superseded" ?! Similarly F1, F2, F3, F4, etc:
Hi all,At a loss.I'm working with a display on a custom board. There isn't much info on the display itself aside from the driver being an ST7701 so I can only assume that it's been initialised correctly. It's an RGB565 display.That said, I get absolutely nothing on the display - save the backlight works but that's it. Probing around I see pixel clock, hsync, vsync, etc.But I see -no- activity on any of the gpios configured for RGB. absolutely no activity. All of the code save the framebuffere address is configured with cubeide. Generated code and me trying to draw a white screen below.I also noticed that LTDC_IRQHandler or LTDC_ER_IRQHandler don't fire either?main() has MX_LTDC_Init() called in it - part of the generated code. The only things I call in main() are a function to send the display init code via SPI and I confirmed that with a logic probe and another to set the framebuffer. Whether or not theinit code is right is another thing altogether but I expect to at le
how to activate I2CGood morningI'm trying to make a project that requires the I2C1 bus workif I load the compiled project on arduinofrom debug the application crashes because it can't read the EEPROM on RTCI've read various documents but I can't understand how to activate the bus on the STMF411 processorI'm quite new to STMwith esp32 there are no problemshere it seems more complicated to me
I have a custom board with a STM32G431CBU3 connected to a TCPP02-M18 for a USB-C power delivery source solution. I follow the ST tutorials for setting up the USBPD and TCPP middlewares in STM32Cube IDE. I'm also able to get trace data out, which I've attached and pasted below. This is all the trace data I get out. Nothing happens when I plug in a USB-C PD sink into my custom board, the mcu never detects that a sink device is connected. I've looked at UM2552 and the "sequence for source Detection" section. It says that it tries to "detect the presence of Rd resistor" and will trigger the USBPD_DPM_CADCallback when the Rd resistor is detected, but I never see that happen. What criteria exactly is the mcu looking for to detect the presence of a Rd resistor that will trigger the USBPD_DPM_CADCallback function? Does it need to see a specific voltage at the CC1 and/or CC2 pins? Any ideas where I can go from here or anything else to check? DEBUG 3003 1 -- BSP_USBPD_P
Hi everyone,I am using Zephyr RTOS as a test on a custom board. I have been trying to communicate with a modem and hoping to receive an OK message whenever I send AT. With an oscilloscope or by connecting it to a USB-Serial cable, I can see that OK is being sent after receiving AT, but in my code, I couldn't manage to read this message.I used the polling and interrupt examples that could be found in the Zephyr repos.Polling: void send_str(const struct device *uart, char *str) { int msg_len = strlen(str); for (int i = 0; i < msg_len; i++) { uart_poll_out(uart, str[i]); } // printk("Device %s sent: \"%s\"\n", uart->name, str); } void recv_str(const struct device *uart, char *str) { char *head = str; char c; while (!uart_poll_in(uart, &c)) { *head++ = c; } *head = '\0'; printk("Device %s received: \"%s\"\n", uart->name, str); } int main(void) { char* send_buf = "AT\r\n"; char recv_buf[64]; while(1) { send_str(uart_dev, send_buf); /* Wai
Hello Sir,I’ve been dealing with an I2C protocol error for a long time, but unfortunately, neither the solutions online nor the suggestions here have been successful. I've changed sensors multiple times and tried different methods, but the problem remains the same. I’m using the STM32F413ZH board, and in my current tests, I’m using the QMC5883L model for I2C. The pull-up resistors are connected correctly. I even tried soldering the connections to improve them. I also attempted to supply power externally and change the cables, but the issue still wasn’t resolved. I used a logic analyzer to monitor the bus, and either the signal gets stuck as shown below, or it works chaotically in a meaningless way. For example, SCL often stays high, while SDA changes continuously, or SDA stops entirely at certain points and then continues later. I've seen many variations like this, but it rarely works correctly. I mostly get error codes like 32, 36, and 544.(So it comes as 32 + 512, and in the HAL
I am working on an STM32f767 project with LWIP and MQTT. Everything seemed to work for a while but eventually, I received the following assert: "pbuf_free: p->ref > 0..." which caused it to crash sometimes; but sometimes it will continue to work without any issue. Has anyone had a similar issue? According to LWIP_IAP example, memory location 0x20048000 is labeled as ethernet rx buffer location; however, I could not find where this location is linked to the ethernet rx buffer. for example, 0x2007C000 memory location in the linker file for RxDescripSection & TxDecripSection. And does the size of the MPU region have to be equal to or greater than MEM_SIZE defined in opt.h? My settings: LinkerScript.ld Memory_B1(xrw) : ORIGIN = 0x2004C000, LENGTH = 0xA0 Memory_B2(xrw) : ORIGIN = 0x2004C0A0, LENGTH = 0xA0 .RxDecripSection (NOLOAD) : { *(.RxDescripSection) } >Memory_B1 .TxDecripSection (NOLOAD) : { *(.DMATxDscrTab_section) } >Mem
Hello, I developped a card around the stm32f401re MCU, and i want to know which one of Pin(s) can show me that my MCU is woke up. It's the first time I use a STM32F401 I never communicated with my MCU, it's for this that I want to know this. Thank you community Yassir OTMAN
Inquiry about the possibility of opening multiple endpoints to facilitate communication between M7 and M4, so that each specific message triggers a specific response.
I try for the first time to use audio , on my stm32h747i-DISCO board. I have 2 questions 1) the build CM7 is showing the following error Description Resource Path Location Type 'Mode' undeclared (first use in this function) stm32h7xx_hal_msp.c /stm32h7disco-i2s-baremetal_CM7/Core/Src line 179 C/C++ Problem in /* USER CODE END I2S1_Init 1 */ hi2s1.State = HAL_I2S_STATE_RESET; hi2s1.Instance = SPI1; hi2s1.Init.Mode = Mode; hi2s1.Init.Standard = I2S_STANDARD_PHILIPS; hi2s1.Init.DataFormat = I2S_DATAFORMAT_16B_EXTENDED; hi2s1.Init.MCLKOutput = I2S_MCLKOUTPUT_DISABLE; hi2s1.Init.AudioFreq = I2S_AUDIOFREQ_11K; hi2s1.Init.CPOL = I2S_CPOL_LOW; hi2s1.Init.FirstBit = I2S_FIRSTBIT_MSB; hi2s1.Init.WSInversion = I2S_WS_INVERSION_DISABLE; hi2s1.Init.Data24BitAlignment = I2S_DATA_24BIT_ALIGNMENT_RIGHT; hi2s1.Init.MasterKeepIOState = I2S_MASTER_KEEP_IO_STATE_DISABLE; if (HAL_I2S_Init(&hi2s1, Mode) != HAL_OK) //This Mode is the error { Error_Handler(); } /* USER CODE BEGIN I2S1_In
Hi everyone,I am developing a new project with SMT32H7 MCU series, in which I have added the ITTIA DB middleware.I’m encountering an issue while trying to compile my project using a Makefile. The Makefile was auto-generated, and the error I get during compilation is:make: *** No rule to make target `build/oslib.cpp', needed by `build/M0045-8000_TheHeecapDevice.elf'. Stop. make: *** Waiting for unfinished jobs....The oslib.cpp file is present in my project directory, but it seems like the Makefile isn’t properly handling the .cpp file. Therefore, I am assuming that there is a problem with the makefile, since it cannot find/build cpp files.What do I have to change in order to compile my project?Here is the makefile attached.
In another project using FreeRTOS and LwIP, cubeMX allowed the ability to disable DHCP and set a fixed IP address like 192.168.1.10. But I don't see a way to do that using AZRTOS.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.