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,I am trying to use the dual-bank boot feature in order to safely upgrade the software application.The hardware configuration is the following:The mcu used is the STM32L471.The system bootloader version is v9.2BOOT0 pin = 0 so boot mode is set to boot from Main Flash memory.Default value of my option bytes is 0xFF6FF8AA so DUAL_BANK=1, BFB2=0 and nBOOT1=1I have a simple application that simply blinks a LED and does nothing else.I have programmed both banks (@0x0800000 and 0x08080000) with this same application and checked the memory content to verify both banks are equal.I can read in the bank's first address the stack pointer (0x20018000 in my case) When BFB2=0, my application is running properly and I can see the LED blinking.When BFB2=1, nothing happens, it seems I am stuck in the system bootloader....I tried with BFB2=1 and the bank2 erased => same result, it doesn't work.Thanks to the JTAG, I was able to make the following verifications:The program counter (PC) seems to sw
We have migrated our project from STM32F7 to STM32H7 MCU and found that there's no support for PTP IEEE 1588 protocol in MAC Ethernet driver (HAL). Here is a message written in stm32h7xx_hal_eth.c file: -@- The PTP protocol offload APIs are not supported in this driver.Is it ever going to be supported?
I am using stm32f429iit6 customized board . I have one hex file , when i debug that hex file in board its working fine and not giving any usb issues its shows stm virtual com port , But when i write program for same board its giving the USB driver issue but when i debug my written program in nucleo board its working fine. I don't able to understand why this happening . MY code is working fine if its not ,its not working in nucleo as well and if its have driver issue then its must be not working with that hex file(pre programmed file in that board) also. Please help me with same.
The original CustomHID_Data_Setup function :RESULT CustomHID_Data_Setup(uint8_t RequestNo) { uint8_t *(*CopyRoutine)(uint16_t); if (pInformation->USBwIndex != 0) return USB_UNSUPPORT; CopyRoutine = NULL; if ((RequestNo == GET_DESCRIPTOR) && (Type_Recipient == (STANDARD_REQUEST | INTERFACE_RECIPIENT)) ) // (( ==0x06 ))&&(0x01=(0x00|0x01)) { if (pInformation->USBwValue1 == REPORT_DESCRIPTOR) { CopyRoutine = CustomHID_GetReportDescriptor; } else if (pInformation->USBwValue1 == HID_DESCRIPTOR_TYPE) { CopyRoutine = CustomHID_GetHIDDescriptor; } } /* End of GET_DESCRIPTOR */ /*** GET_PROTOCOL, GET_REPORT, SET_REPORT ***/ else if
I am using STM32G071 for my USB PD application. I have one dual role port(default sink) and one sink port for charger. When I attach charger I change the role of drp from sink to source. But hub chip in the application gets disconnected when I change the role. It seems like when it changes to source mode it changes the data role from ufp do dfp as well. What should I do to prevent that?void USBPD_DPM_UserCableDetection(uint8_t PortNum, USBPD_CAD_EVENT State) { /* USER CODE BEGIN USBPD_DPM_UserCableDetection */ switch(State) { case USBPD_CAD_EVENT_ATTACHED: if(PortNum == 0){ HAL_GPIO_WritePin(CHG_EN_GPIO_Port, CHG_EN_Pin, 0); } if(PortNum == 1){ HAL_GPIO_WritePin(CHG_EN_GPIO_Port, CHG_EN_Pin, 1); Ports[0].params->PE_PowerRole = USBPD_PORTPOWERROLE_SRC; Ports[0].params->PE_DataRole = USBPD_PORTDATAROLE_UFP; USBPDM1_AssertRp(0); } break;
I am using a stm32g0b1ret with stm32cubemx package 1.6.1 .The symptoms are:On deletion of pages I receive a signal 0 in the debugger, but the pages do get erased eventually. (I use HAL_FLASHEx_Erase)On the first flash write I get an error with goes to hardfault - because the Flag CFGBSY is set. (I use HAL_FLASH_Program, with Doubleword).A reset cures this, and then the writing happens without a further problem.On the next erase the problem is repeated.Questions: I do not know, if this solves my problem, but it looks like there is an inconsistency between the ref man RM0444 and the cube-mx firmware/sample project.CubeMX: Erasing pages in bank 2 assumes and asserts page number start from 0 to 127 for both banks and the choice of bank is done solely by the BKER bit.Reference manual rev 5, page 71/page102 -> this looks like page numbers for bank 2 start at 256 (with a gap from last page 127 of bank1). I have tried both ways, the pages get deleted in both cases, but also the error seems
Installed the X-CUBE-AZRTOS-L4 package with the CubeMX "Install software packages" function. Looks like it is installed.Starting a new Project with an STM32L4 device does not show the Azure RTOS Middleware options. Bug or what I am doing wrong?!
I have STM32G071 MCU to control a USB Type C hub and I want to use VBUS Powered sink in the application. I have connected Dead Battery pins to their respected CCx pins. It supposed to act as a sink when there is no power but when I connect the type c port to a device, it does not act as a sink and connected device does not give any power. I have activated the Dead Battery signals in STM32CubeIDE but it does not work. Also I have tried activating signals by configuring SYSCFG register but it did not work either. What should I do to make it work?
Hello Everyone,I currently trying to implement a FFT by using the optimized functions from CMSIS library on a L5 MCU. The fact is that the M33 family seems not to be supported then I was wondering whether there's some kind of workaround in order to make it work properly.Any suggestions could be very helpful!Thanks in advance
Okay. Somehow I've stepped into another hole. Maybe this helps someone else avoid it and might shed light on it here - So the main question for me while trying to troubleshoot a POSSIBLE problem - which I always first blame ME - for is : What triggers Windows to read STRING DESCRIPTORS?And I know - its buried in Windows so its behind the curtains. So here's the WHY part - I am supposed to do some teaching about some USB applications we use. And I figured Wireshark would be sufficient enough capture capability to do what we need. I don't THINK I need a ON THE WIRE SNIFFER versus a DRIVER LEVEL capture. So I have an STM32L476VG running the USB DEVICE - CDC/VCP firmware example from back about Cube 1.6 days. This has (apparently) always worked for us. The example code has strings for MANUFACTURER, PRODUCT and SERIAL NUMBER and the device descriptor has the indexes as 1, 2 and 3. THESE SHOW UP IN WINDOWS DEVICE MANAGER. Com ports are assigned as expected by VID/PID/SERIAL NUMBER. And the P
Reference manual RM0383, "STM32F411xC/E advanced ARM®-based 32-bit MCUs", says:18.6.7 I2C Status register 2 (I2C_SR2) Note: Reading I2C_SR2 after reading I2C_SR1 clears the ADDR flag, even if the ADDR flag wasset after reading I2C_SR1. Consequently, I2C_SR2 must be read only when ADDR is found set in I2C_SR1 or when the STOPF bit is cleared. But theSTM32F4 DSP and standard peripherals library, STSW-STM32065, doesn't check if the flag STOPF is cleared in I2C_CheckEvent():ErrorStatus I2C_CheckEvent(I2C_TypeDef* I2Cx, uint32_t I2C_EVENT) { uint32_t lastevent = 0; uint32_t flag1 = 0, flag2 = 0; ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_I2C_ALL_PERIPH(I2Cx)); assert_param(IS_I2C_EVENT(I2C_EVENT)); /* Read the I2Cx status register */ flag1 = I2Cx->SR1; /* I2C_SR2 must be read only when ADDR is found set in I2C_SR1 or when the STOPF bit is cleared */ if((flag1 & I2C_SR1_ADDR) || (flag1 & ~I2C_SR1_STOPF)) { fla
Hi. I've been trying to work this out for a couple of weeks now and am pretty well stumped. I can't even get VBUS power working, so suffice it to say I'm not getting very far. All the examples seem to be for Nucleo boards, so not sure if it's even possible with a Blackpill. So far I've worked my way through these examples with no great luck: https://www.youtube.com/watch?v=MlhUG4GsOT0https://controllerstech.com/stm32-usb-host-hidhttps://www.bennettnotes.com/notes/stm32-blackpill-with-stmcubeide-usb-serialI have had a bit of success totally avoiding ST tooling and using the Arduino stm32duino libraries but they don't seem to have managed to get USB Host working either, so that's not particularly productive.Any help would be very much appreciated!
When checked on telnet that there was no response from the ST web page, when requested for headerIs there any issue in using ST website for getting the real time?
I want to switch from FreeRTOS to Azure RTOS ThreadX. In FreeRTOS there is the function xQueueSendToBackFromISR() - It is used to write data to the queue from an interrupt service routine. FreeRTOS interrupt provides an interrupt safe version of queue API to read and write data from queues using ISR. https://www.freertos.org/xQueueSendToBackFromISR.html And I am looking for the equivalent function in Azure RTOS ThreadX.I looked up the documentation on Microsoft website and went through the functions but it seems that there is no such function in Azure RTOS ThreadX? https://learn.microsoft.com/en-us/azure/rtos/threadx/chapter4
So, I suspect I've configured something rather obvious wrong, but I'm not sure what.We've got a product with a OTG USB port we'd like to run in device mode. I'm trying to configure it using the USBD high-level drivers provided (thanks!).I'm finding that the initialization code all the way through appears to correctly initialize the hardware, but I'm not seeing the FS interrupt fire when a host device is connected.Am I missing something obvious? Thanks!
On a L412KB core HAL is quite unstable if the core receives ~250K interrupts per second. Without HAL I could get everything stable, but for read-ability I would like to put the interrupt service routine in another file as STM32xxx_it.c Besides that, I have some pragma statement added to the IRQ service routine. This is deleted every code generation.Cube always seem to generate the IRQ function in STM32xxx_it.c when interrupt is enabled, So I have a conflict the interrupt service routine is defined in my own file + STM32xxx_it.c file. The only solutions I found so far:Enable peripheral IRQ in my own routine, because cube assumes it's off. But this makes it also less maintain-able, because if something is nice about Cube it's the ability to have an overview of all interrupts and levels in NVIC.Callback function disable has no effect: the interrupt service is always generated..After each code generation, I have to restore __WEAK for the generated irq service functions.I tried to encapsula
..
stm32h7xx_ll_utils.c throws a warning "no LL_RCC_CalcPLLClockFreq" function at line 930. The function exists in stm32h7xx_ll_rcc.c but has a conditional compile USE_FULL_LL_Driver.Calls to conditional compiles should be under the same conditional conditions.Cheers, Hal
Using HAL library set up RTC, but at times SKIPS seconds. WHY?This is the setup:static void MX_RTC_Init(void){ /* USER CODE BEGIN RTC_Init 0 */ /* USER CODE END RTC_Init 0 */ RTC_TimeTypeDef sTime = {0}; RTC_DateTypeDef sDate = {0}; /* USER CODE BEGIN RTC_Init 1 */ /* USER CODE END RTC_Init 1 */ /** Initialize RTC Only */ hrtc.Instance = RTC; hrtc.Init.HourFormat = RTC_HOURFORMAT_12; hrtc.Init.AsynchPrediv = 127; hrtc.Init.SynchPrediv = 255; hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN; if (HAL_RTC_Init(&hrtc) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN Check_RTC_BKUP */ /* USER CODE END Check_RTC_BKUP */ /** Initialize RTC and set the Time and Date */ sTime.Hours = 0x1; sTime.Minutes = 0x0; sTime.Seconds = 0x0; sTime.TimeFormat = RTC_HO
Hello,I worked until now with FreeRTOS. And in FreeRTOS there are Trace Hook Macros.Is there an equivalent on Azure RTOS ThreadX?Trace hook macros on FreeRTOS are a very powerful feature that permit you to collect data on how your embedded application is behaving.Key points of interest within the FreeRTOS source code contain empty macros that an application can re-define for the purpose of providing application specific trace facilities. The application need only implement those macros of particular interest - with unused macros remaining empty and therefore not impacting the application timingSpecifically I am looking for:traceTASK_SWITCHED_IN()Called after a task has been selected to run. At this point pxCurrentTCB contains the handle of the task about to enter the Running state.traceTASK_SWITCHED_OUT()Called before a new task is selected to run. At this point pxCurrentTCB contains the handle of the task about to leave the Running state.I looked at the Azure RTOS documentation but co
Good to see some familiar fac... AVATARS still here!We have some products that use the mentioned ST micro. They were using the ST supplied virtual com port USB example code and drivers from back in the Cube 1.6 days. We've seen this occurrence in 2 different products.Product 1 was using pin PC13 as an INPUT from a seldom used switch. During more or less constant communication on the USB bus at about 30 times a second, if there were random actuation of the switch input, it SOMETIMES cause the USB transmit to NOT HAPPEN ANY LONGER. All else was left working. The device just refused to transmit any longer. Turns out troubleshooting that - SOMETIMES, this causes the USB machine state to get locked in BUSY state.Product 2. Was using PC13 as a STROBE out for an SPI interface. Sure enough if that interface was engaged and sent SPI data, RANDOMLY the USB stuff just STOPPED. BOTH instances were completely resolved by using another pin. I see in the specs that PC13, 14,and 15 are a bit "SPECIAL"
Hello,I followed this guide:https://community.st.com/s/article/how-does-the-threadx-semaphore-workAnd everything works.But when I try to add a modification, a HAL_UART_Transmit - HAL_UART_Transmit(&huart2, (uint8_t *)&message, 1, 10); - in one thread I always get the error 'huart2' undeclared. Well huart2 is declared in my main.c but of course not in the app_thread.c. And there are my threads. So my question is how can I solve this error? With FreeRTOS I just created threads and all the code in my main.c so there was no issue to use HAL_UART. But I am not sure how to solve it on ThreadX?
Hello,in the Semaphore example(https://community.st.com/s/article/how-does-the-threadx-semaphore-work) there is this step:Open Core\Src \main.c – you can copy and paste the code below, but please notice the" USER CODE BEGIN", to properly place the code snippet:/* Private user code ---------------------------------------------------------*/ /* USER CODE BEGIN 0 */ #define USE_UART_PRINT void __io_putchar(char ch) { #ifdef USE_UART_PRINT // Code to write character 'ch' on the UART HAL_UART_Transmit(&huart3, (uint8_t *)&ch, 1, 10); #else ITM_SendChar(ch); #endif } /* USER CODE END 0 */The question I have is why is this step and piece of code needed? I understand the previous steps and the code that I need to add in the \app_threadx.c file. But this part I am not sure and it is not explained in the guide.Can anyone please tell why this part is needed? Thank you
Hi, does ST have it's own driver implementation of the ksz8863 switch. If yes where can i download it. I like to have an link up/down feedback. Need to have connection to the internal register of that switch. For now i just use the lan8742 driver provided by ST.
helloi am working on a custom bootloader or STM32F405.the Flash process is done correctly by the Bootloader, i checked the content of the flash.the problem happens when the bootloader jumps to the application firmware which is located at adress 0x0800C000, the program goes to the Hard_fault handler function: this is what i am using to jump from the bootloader : thanks.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.