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 am stuck with STM32H743IIT I2S DMA RX ..The code is working perfect when uncommet HAL_I2S_Transmit_DMA (Line 29) but when uncomment line 31 HAL_I2S_Receive_DMA it feedback HAL_OK but do never go into the callbacks ..What can be the issue ?Best regardsHjalmar#define I2S_BUFFER_SIZE 48 __attribute__(( section(".MY_RAM_D2") )) volatile uint8_t I2S_TXbuf[I2S_BUFFER_SIZE ]; __attribute__(( section(".MY_RAM_D2") )) volatile uint8_t I2S_RXbuf[I2S_BUFFER_SIZE ]; float phaseStep = 550.0f/192000.0f; float phaseStepSum = 0; /* USER CODE END PV */ /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_DMA_Init(void); static void MX_I2S2_Init(void); static void MX_USART1_UART_Init(void); /* USER CODE BEGIN PFP */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_I2S2_Init(); MX_USART1_UART_Init(); /* USER COD
There are some comments in STM HAL driver code: stm32f1xx_hal_eth.c "The PTP protocol and the DMA descriptors ring mode are not supported in this driver". Can this driver work with zpehyr RTOS and the Ethernet Rx works in interrupt mode?Also, inside stm32f1xx_hal_def.h for _HAL_LOCK_ definition, line 89:"#if (USE_RTOS == 1U)/* Reserved for future use */// #error "USE_RTOS should be 0 in the current HAL release"Does this comment indicate that the Ethernet HAL driver for STM32F107 can not work with Zephyr?MII phy is used. With the following Zephyr configuration:#Ethernet MAC supportCONFIG_ETH_DRIVER=yCONFIG_NET_L2_ETHERNET=y# Mostly, this is ethernet MAC I need use# But there is no way to plugin phy# so we may need patch the STM32 driverCONFIG_ETH_STM32_HAL=y# Enable MII interface for STM32 PHY. This will automatically enable MIICONFIG_ETH_STM32_HAL_MII=y# Conduct auto PHY speed auto negotiation# Need Alert patchCONFIG_ETH_STM32_AUTO_NEGOTIATION_ENABLE=y# 100M or 10M, default is 100
I am trying to create a frequency meter in a STM32U575ZI microcontroller that works with ThreadX and low power consumption using the low power timers LPTIM3 and LPTIM4, as well as an interrupt using EXTI 14. In summary, I use LPTIM4 to count input pulses within a one-second interval (delay of the operating system task). Then, using LPTIM3 and an interrupt, I correct any deviation in the last pulse to adjust the measured frequency. The execution sequence is better explained in the document I have provided.During implementation, I encountered an issue where the interrupt would wake up the system despite being disabled (I even tried disabling the clock of the corresponding port for EXTI). To overcome this, I found that changing the operating mode of the GPIO which uses the interrupt, from GPIO_MODE_IT_FALLING to GPIO_MODE_OUTPUT_PP prevents unwanted signals from reaching the microcontroller when I don't want it to wake up, and allows signals when I do want it to wake up, so it works. Howe
..
I am using STM32F407 and want to use USART interface to flash MCU using bootloader. I have external 25MHz oscillator connected to the MCU.I've noticed that there is drastic difference in booting delay time I need to implement on different bootloader versions on STM32F407. According to application note 2606Bootloader V3.1 -Minimum startup time: 84.59msHSE timeout: 0.790msBootloader V9.1 - Minimum startup time: 74msHSE timeout: 96msSo there is drastic difference in HSE timeout, however it is says in same application notes - "The HSE clock source is used only when the CAN or the DFU (USB FS Device) interfaces are selected."I could not find any data on whether or not it effects Bootloader timings if CAN or DFU is not used, but USART is used. Please can you clarify that?
Hello everyone,I create my firmware project in FreeRTOS environment at STM32L476 EVB, I place code in bank1 and when I execute bank 2 flash section operating like erase/program , firmware will crashed, but if without FreeRTOS condition, the same operate condition could running well. Are there any limitation for embedded dual bank operating if under FreeRTOS environment ?
I have a project using ThreadX, NetX, and FileX. The NetX and FileX code generation is initializing at least one instance but nothing in ThreadX. I can create it but it is a little concerning that in the init there is only:UINT App_ThreadX_Init(VOID *memory_ptr) { UINT ret = TX_SUCCESS; /* USER CODE BEGIN App_ThreadX_MEM_POOL */ /* USER CODE END App_ThreadX_MEM_POOL */ /* USER CODE BEGIN App_ThreadX_Init */ /* USER CODE END App_ThreadX_Init */ return ret; }where in the other filex and netx sections there is significant initialization. My fear is that I have not checked off something correctly in cubeMX, and later on it may decide to create code that duplicates my efforts.Did I miss something?Using:STM32CubeIDEVersion: 1.12.1Build: 16088_20230420_1057 (UTC)with embedded STM32CubeMX 6.8.1.202304191431OS: Linux (LMint 21 - Cinnamon)
I followed the article on placing a program into SRAM - I can't place the link here, on an STM32 (I'm using the STM32L476RG Nucleo board)I can successfully execute the program from SRAM directly from STM32CubeIDE however when I try and load the program into STM32CubeProgrammer and program into SRAM using the UART bootloader, I can see that the device has successfully been connected to however I get this issue: 13:54:33 : Error: Write address not acknowledged: 0x20000000 13:54:33 : Error: failed to download Segment[0] 13:54:33 : Error: failed to download the FileIs it possible to program the SRAM using the UART bootloader?
Hi guys Can any one provide me how to use queue inside UART ISR receive interrupt....I have tried it using some web search but I couldn't achieve it can any one provide me the working example. below, I have attached my code and the image where my code got struck any one help me to find out the solution to my problem Iam using keil ide with FreeRTOS and stm32f429igt6 controllerxQueueHandle xQueue; void USART_Configuration(void); uint8_t uart_getchar(void); void USART1_IRQHandler(void) { uint8_t ch; if (USART_GetITStatus(USART1, USART_IT_RXNE)) { ch = USART1->DR; rxbuf1[rxptrh1++] = ch; } if (USART_GetITStatus(USART1, USART_IT_TXE)) { if (txlen1) { txlen1--; USART1->DR = *txptr1++; } if (!txlen1) { USART_ITConfig(USART1, USART_IT_TXE, DISABLE); } } // taskYIELD(); } void USART6_IRQHandler(void) { uint8_t ch; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if (USART_GetITStatus(USART6, USART_IT_RXNE)) { ch = USART_ReceiveData(USART6); rx
Hi, while I was working on setting up FreeRTOS with multiple task creation and using TIM6 as a timebase source was crashing at osThreadCreate, and changing it to TIM7 solved it. Why is that so? It was my observation so I thought posting it here to get some info about it.
I use STM32L496RE controller to integrate C270 logitech camera using USB protocol. I got a sample link from the community https://github.com/iliasam/STM32_HOST_UVC_Camera.The controller board I'm using acts as a USB host.Since there were no defined classes for Video in ST's cube IDE, The code in the above link had a separate video class file written keeping ST's audio class file as basis.Once the camera is connected I'm getting a interrupt from USB_OTG. I'm not able to move further after this. Is there any other way to integrate logitech's C270 camera with ST?Or Has anyone verified the above code on their project?
Hi, I'm, working on STM32G0B1RE dev kit. I need to implement USB HID Composite Device class for keyboard and mouse. Can someone help me where(in which file) I can enable USE_USBD_COMPOSITE macro?
I use a STM32F7508-DK as a USB-Device only as MSC with an SDCard. The Board is self powered.STM says to use VBUS sensing on self powered Devices. But with VBUS sensing enabled, the USB connection isn't registered and the USB connection doesn't work at all.Without VBUS sensing, the USB-Device connects and gets in to configured State. Data from the SDCard can be seen on PC and copied etc.But after disconnecting the hUsbDeviceFS.dev_state shortly turns to suspended State but immediately turns back to Configured State.The USB Suspended State Register ((USB_OTG_DeviceTypeDef *) (USB_OTG_FS_PERIPH_BASE+USB_OTG_DEVICE_BASE))->DSTSdoes not get set to 1How do i ge the VBUS sensing working on the STM32F7508-DK?THX for helping!
hi,all My device is STM32F072,and connect to Host. I want to identify the Host support speed( Full-Speed or High-Speed ).Is there any register/fuction ,can detect Host is Full-Speed or High-Speed HAL VERSION: STM32Cube_FW_F0_V1.11.4
Update: I found a timer1 conflict with the USB_OTG so I do think this will be resolved once I fix the timer1. I'm learning how to use STM32CubeIDE with freeRTOS to program my STM32F407 DISCO board. From my understanding, I have to call MX_USB_HOST_Process() to keep my debugger/IDE updated. Since the main loop in my main.c file is no longer called and superseded by freeRTOS, I created a defaultTask who's sole job is to call 'MX_USB_HOST_Process()'. I created a default_task.h and default_task.c file and include the usb_host.h file however I get an 'undefined reference error' when calling 'MX_USB_HOST_Process();. Is there an example for using STM32CubeIDE with freeRTOS tasks instead of a main.c loop?I included the default_task.c file
Hi,I wanted to enable the littlefs in zephyr in nucleo h723zg board,I have added overlay file and made partition for mcuboot 128k, image-1 and image-2 256k,for scratch 128k, and for storage 128k.When i build and flash the code littlefs sample in zephyr ,getting error like write offset not aligned on flashword length.
Hello,While I was tracking an issue on I2C bus, I found something that seems to be unconsistent in HAL file stm32l4_hal_i2c.c1 - routines I2C_WaitOn_____UntilTimeout() are called after locking the bus with __HAL_LOCK(hi2c) macro2- these routines update the lock state in case of error, return and this error to the caller finaly the HAL ends. The caller in that case (error) do not update lock state which is updated by I2C_WaitOn_____UntilTimeout() (=unlock before returning error)but I found that all path do not update the lock state. for example below the first error do not unlock the bus :static HAL_StatusTypeDef I2C_WaitOnSTOPFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Timeout, uint32_t Tickstart){ while (__HAL_I2C_GET_FLAG(hi2c, I2C_FLAG_STOPF) == RESET) { /* Check if an error is detected */&n
We're trying to use the internal bootloader (the one pre-programmed by ST)on a STM32H743.the datasheet says something about remapping system-memory in order to be able to jumpto it's start address.I have found some samples but they are general, and does not include the remapping functionalityif someone can please post a sample code for that microcontroller.
Hi community.. In the past i have developed a custom bootloader for the following mcu stm32f7... I was reading the usb and writing the flash section dedicated for the application.Now i have to do the same for the stm32H7.. Are the steps the same ? Are there major differences compared to the stm32f7 family? I have read also about the trust zone (secure area).. Is it better to locate the bootloade in a secure flash region?Do you have some links with examples ?Thanks a lot
Hi, I am developing a firmware for stm32f103c8t6 using STMCubeIDE 1.12.0. I want the USB to work as both a COM port and DFU device. Using the middleware in the STMCube it seems we cannot implement both of them at the same time. Any help is appreciated. Thank you.
HiMy company wants to use ThreadX, NextX DUO, File X, Azure RTOS and was not clear if we need to pay for licensing when we send the product to market. we are using U5-series ST boards. can some help whether its an open source that ST has provided in the boards or do we need to procure the license for the same.
I do have RTC working and SD, I found this code FRESULT set_timestamp (char *obj) { FILINFO fno; HAL_RTC_GetTime(&hrtc, &sTime, RTC_FORMAT_BIN); HAL_RTC_GetDate(&hrtc, &sDate, RTC_FORMAT_BIN); int hour = sTime.Hours; int min = sTime.Minutes; int sec = sTime.Seconds; int month = sDate.Month; int mday = sDate.Date; int year = sDate.Year; year+=2000; fno.fdate = (WORD)(((year - 1980) << 9) | month << 5 | mday); fno.ftime = (WORD)(hour <<11 | min <<5 | sec/2 ); f_utime(obj, &fno); } but it keeps saying undefined symbol f_utimeI see that ff.c contain this function, I do not know what the problem is
I'm working on a device that uses Pulse-Width-Modulation to control a DRV2605L LRA/ERM haptic feedback motor driver (datasheet found here: https://www.ti.com/lit/ds/symlink/drv2605l.pdf?ts=1683824689205&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FDRV2605L) The devices uses two DRV2605L, each connected to an STM32L552ZET6Q microcontroller via their own I2C bus (I2C1 & I2C2) and a PWM line (TIM1 Channel 1 & Channel 2 respectively). The DRV2605Ls are configured via I2C to take a PWM signal from their respective TIM1 channels and constantly drive an LRA haptic motor at a strength depending on the PWM signal. I'm unsure of precisely why, but the strength of the motor's vibrations are inversely proportional to the PWM signal (i.e. lower duty cycle means higher vibration strength). The way the device works is as follows: instructions are sent from a PC to the STM32L5 via USB. These instructions contain which channel from TIM1 is having its duty cycle adjusted,
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.