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 am missing a description how the dual bank boot is implemented in mentioned devices.From what I found the information is missing in AN2606.Another question is how do I securely detect from which bank my FW is currently running (or rather which bank was mapped to 0x08000000).
..
Setup: I am designing on the Nucleo-G0B1REGoal: DFU via USB FW updatesAlthough the Nucleo Expansion provides a USB ST-Link interface I do not want to utilize this interface as I want to go directly to the MCU to emulate our board.For code uploads and debugging I am currently wired directly to the MCU via a SWD link (GND, NRTS, SWDIO, SWCLK) via a ST-Link V2.The SWD link to the MCU will be the method that our board is programmed initial in the factory, DFU via USB is how we will provide FW updates for the board is in the field. CUbeMX I have configured the device to USB_DRD_FS Mode = Device_Only (FS) as well as set the USB_Device Mode Class for FS IP = Download Firmware Update ClassI have configured PA12 as USB_DP and PA11 as USB_DM, CN10 Pin 12 and CN10 Pin 14 respectively on the Nucleo.I will be connecting a USB Micro-B breakout board to PA12 USB_DP to D+ on breakout and USB_DM to D- again on breakout as well as PWR and GND.So I have a few questions....Once I make the USB connections
Hi,I have a USB host HID FS/LS on a nucleo board (also on definitive hardware this happens). It works with several keyboards (Logitech, Acer, china trades, ...).Today, I connected an HP slim keyboard 803181-071 SP provided with my computer and after reset it doesn't initititate the enumeration. Using a logical analyser I see that both lines DP+ and DM- go high after connecting the usb host and there are 3 to 4 pulses around 50us. I suspect whether this could be a "chirp" sequencie trying to connect to the USB FS/LS host. To fix it, I needed to add a short delay around 1~2ms inside the library function HAL_HCD_Connect_Callback(), to ignore those 3 or 4 short 50us pulses that take around 200us. Can this delay do any harm? Should this delay be already provided on the HAL USB library? To achieve this delay, HAL_Delay(2) can not be used because would be called inside the ISR HCD_Port_IRQHandler and will get blocked. I used a for to 20000 @ 120MHz to get 2ms.I'm using CubeIDE 1.11.0 and last
Hello,I'm currently facing an issue with a basic project to setup the SDMMC1 peripheral where the function HAL_SD_Init() fails. The issue is happening inside HAL_SD_Init(), in SD_PowerON(), where it always returns HAL_SD_ERROR_UNSUPPORTED_FEATURE. I'm using a custom board with the STM32H743XI MCU with an external clock of 26MHz and the STM32CubeH7_FW_H7_V1.11.0 package.Please find below a picture of the STM32CubeMX Clock configuration:Here is the code that setup the clock:void hw_port_clock_init(void) { hw_clock_system_clock_init(); hw_clock_init_peripheral_clocks(); } static void hw_clock_system_clock_init(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_SCALE1); while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) { } __
Specifically, will using the STULPI01 allow a low-speed device to connect via a hub to the OTG-HS USB interface, or is this bug not actually in the internal FS-PHY, but in the controller?
On the newer chips, such as the U5 series, FreeRTOS support is underwhelming in CubeMXIDE. I have, and did, use FreeRTOS. I tried AZURE in a C++ programming environment and found several problems, one to do with systick, another to do with tasks, ownership, and whether or not a task would even work when owned by a class. We won't get into the rewrite of how queues work, which is an extreme limitation when compared to FreeRTOS.So I've tried AZURE, and while there are some nice features, I'm concluding that the ideal AZURE environment is plain C, and very limited queue size.Try programming in C++ (a graphics display system, classes for I/O, communications and the like) where classes and inheritance actually work well, and AZURE comes up wanting.FreeRTOS is not perfect, but after developing enough of an infrastructure using it, it's workable.So I'd propose the following questions:1) when are we going to get FreeRTOS support in CubeMXIDE for the U5 series? Even limited support would be use
Hello all,at the moment I use the HAL function HAL_UARTEx_ReceiveToIdle_DMA to receive the data from the UART. This works very well but I have a timing problem because I want to send and receive a lot of bytes. To speed this up I want to use the LL functions. Is there an example to achieve the same functionality as with the HAL functions ? Many greetings and thanks, Lena
We are trying to implement application which starts from location(eg. 0x0806 0000 of the flash) which other than default 0x0800 0000.As per STM32F765 reference manual and AN2606 performed following steps,Switched to Dual bank mode of flash, nDBank = 0Enabled dual boot mode by nDBoot = 0nBoot0 pin is pulled low in the HardwareAs nBoot0 pin is pulled low, Boot memory base address is defined by value hold by register BOOT_ADD0[15:0] Wanted to boot from flash at location 0x0806 0000. Hence putting value as 0x2018 into register BOOT_ADD0[15:0]. ( Value to be written in BOOT_ADD0[15:0] = Starting location(0x0806 0000) right shift by 14(divided by 16384)).In the linker file define symbol __ICFEDIT_intvec_start__ = 0x08060000With above mentioned steps, when MCU is reset without running ST-Link, unable to execute code/unable to run application.Am I missing any steps, could you help with this.Thanks!
STM32F4xx_StdPeriph_Lib_V1.9.0
Hello, we are using single frame buffer at the moment and loading binary resource file from flash into 32-bit SDRAM. Previously we set out LCD Clock to 71Mhz but due to severe flicker and jitter on window switching, we reduced the clock to 40Mhz and got rid of the jitter. However the new window still flickers. Does anyone have recommendation to eliminate this flicker effect?
HiI'm using MikroC and try to play with FlashMy problem: even if area seem ok between "bootloader" and "program", I can see program area is not complete and is writed in bootloader area.If you can help me ... thanks !#pragma orgall 0xC0 /? #define BOOTLOADER_START_ADDR 0xC0 #define START_PROGRAM_ADDR 0x1900 #define FLASH_SIZE_STM32F051K6U6 16000 #define FLASH_BACKUP_ADRESS ((FLASH_SIZE_STM32F051K6U6-START_PROGRAM_ADDR)/2)+0x1800 void main() org 0xC0 (bootloader) { char x1=0; SetIOs(); Led_Red UART1_Init(9600); Delay_100ms(); if(x1)FLASH_MOVE(START_PROGRAM_ADDR,FLASH_BACKUP_ADRESS,FAUX); / if (0) //UART1_Write_Loop('g','r')) { Start_Bootload(); // "r" recu -> start bootload } else { Start_Program(); } } void program org 0x1900 (after boot control) { uart1_write_Text("ESSAI"); &nbs
I have a setup as required by the HID_standalone example program. When I am starting the program the keyboard that is connected to CN13 is properly recognized (last two sentences on the screen are: KeyBoard device found! andHID class startedWhen I then start HID, the program tells me to enter characters via that connected keyboard. Iam doing that without any response. What is wrong?Rgds.,Wilfried
Hello,In the past we have utilised the system bootloader on the STM32F429ZIT6, to implement a command to allow firmware upgrades to be completed by the end user. As part of this, the command would configure an LED Driver IC to update an RGB status LED, giving the user an indication that they are in bootloader mode. This works great, and led to the assumption that the system bootloader does not reconfigure pins that are not used as by any of the interfaces listed in the application note AN2606, since if this was the case, the LED would not stay on since an enable pin needs to be held high by the STM32.We are now looking to implement the same firmware upgrade command on a different product that uses the STM32G473VET6TR instead, and have not had as much success.It appears as though once you enter the system bootloader, the LED enable pin (PD2) is reconfigured since the line is no longer being driver high by the STM32.For some context, I have included the function that we are using to swit
I have written a Custom Bootloader for STM32H743. It resides at 0x08000000 (Sector 0) and occupies for a maximum of 1 sector (128KB). The main application resides at 0x08040000 (Sector 1 thru sector 7). Upon reset, Custom Bootloader starts and checks to see if user wants to do a firmware update. If not, it jumps to the main application. Within the main application, if user decides to do a firmware update, then the main application jumps to the custom bootloader. All that works fine. However, upon return to the bootloader Systick does not tick (HAL_Delay) does not operate! Why?Note that all the standard initialization do take place including the HAL_Init() and SystemClock_Config(). I am using SPI4 and USART2 in the custom bootloader and all get initialized properly and everything works except for Systick! Please assist.Thanks.
Hi!I have followed the tutorial on Youtube.•STM32L4 training: 07.3 Advanced peripherals - Hands-on DFSDM(L476) And now I have some data in playbuff.But I couldn't find any information about the data. Is there anyone knows what kind of format is it? Or Is there anyone knows how can I change these data in playbuff into wav.?Here are my current devices:Micro-Controller: STM32L496GDISCO
HI!I'm trying to impelemnt watchdog on my CAN devices, but i cannot force CAN error for testing.hcan1->ErrorCode is always 0 value, even if i disconnect CAN and no device are acknowledging message(no ack have its own error code in HAL).I see on oscilloscope, theres no ACK. Why i cant get this error?there's the way im sending frame. And frame is sending every time(see it on oscilloscope)if (!HAL_CAN_IsTxMessagePending(&hcan1, canTxMailbox) && HAL_CAN_GetTxMailboxesFreeLevel(&hcan1) > 0) { if (HAL_CAN_AddTxMessage(&hcan1, canTxHeader, canTxData, &canTxMailbox) != HAL_OK) { Error_Handler(); } else { HAL_IWDG_Refresh(&hiwdg); } }
Hello,According to https://www.freertos.org/Stacks-and-stack-overflow-checking.html, i.e. the FreeRTOS reference, one needs to set configCHECK_FOR_STACK_OVERFLOW to 1 or 2 in order to activate stack overflow checking. In case of a stack overflow FreeRTOS should call void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName)I activated the mechanism in the ioc configuration file but I observe that vApplicationStackOverflowHook is called each cycle and not in case of a stack overflow i.e. the stack overflow mechanism implementations themselves are missing. The hook should be called in case of abnormalities if I understand the documentation correctly and not each cycle.Is my analysis correct and if so, does anybody have a reference to the proper implementation of this mechanism?
Currently looking to design a board with STM32H7 with two independent cellular modems, each on their own USB port to the STM32H7 processor. I have USBX working with one of the controllers, would like to know if there is any example of using USBX with both controllers, or if this is even possible.
I Am facing another issue with this board.Her is my USB settingUSB_OTG_HS is Device OnlyNVIC SettingsUSB OTG EndPoint In/Out 1 INT checkedGLobal Int checkedUSB DeviceClass Virtual PortThen the init fails in USB_CoreReset with timeout.I checked the HAL_PCD_MspInit and pins looks OKay.static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx) { __IO uint32_t count = 0U; /* Wait for AHB master IDLE state. */ do { count++; if (count > 200000U) { return HAL_TIMEOUT; } } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); /* Core Soft Reset */ count = 0U; USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST; do { count++; if (count > 200000U) { return HAL_TIMEOUT; <<<<<<<<<<<<< FAILS } } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST); return HAL_OK; }I just discovered that My USB config /**USB_OTG_HS GPIO Configuration PC0 ------> USB_OTG_
Can anyone suggest me some easy tips/libraries to play or decode those mp3 files to the speaker.
I'm programming an STM32L4R9 through SPI according to the AN4286 application note.The problem I have is that after a global mass erase command (0x44) it won't let me execute the read memory (0x11) or the write memory (0x31), even if I wait several seconds after the global mass erase.To solve this, I must after global mass erase restart the MCU into bootloader mode again, then read memory and write memory commands work.I have previously used my bootloader client for the STM32F429 and it had not this problem.Anybody knows why it behaves like this?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.