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
hi, im using stm32g474vet6 tim_bkin for pwm shutdown through external pin, when im normally using pwm only tim break interuppt is happening, pwm is shutting down but if im using same timer in triggermode for another timer and pwm generation, tim_brk interruppt is not working, even the external interuppt signal itself not coming in irq handler and get flag also not coming.what will be the reason any configuration issues.configuration:both the normal and complimentary pwm is enabledossi bit is settimer break interuppt is enabledexternal input pin is opendrain and pulldown mode
Hi supporter,I have one question: I want to change Port Role when no cable connect, can I do it?my behavior:Init usbpd with default role is Sinkwhen my application running, I see my adapter plugin, I want change my port to sinkCan I do that?
I need to set up an HTTPS server over USB using the STM32U5A5 microcontroller. I do not see an example of this configuration. There are examples of HTTP servers for other microcontrollers using USB, but not HTTPS and not for the U5A5. Is it possible to make an HTTPS server over USB? How do I start? Is there example code for the U5A5 Nucleo development board?
Platform Nucleo-H563ZICubeIDE V1.15.0ioc file attachedI'm starting with a simple app to get fimilar with the new Middleware.I created a new STM32 app and enabled ThreadX and FileX.I also changed the recommended settings for IChache and the system timer (TIM2)I enabled the BSP LEDs, button, and virtual serial port.For ThreadX I enabled the core and used static allocationI tried a pool size of 2048 and 8096 with the same resultsFor FileX I enabled the core and checked the 'Internal RAM Interface' settingI tried SRAM3 and SRAM1 with the same resultsI created one user thread and put the following in it.while(1){tx_thread_sleep(10);BSP_LED_Toggle(LED_GREEN);BSP_LED_Toggle(LED_YELLOW);BSP_LED_Toggle(LED_RED);}The first thing I noticed is that the BSP init code is placed afterMX_ThreadX_Init(), and does not get executed.I copied that code before MX_ThreadX_Init()If the call to create the FileX thread in tx_application_define() is executed,the code crashes with the cursor at the top of _fx_uti
Hi,STM32U585 + eMMC , by SDMMC2 busI want to configure the eMMC into sleep mode by HAL_MMC_SleepDevice API,but It does not workIt alway return 0 when I get the card state by HAL_MMC_GetCardState after run the API HAL_MMC_SleepDevice.Thanks!
Hi,I went through quite some earlier posts on this forum regarding DAC setup, but none of those are relevant to me nor helped me.I am trying to setup a DAC on a STM32F756VGH6 via registers. I read all chapters about the DAC in the datasheet and it looked like quite a simple peripheral on this mcu, as it there is very little setup needed to be done (I just selected the trigger mode, enabled it and enabled the DAC1 itself on pin PA4.) My goal is just to setup a simple DAC without any continuous waves, DMA etc. Just a constant analog voltage value that I write to a register.However, my problem is that I do not get anything on the DAC pin (always 0 V). I tried to put an external pulldown resistor, pullup resistor, but none of those worked. I also tried with both enabled and bypassed output buffer modes but that did not change anything either. I also tried to setup the PA4 pin as GPIO to blink some led, to see, if the pin itself was working, and everything was just fine...It will eithe
I have created a very minimal prototype project with ThreadX on the NUCLEO-H563ZI board. I have a single task that blinks a LED on and off. I would like to prove out an example with FileX using SRAM. I have enabled FileX via CubeMX with the default settings. I am having issues with the project hard faulting. I was running into the same issue reported here: Re: FileX help - STMicroelectronics CommunityAfter creating my own array and base address, I was able to succeed in initalization, but then hard fault trying to create a file. Is there any basic example showing ThreadX with FileX, using SRAM, that has the basic settings needed in the ioc?Thanks
Has anyone used rbm78bln's STM32duino bootloader, https://github.com/rbm78bln/STM32duino-bootloader_stm32f411-blackpill on a STM32F401RCT6 MCU ?As the bootloader is aimed to support STM32F401xE, what configuration settings in the source code do I need to change to get it working on a STM32F401RCT6 MCU ? I don't have an account on github, so if any kind soul can answer this or can forward my query to rbm78bln (Ralf M),I will be most appreiciated.Thanks in advance.Many thanks.
I use a STM32H5 with STM32_Safety_STL v4.0.0 library. Development tool IAR 9.60.3Using the project NUCLEO-H563ZI without TrustZone in X-CUBE-CLASSB-H5 and compiling it, I have the following linker error:"Error[Lt069]: The module stl_sch_main.o(STL_Lib.a) (and 13 more) has DSP-support enabled, but the current CPU does not."SOLVED enabling option on 32bit tab: "DSP extension"
There's a bug in the standard MPU_AdjustRegionAddressSize which appears everywhere in the sample code. My reference is the H7RS, it's in the Template and virtually all examples: H7RS Github example The net result is that it's likely noncacheable regions (particularly large ones) will NOT be properly marked as noncacheable. There are two sections to this function--the first, where the size is rounded to the next greater power of 2, works just fine. As an example, I have a memory region of 207,712 bytes. It correctly turns this into a "17" which is the code for MPU_REGION_SIZE_256KB (0x11 -- see stm32h7rsxx_hal_cortext.h).HOWEVER, the second section is incorrect. It does not adjust the base address of the region to be on a matching size boundary. Further, after the adjustment, it's possible that the size no longer encapsulates the region you're targeting.For example, assume my start address is 0x24032000. This is not valid because it's not an even multiple of 256k&nb
I'm currently using a NUCEO-U5A5ZJ-Q development board and having an issue jumping from the Application code into the Bootloader. Two major issues are the Application is running ThreadX, and the board has the TrustZone enabled.Through experimentation, I've determined how to successfully jump into the bootloader when the TrustZone is disabled. Effectively, the code to jump into the bootloader must be done BEFORE executing the "MX_ThreadX_Init( )" instruction in main.c. Any attempt to jump into the bootloader after the MX_ThreadX_Init call results in a HardFault during the execution (initialization?) of the bootloader code.However, now with the TrustZone enabled, I have been unsuccessful at bringing up the bootloader code without a HardFault being generated. The jump into the System Memory bootloader at 0x0BF90000 is successful, but always results in a HardFault due to trying to access a NULL value during the execution (initialization?) of the bootloader code.Is there any advice you can
In a nutshell, as you turned on the UART register callback option as shown in the figure below, the virtual com port fails to print any items.After further inspection, I believe it is a bug in `stm32g4xx_nucleo.c`, under function `BSP_COM_Init`. It seems like someone forget to index the `IsComMspCbValid` to find the validity of the given `COM`, as shown in code below. #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) static uint32_t IsComMspCbValid[COMn] = {0}; #endif /** * @brief Configures COM port. * @PAram COM COM port to be configured. * This parameter can be COM1 * @PAram COM_Init Pointer to a UART_HandleTypeDef structure that contains the * configuration information for the specified USART peripheral. * @retval BSP error code */ int32_t BSP_COM_Init(COM_TypeDef COM, COM_InitTypeDef *COM_Init) { int32_t ret = BSP_ERROR_NONE; if(COM > COMn) { ret = BSP_ERROR_WRONG_PARAM; } else { #if (USE_HAL_UART_REGISTER_CALLBACKS == 0) /* Init the UART Msp */ COM1_MspInit(&am
Hi everyone,I encountered a challenging issue while using GUIDRV_LIN_OSY_16 with STemWin on an STM32 project. After much debugging, I found a solution and wanted to share it here to help others.I changed the driver to rotated the display. From GUIDRV_LIN_16 to GUIDRV_LIN_OSY_16.The problem was related to the framebuffer width (layer_prop[LayerIndex].xSize).When the display is rotated using GUIDRV_LIN_OSY_16, layer_prop[LayerIndex].xSize is automatically updated from the original 800 (XSIZE_PHYS) to 480.However, the framebuffer itself does not rotate, meaning its width in memory remains 800 (XSIZE_PHYS).As a result, using layer_prop[LayerIndex].xSize in calculations caused incorrect framebuffer address computations, leading to drawing errors and background refresh issues.Solution:I fixed the issue by replacing layer_prop[LayerIndex].xSize with XSIZE_PHYS in both the framebuffer address calculation and the DMA2D_FillBuffer() call. Here is the corrected version of my CUSTOM_FillRect(
I'm working on a custom PCB with a STM32F429ZIET6 MCU interfacing with a LAN8742A ethernet PHY. We only use static IP, and UDP communication. Our design has 28 devices all set to unique IPs on the network, which will be controlled over a proprietary protocol using UDP. The issue is that ethernet sometimes takes up to 15 minutes to start communicating. In some setups, the issue seems to be more reliable. For example setting a device up on a switch that only has a PC connected to it for communication, seems to be the best success rate. If we setup the same device on a router running DHCP, the issue becomes much more regular, probably 80%+ of the time the device will take 3.5 - 15 minutes to begin communication. What I've observed in software is that the link status comes "up" on boot within the first 5 seconds of boot, and most of the time instantly. If this happens, communication is successful. We're currently setting up a test to run a device for 5 hours and verify that once the l
Hi everyone,I'm currently working on a project where I need to use Port1 IO[7:4] of OCTOSPI1 on the STM32H735IGT6 MCU to interface with a MT25QL512ABB NOR Flash in Quad-SPI mode with dual-quad mode disabled.I configured the OCTOSPI1 peripheral in CubeMX as follows:Mode: Quad SPIClock: Port1 CLKChip Select: Port1 NCSData [3:0]: Port1 IO[7:4]After generating the code and implementing test logic for writing, erasing, and reading from the NOR Flash, I observed the following:Clock and Chip Select signals are fine (verified using an oscilloscope).IO[7:4] signals are null (unchangeable), meaning no data activity is visible on the lines.My test code follows the standard configuration steps to enable writes, send commands, and perform operations like erasing and programming. I even tried reinitializing the peripheral in a loop for multiple operations, but the IOs remain inactive.I'm attaching a screenshot of my CubeMX configuration and some excerpts from my code: int main(void) { /* USER
I downloaded the firmware STM32Cube_FW_G0_V1.6.2 for testing code using the development board NUCLEO-STM32G071RB. However, the folder ../Drivers/BSP/STM32G0xx_Nucleo is missing. Where can I obtain it and the nucleo-specific files?Thank you!
I tried the bsp example among the examples of the stm32 h7s78-dk board. I integrated it into my own code. My aim is to use the LCD screen and broadcast the camera output on it. In the first stage, I try to print any text on the screen. The BSP example code works but cannot be debugged. I also get an error about pll3 when trying to initialize lc in my own code. I have shared the reasons for the error step by step in the pictures while debugging.
I have a USB-Audio source for STM32F446MC.I would like to add an HID and run Next Track etc.The USB analysis tool recognises the HID descriptor, but the HID report descriptor is not recognised.When I traced it with a debugger, I found that no USB_REQ_GET_DESCRIPTOR request was received from the host in the HID setup function.What do you think is the cause?
I am using the USB PD driver package on an STM32G071. I have 4 ports. Two are SNK and the other two should operate as SNK unless I have a power source.First issue is DRP will not work unless you also enable CAD role toggle in the configuration. If you don't enable that then it does not detect the cable from what I can see. Does anyone know why this is or a way to change it?Second question, is there a way to manually control the behavior of the DRP port? I'd like it to be a SNK until my power source is connected. Then and only then I'd like it to be DRP.
Hello Everyone,I have a STM32H755 MCU connected to an external ADC via SPI in half duplex. I'd like to read ADC value at 2KHz. Ideally I'd like to avoid to interrupt the CPU 2K times per second to read ADC values, as a consequence I'm looking for a way to trigger SPI reading without CPU intervention. Is it possible ?Please note, my MCU is master on the SPI. Regards,
In the function:HAL_RTCEx_DisableBypassShadow()There is a cast to uint8_t in the line that resets the bithrtc->Instance->CR &= ((uint8_t)~RTC_CR_BYPSHAD);This causes the upper 24 bits of this configuration register to be cleared to 0s when called. Everywhere else I looked in the HAL RTC code when resetting bits in this register it is using a (uint32_t) cast.This was found in the library:STM32Cube_FW_L4_V1.7.0as well asSTM32Cube_FW_F4_V1.21.0
Hello,I'm trying out both the DMAs on the STM32H7S3L8. I am trying to keep it as simple as possible, so I am not using linked list mode (I think. CxLLR is 0). When using HPDMA, I get a Data Transfer Error when trying to copy from SRAM1 to DTCM. The datasheet says the following:Specifically, note that it seems to suggest it is possible for HPDMA to access CPU TCM, which I assume to be/include DTCM.My code is mostly baremetal and difficult for me to condense into a simple example (though I will try to do so needed). The following are the highlights which might be useful :I am using HPDMA1 Channel 0 in privileged mode in the Boot domain. I do not have an application domainI am attempting to copy 0x100 bytes from SRAM (at 0x240002b4) to DTCM (at 0x2000002c)I am using a burst length of 8 on both the src and dest, with width of 1 word (0b10) on both. Both SINC and DINC are enabled.No repeats configured, no offsets configured, none of the increments are set to negative.No linked list is used.
Hi, i have STM32F767 and im using FreeRTOS V2 and lwIP. Im facing known bug which should be fixed in FW_F7 V1.17 and im using FW_F7 V1.17.2 and still facing this. When i connect the ethernet cable, after 2 seconds FW is stuck at following place: I tried to disable DHCP everyting is ok, but when i try to ping the board the result is the same. Can you help me to solve this issue?
Hello,I am working on stm32h7s78-dk board and I m running a simple LED toggle code in while loop. So, the MCU is getting stuck and my LED is blinking continuously. So, anyone has any solution for this please give your inputs on this. Thanks,
Hello everyone.I am following this project: https://github.com/viktorvano/STM32-Bootloader to create my own bootloader in a STM32H7, unfortunately the dual core of this device make the memory location a little bit tricky, is there any open project for bootloader on this device?Best regardsAlan Blumenstein
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.