Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I am trying to configure a single microphone with a pulse-density modulation (PDM) output on my microcontroller (STM32U575ZIT). It's a CMM-4030DT-261280-TR MEMS microphone.But I can't seem to figure out the basics. The SAI settings mention "Frame Length", "Data Size" and "Slot Size". What even are slots and frames in this context? I think I understand PDM and it makes sense to define a data size: how many bits should be counted together to form a single data point. The other notions however confuse me.Attached is my SAI config from CubeMX. I logged the clock and data using a logic analyzer some testing code on the MCU hoping to figure this out. The code: HAL_SAI_Init(&hsai_BlockA1); std::array<uint8_t, 8> data; data.fill(0); auto ok = HAL_SAI_Receive(&hsai_BlockA1, data.data(), data.size(), 100); HAL_SAI_DeInit(&hsai_BlockA1);The analyzer output and the content of data after this block: For one I am surprised to see 37 rising edges, instead of 8
I cannot get the VCP function of ST-LINK v3 mini working.Windows sees the com port and can open itConnected TX output of UART to pin 14 of ST-LINK 3 mini, but nothing is received on the PC side.Connected some other serial TTL-USB adapter (set to 3.3V), and it works properly.However, the serial TTL-USB adapter has a ground connection and ST-LINK's VCP has common ground with other functions.The debugger function works properly.Is the TX level of VCP 3.3 or 5 V? Does the VCP function work for anyone?Thanks,-- pa
Hi, I have a question about supplying power to DSI interface on STM32H747BGT6 (208 LGFP package).RM0399 says, "The DSI interface is supplied from a dedicated VDD12DSI supply that can be provided eitherby the integrated DSI regulator or by an external DSI supply."The figure also shows the two ways to supply 1.2V to DSI PHY. As far as I read from RM0399, if I want to supply 1.2V to DSI PHY with DSI regulator, I should first deliver 3.3V to VDDDSI, and connect VCAPDSI to VDD12DSI. But the pinout diagram of STM32H747BGT6 (208 LGFP package) has no VDDDSI but only two VDD12DSI.What I would like to ask is:1. Does this mean STM32H747BGT6 (208 LGFP package) is limited to external 1.2V supply to VDD12DSI only or is one of the VDD12DSI the intended "VDDDSI" for internal DSI regulator?2. Whats the recommended capacitor value for VDD12DSI pins on STM32H747BGT6 (208 LGFP package)?Thanks in advance.
Hi All ,Am imported a example project in stm32cube and i tried to build am getting error as Description Resource Path Location Typenon constant or forward reference address expression for section .ARM.extab LTDC_Paint line 90, external location: c:\st\stm32cubeide_1.6.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.win32_1.5.0.202011040924\tools\arm-none-eabi\bin\ld.exe:D:\stm32_projects\exp1\LTDC_Paint\STM32CubeIDE\STM32H750XBHX_FLASH.ld C/C++ Problem can u please provide the solution.thankyou,regards shiva chary
I just spent some time debugging a fundamental compatibility issue between an MPU and its RAM, and I wanted to share what I learned to save others the same headache. I was looking at using the STM32N657 (a powerful Cortex-A7 MPU) and almost made a critical error by assuming it could work with a common SDR SDRAM chip like the W9825G6KH-6. Spoiler Alert: It can't. Here's why. The STM32N657 has a DDR3/LPDDR2/LPDDR3 memory controller. The W9825G6KH-6 is an SDR SDRAM. These are two completely different, incompatible memory technologies. Think of it like trying to put diesel fuel in a gasoline engine. Both are fuels, but the underlying technology and "communication protocol" are entirely different. Post edited by ST moderator to update the wrong product name "STM32MP657" to "STM32N657".
Please tell me how to enable FTD in X-CUBE-MATTER. Is it possible to have it function as a Thread Router?
Hi, Im planning on using STM32H747BGT6 in LDO mode only and no USB interfaces will be used. What should I do with SMPS pins (VSSSMPS, VLXSMPS, VDDSMPS, VFBSMPS) and USB supply pins (VDD50_USB and VDD33_USB)? The datasheet nor the application note don't say much about what to do with these pins when not used.Thanks in advance.
Hi All,I'm new to using the STM32 and honestly had great grief trying to connect to the chip.I'm using STlink V3 and designed my own PCB.Trying to flash a F/W to the PCB. I ordered the PCB from JLCPCB.I keep getting unable to get core ID as a message and I can't figure out why?I seem to be able to connect for a few seconds but than i get a message, unable to get core ID and it disconnects.When I compile a code and try to flash it, it also tells me flash successful but I don't think the code got flashed successfully as the chip doesn't work as expected and also I am still unable to connect to it and i get messages unable to get Core ID.Any help or suggestions? I have the RST connected to GND with a resistor, schematics attached.
Hello ST, I am having some trouble generating two PWM signals for a push pull converter. Ideally I would like the PWM outputs to look like this, I would like the PWM frequency to be 100kHz and a duty cycle range of 0% to 50%. I have connected the push pull converter to PA0 and PA1. First I configure the GPIO Pins, void MX_PWM_GPIO_Init(void) { GPIO_InitTypeDef GPIO_InitStruct = {0}; /* Enable clocks */ __HAL_RCC_TIM2_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); /* Configure PA0 for TIM2_CH1 */ GPIO_InitStruct.Pin = GPIO_PIN_0; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF2_TIM5; //CH1 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* Enable clocks */ __HAL_RCC_TIM5_CLK_ENABLE(); /* Configure PA1 for TIM5_CH2 * NOTE: Using CH2 on PA1 to avoid conflict with TIM2_CH1 on PA0 * You can use different pins if needed */ GPIO_InitStruct.Pin = GPIO_PIN_1; G
The datasheet for STM32U585 and 575 list there are two SAI on the chip. In CubeMX I can only see SAI1 (A and B sub-blocks)Datasheet CubeMX pin menu
Hello,Please suggest me some library for NR24L01 which is prefectly working. It should based on C language. I search few posts but many libraries are not working as I could see in comment section. Regards,Manoj Hiwarkar
Hi everyone, im using an STM32WB and i just managed to get my own BLE<->UART bridge to "half work".But my problem is about UART managing.If i receive data with length of less than 247bytes(set by me) just stays in the rx bufer and no DMA transfer complete happens.I set up the DMA to listen for the next incoming 247 bytesHAL_UARTEx_ReceiveToIdle_DMA(&huart1, NotifyCharData, RxBuf_SIZE); __HAL_DMA_DISABLE_IT(&hdma_usart1_rx,DMA_IT_HT);//we dont want the half done transaction interruptWhenever the data arrives(stream of data uartRx) ,it gets written into a BLE characteristic, everything works like a charm, but if the last uart received message is less than 247length DMA rx doesnt trigger after an idle time.No IDLE event occurs./** * @brief Receive an amount of data in DMA mode till either the expected number of data is received or an IDLE event occurs. * @note Reception is initiated by this function call. Further progress of reception is achieved thanks * to DMA services,
Hello,In the STM32CubeC0 v1.4.0, when I enable the BYPSHAD bit in the CR register and later try to deinit the device, I get an ERROR. It does not happen if I disable it before deinitialising. Should I disable it by hand, or is it a mistake and should be cleared as in other families? HAL version is clearing the whole register to the reset value when deinitialising.Best regards,Tomáš
Hopefully this is not a dumb question...I am referencing the example code here:https://github.com/STMicroelectronics/STM32CubeG4/tree/master/Projects/STM32G474E-EVAL/Applications/OpenBootloaderI see the entry point for the the open bootloader app (app_openbootloader.c), but I don't see where the actual core files for the the bootloader are ( ie openbl_core.c)Where would those files be in that project? Do I just download those files from here seperately? https://github.com/STMicroelectronics/stm32-mw-openbl/tree/main/Core
Hi,We are building an IoT device, using STM32L476RET6 as main core. It communicates with an LPWAN modem with AT-commands via UART. We have redirected UART2 into external pins for "serial output" into Nucleo RX pins.During testing, we noticed initially that some devices where seemingly "stuck" in some state - no printing in Nucleo RX, not responding to external interrupts - while communicating with LPWAN modem ( it stayed in idle ON state). No hard fault or similar (we have put checks inside repsective callbacks). IWDG can reset the device, but it is a "last resort" method.After putting device in debug mode, catching the situation and pausing the code, it stopped here : void HAL_UART_IRQHandler(UART_HandleTypeDef *huart) { uint32_t isrflags = READ_REG(huart->Instance->ISR); uint32_t cr1its = READ_REG(huart->Instance->CR1); <<<-------Looking at USART1 ISR register, we found ORE error flag.Resuming the code in debug mode makes the MCU continue, but in run
Hello everyone, I'm writing in search of some help, as I'm not sure what else to check. I have just built a custom board controlled by an STM32WBA65RIV6, and I'm trying to connect it via DFU mode. Everything seems to be set up correctly, but the device is not detected by my computer (a MacBook). What is working:I can successfully flash the processor via ST-Link (SWD).I have run a simple test program (toggling a pin high/low every 3 seconds) without issues. This confirms the chip is alive and basic operation is fine.DFU Setup & Debugging Steps Taken:The BOOT0 pin is pulled up to 3.3V with a 10k resistor to enter the system bootloader (DFU).I've confirmed this works: when BOOT0 is high, my test program does not run. When BOOT0 is pulled low, the program runs. This confirms the boot mode selection is working as intended.I have double-checked the D- (Data Minus) and D+ (Data Plus) lines for continuity and to ensure they are not swapped.I also (after initially forgetting)
Post edited by ST moderator: This post has been translated from Chinese to comply with the ST Community guidelines. Please use English language as it's an international community and to let others to understand your post. Thank you for your understanding.
What does DMA Request synchronization do? In the case of SPI_Rx does it trigger SPI reception when TIM12 updates (overflow) if i set synchronization signal to be TIM12 TRGO
I am attempting to display to an ILI9881C based panel. After successfully initialising and testing the panel using DSI only, I am working on DSI Video mode to pull data from a frame buffer via LTDC.I have the DSI configured as follows static void MX_DSIHOST_DSI_Init(void) { /* USER CODE BEGIN DSIHOST_Init 0 */ /* USER CODE END DSIHOST_Init 0 */ DSI_PLLInitTypeDef PLLInit = {0}; DSI_HOST_TimeoutTypeDef HostTimeouts = {0}; DSI_PHY_TimerTypeDef PhyTimings = {0}; DSI_VidCfgTypeDef VidCfg = {0}; /* USER CODE BEGIN DSIHOST_Init 1 */ /* USER CODE END DSIHOST_Init 1 */ hdsi.Instance = DSI; hdsi.Init.AutomaticClockLaneControl = DSI_AUTO_CLK_LANE_CTRL_ENABLE; hdsi.Init.TXEscapeCkdiv = 4; hdsi.Init.NumberOfLanes = DSI_TWO_DATA_LANES; PLLInit.PLLNDIV = 119; PLLInit.PLLIDF = DSI_PLL_IN_DIV3; PLLInit.PLLODF = DSI_PLL_OUT_DIV2; if (HAL_DSI_Init(&hdsi, &PLLInit) != HAL_OK) { Error_Handler(); } HostTimeouts.TimeoutCkdiv = 1; HostTimeouts.HighSpeedTransmissio
Hello everyone, I am using an STM32 microcontroller and I am facing a problem when I try to mount an external flash memory. The problem is inside the function lfs_dir_fetch which is returning unexpected values in the test buffer here: struct lfs_disk_dir test; int err = lfs_bd_read(lfs, tpair[i], 0, &test, sizeof(test)); lfs_dir_fromle32(&test); the returned values are: Invalid size: test.size = 335610112, block_size = 40960 Invalid size: test.size = 335610112, block_size = 40960 lfs error:495: Corrupted dir pair at 0 1 lfs error:2214: Invalid superblock at 0 1 (*)Error in mounting external flash memory I have successfully communicate with the external flash, since I am able to read its manufacture ID. I have also configured properly the littlefs function and I test them by writing raw data to the external flash and I was able to receive them correctly. I cannot understand what is the test variable that is being declared and why
Hi, i am planning to use Steval Stwinbx1 to setup an IOT network for condition monitoring of wind turbine blades. i would like to know whether this board is compatible with Microsoft azure as the B-U585I-IOT02A Discovery Kit has the same micro controller in it. i would also like to know whether it is possible to monitor the data from sensors online since the board has a WIFI with azure or AWS or any other cloud serviceskind regards Jose John
So I made a custom bootloader that I use to update the MCU firmware. So I have both the bootloader and the main app in the Flash. What I wanted to do, is to write on a specific address (out of bootloader and application, of course) a kind of a flag that notifies the app when it is necessary to go to the bootloader to update the firmware. Any clue on how to do it? I am using a STM32U585, using the B-U585I-IOT02A board. Thank you!
I like to use SPI in continous DMA mode together with a SPI-slave that uses the falling-edge of the spi clock (AS5048A: https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5048a-high-resolution-position-sensor). So, I have to use CHPA=1. But setting this, the NSSP hardware management does not work.I'm looking for a solution that makes continous dma handling possible. As a workaround I am using an interrupt-trigger GPIO solution for the NSSP pin. But that results in a interrupt load, that would be unneccessary, it the dma could operate circular continous.I there another workaround? Maybe using some hardware modification?Thanks!
Hello, I'm using Nucleo H723ZG.In my project, i need to detect a rising edge to trigger a callback. What i have done is that i setup a GPIO as external interrupt, and i verified the code by manually connecting and releasing from 3v3 pin. The actual signal i want to trigger is high for approx 38ns , and the callback is not triggering.What is the best solution for this?System operating at - 480MHzPeripheral clocks - 60MHzTimer clocks - 120MHz edit : Can i use Timer input capture for that, does using it in one pulse mode mean it detects a rising edge and then resets until next trigger (as a slave timer)edit: I tried the timer input capture too, but still same effect, I used the HAL_TIM_IC_CaptureCallback , One pulse mode is enabled, it is in slave mode, I even applied a 1MHz signal still callback is not triggering, when i applied a 100KHz signal the callback triggers properly. edit: upto 400KHz signal the below callback is properly triggeringvoid HAL_TIM_IC_CaptureCall
Hi ST Community,once again I have found a USB PD Specification violation, that I can't find the reason for:Source operation: According to USB PD Spec the order of action is as follows:1. Detect Sink using CC lines and only if sink is detected continue with the next points2. Enable VBus to safe5V3. Once safe5V is applied send source capabilities message However current implementation of the ST Stack does not care about the state of VBus. It starts immediately sending out source capabilities messages.I guess the problem is that PE Task is started immediately on Attach event in USBPD_DPM_CADCallback. And it never checks for the bus voltage. I composed a crude minimal example that does not even do anything when it should enable VBus but still source capabilities message is blown out immediately. Please find the minimal example attached. Did I miss anything? Will I need to find a workaround or can we get a fixed version of the library?Best regards,Adrian
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.