Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I'm here on H753, external clock, CPU clock configured to 400MHz. Setup code is generated by CubeMx.If I execute a HAL_Delay() takes twice the time as expected, e.g. 2ms instead 1ms. I checked via GPIO toggle with a scope.The MCO output is correct, so I guess the CPU clock is correct.The system core clock variable is calculated/set to 400MHz after system clock initialization.I remember I watched the same problem on another M7 chip, the SAME70.I fixed it by patching the SYSTICK setup (HAL_SYSTICK_Config) but I'd like to know what is the problem here.It seems to me, the SYSTICK is fed by 200MHz, not 400MHz as suggested in the CubeMx clock tree.Does anybody have experienced this or can share information regarding SYSTICK?Thanks,Jochen
The pins for USART3 are listed as PD9 and PD8; however, these are not available on the microcontroller.What are the correct pins? Similar to posts:https://community.st.com/t5/stm32-mcus-products/stm32h5-bootloader-uses-usart-pins-that-do-not-match-roles-in/td-p/594610https://community.st.com/t5/stm32-mcus-products/stm32h5-need-bootloader-pins/m-p/595584
Hello - I recently took a working design and upgraded from the STM32L4 to the STM32L5. I'm having a major issue getting the i2c bus to work properly.I have SCL (PB11) and SDA (PB10) configured.I have pull-up resistors (4.7 kohm) on each of SDA/SCL. I've confirmed that it is 3.3V on the outside of thoes resistors.I've configured this in STM32CubeMX to be I2C2 (I've attached the .ioc file)I'm almost certain the clock configuration is correct (attached the .ioc file)When I disconnect the STM32L5, each bus properly pulls up to 3.3V.However, when connected to the STM32L5, it immediately pulls SDA to 1.0V and SCL to 0.8V despite it being 3.3V on the other side of my pull-up resistors.I've tried everything I can think of in firmware (stm32duino and STM Cube IDE) to fix this, but there isn't a single thing that works.Trustzone is disabled (see option bytes below)Here is the design, I've highlighted PB10 and PB11. Not visible in this is the 4.7 kOhm pull up resistors, but you'll have to trust m
I am designing a PCB that uses the STM32L433RC.I just checked the pin out of the PCB footprint with the datasheet, but then got confused as there are two different pin outs for what seems to be the same device.The footprint I am using matches figure 9 of the datasheet, not figure 8 (although I am not using the external SMPS).The difference starts with pin 25 as shown in the diagrams below.How is the pin out different for the same device ? Is this a setting in STM32CubeIDE ?
Hi,I would like to implement a USB -> SPI flash storage solution. There are several guides and examples already available to do so (also the tinyUSB ones), so I think that should not be an issue.However, due to physical constraints of my project, I do not have room to add one single flash chip of the requires size, but I WOULD have room for several physically smaller parts.So, the question is this - is it possible to combine two external flash chips (either connected to the same SPI peripheral with separate CS lines, OR two separate SPI1 / SPI2 peripherals, OR to an OctoSPI interface) into "one" larger memory and access them as if they were one larger chip?I do not have a preference of what (if any) software stack to use but I do need it to be a FAT file system in the end, I think.Cheers,R
Hello, I am using a STEVAL-ESC002V1 board and I am stuggling to make it work. I want to load the bin file given in STSW-ESC002V1 but the STM32Cube Programmer does not find the board. I am using a STlinkV3Minie connected to the SWD connector.The instructions given to use the board are really rudimentary and I am new to ST work environment so I am a bit lost. Is it a better option to use the bootloader? If so how do I do that?I'll gladly take any help.
Hello everyone! After countless hours of self-grind, talking to different LLMs about it (and mostly failing), I may have started to get some faint idea about what I am doing. I am mostly writing this post for a sanity-check. Currently, for a medical device, we are trying to connect an external (ADS127L11) ADC to our MCU. When we use our MCU’s internal ADC, everything works fine, but we want to explore other options, to hopefully lower the internal noise. Project snapshotMCU STM32H743ZITx (CubeIDE 1.14, FW_H7 1.12.1)ADC ADS127L11 (24-bit ΔΣ, SPI Mode-1, push-pull DRDY)Goal 100 k samples / s, minimal jitter → DMA ping-pong → USB CDCPin ConfigurationPE11 = SPI4_NSSPE12 = SPI4_SCKPE13 = SPI4_MISOPE14 = SPI4_MOSIPE15 = DRDYPB10 = STARTPB11 = RESET (Connection Config = Full Duplex, NSS Input / Output for some cases, see below) Original Plan -> Failed due to DMAMUX setupFrom what I understood thus far, there is this DRDY pin driven by the ADC. If it gets low, this
I'm getting unexpected signal in PWM output on timer1 channels.Signal screenshots are attached.getting unexpected signal (around 500nS) in between PWM duty cycle pulse. Below is timer configuration : NOTE*: CCR values changes with software as required to generate desire waveform.static void MX_TIM1_Init(void){/* USER CODE BEGIN TIM1_Init 0 *//* USER CODE END TIM1_Init 0 */TIM_ClearInputConfigTypeDef sClearInputConfig = {0};TIM_MasterConfigTypeDef sMasterConfig = {0};TIM_OC_InitTypeDef sConfigOC = {0};TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0};/* USER CODE BEGIN TIM1_Init 1 *//* USER CODE END TIM1_Init 1 */htim1.Instance = TIM1;htim1.Init.Prescaler = 0;htim1.Init.CounterMode = TIM_COUNTERMODE_UP;htim1.Init.Period = 8400;htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;htim1.Init.RepetitionCounter = 0;htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;if (HAL_TIM_PWM_Init(&htim1) != HAL_OK){Error_Handler();}sClearInputConfig.ClearInputState = ENABLE;sCl
For my project I'm using an STM32F743VIT6 with ADC1 and ADC2 in 16-bit differential mode.In the reference manual (RM0433) §25.4.7 it is written:Converted value = ADC_Full_Scale / 2 x [1 + (VINP-VINN)/VREF+].For 16 bits, ADC_Full_Scale is 0xFFFF. What exactly is ADC_Full_Scale / 2 ? 32768 (0x8000) or 32767(0x7FFF), the value for 0V input?I ask this question because in both cases there are not the same number of steps between 0 and the median value and between the median value and the full scale!
Hello,I have a question about the usage of the MCE in the STM32H7RSI have the STM32H7S78-DK boardI'm starting with a project that show images to LTDC with images on the flash (copy with DMA2D) and the framebuffer is on the PSRAM.My project works with this tuto to get the flash running : https://github.com/ST-TOMAS-Workshop/stm32h7s_workshop/tree/main/1_external_memoryAnd this one to have MCE working : https://github.com/ST-TOMAS-Workshop/stm32h7s_workshop/tree/main/3_external_memory_encryptionThe project seems to run well beacause my led blink like it should but !defining my images in "const uint16_t ecran_start" now (since MCE is enable) gives me black images (in debug session i see the variable in Expressions correctly) .Removing the const the images shows but by internal ram will be filled very quickPutting the image in my PSRAM section it is glitched on the screenMy framebuffer is in PSRAM and works because DMA2D show a red rectangle that i programmed (DMA2D R2M)Putting framebuffer
HelloI have the issue, GPIO pin initialization to specified mode isn`t generated.I can`t find ''pin reservation'' in pop-up from right click on pin or in any tab (pinout & configuration -> gpio mode configuration)It`s dual-core project for stm32wl55jcix, STM32CubeMX version 6.13.0 (linux)
Hi All,I have written a baremetal code to initialize the USART2 of STM32F401RE and print HELLO WORLD. The code does not use HAL and rather accesses and writes to USART2 peripheral registers using the C pointers. I have cross verified the code multiple times and have tried multiple methods to get the print, but I am not seeing any output on the teraterm/puTTY. I even used USB-TTL cable for this purpose by connecting the PA2 and PA3 (on the ST-Morpho connector) to TTL's cable Rx and Tx pin respectively. But there is no output. What can be the reason? Below is my code:#include "stdint.h" #include "stm32f4xx.h" #include "string.h" typedef struct{ volatile uint32_t REG_MODER; volatile uint32_t REG_OTYPER; volatile uint32_t REG_PUPDR; volatile uint32_t REG_IDR; volatile uint32_t REG_ODR; volatile uint32_t REG_AFR[2]; }GPIO_REG_DEF; typedef struct{ volatile uint32_t REG_SR; volatile uint32_t REG_DR; volatile uint32_t REG_BRR; volatile uint32_t REG_CR1; volatile uint32_t REG_
I need to see all advertising.I generally use :aci_gap_start_general_discovery_proc_cp0 , works fine, but it only shows connectable devices . Now , I am trying : aci_gap_start_observation_proc_cp0 - doesn't work for meBut it causes an issue, return 0x0C on stack 1.21. I simply replaced the aci_gap_start_general_discovery_proc_cp0 with aci_gap_start_observation_proc_cp0 stack_full
Hi All, I'm trying to boot to an app present in QSPI.I created a project from TouchGFX and generated code, same.ioc file I used to make my bootloader code.When I used the bootloader to jump to the app that was present at address 0x0802000 it jumped successfully, and my app was running normally. Now I want to move this app completely to QSPI and want to run from there via a bootloader. How to achieve that. I tried to move the whole application to QSPI by changing the .ld file, but not able to jump.
Hello, I am looking at how to abort the MemX_IT functions. Looking through HAL_I2C_Master_Abort_IT, it seems like that only works for the Master API functions and not the mem functions. Are there any HAL functions for Mem Abort?
I'm working on a DMA routine for my SPI DAC, and I've loaded up a buffer with the commands to make a sine wave. But when I check it with the oscilloscope, it's just stuck at 2.05V, which is actually the very first command in my sequence.I've spent hours on it, trying everything from physically wiring LDAC low to fiddling with different write commands, and still no luck.I'm really hoping this is something super simple I'm missing, because I'm still pretty new to embedded and C.// AD5668_DMA.cpp #include "AD5668_DMA.h" #include "stm32f4xx.h" // AD5668 “write input & update N” command base static constexpr uint8_t CMD_WU = 0x30; AD5668_DMA::AD5668_DMA(uint8_t csPin, uint8_t dacChan, bool circular) : _csPin(csPin), _dacChan(dacChan & 0x0F), _samples(0), _bytes(0), _buf(nullptr), _circ(circular) { pinMode(_csPin, OUTPUT); digitalWrite(_csPin, HIGH); } void AD5668_DMA::begin(const uint16_t* wavetable, uint16_t size) { _samples = size; _bytes = size * 4; // 4 bytes per sample
It's possible to set an interrupt priority for a pin in STM32F411 MCU, right? My PC13 pin (user button) is set to GPIO_EXTI13 and I want to give it the preemption priority 3 in the NVIC (STM32Cube IDE ver: 1.18.1) but it's seemingly not possible! Its value is zero and immutable!Here's a screenshot:
Hello,I'm attempting to make my MCU shift between STOP and RUN mode using a button. When I press the button the CPU stops, however, upon pressing again it fails to start the CPU. I know this form the LED indicators.The strange part is that when I place a debug point, or anything debug related, the CPU wakes and immediately and runs the ISR as if it were waiting for the stop mode to resume.Is there some setting I need to enable to get the GPIOs to funtion in stop0? I have had a look at other forum posts and MX examples but have not seen anything, or I have missed it.My ISR:void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin) { if (GPIO_Pin == Button_Pin && powerDownState == 0) { powerDownState = 1; HAL_GPIO_WritePin(Green_LED_GPIO_Port,Green_LED_Pin, GPIO_PIN_RESET); // Enable pull-up on button HAL_SuspendTick(); HAL_PWR_EnterSTOPMode(PWR_MAINREGULATOR_ON, PWR_STOPENTRY_WFI); } else { HAL_ResumeTick(); powerDownState = 0; HAL_GPIO_WritePin(Green_LED_GPI
[Request]I would like to know the correct procedure for initialization using the INIT bit of the FDCAN's CCCR register.[Situation]1) To reset the FIFO status, we are only performing the initialization start using the INIT bit of the FDCAN's CCCR register, and after confirming the end of initialization by reading the same bit, we are setting the RX filter in the Message-RAM (information not changed by INIT) to enable RX-FIFO reception processing. However, despite data that should be acquired by the filter being present on the CAN bus, no RX interrupt is occurring.2) When checking the FDCAN status using the CAN_MCAN_PSR register in the above situation, the ACT bit in the FDCAN_PSR register remains at 01 (idle) and does not change to 10 (Receiver).3) When we stop and restart data transmission on the CAN-BUS repeatedly, the ACT bit becomes 10 (Receiver) approximately once every 20 times, and the reception processing begins.4) When a hardware reset is performed on both the transmitter and r
Hello everyone, I was trying to use 2 mics IMP34DT05 in stereo configuration with MCU.I wanted to capture signals from both the mics as well as i want to use single mic also. Please guide how can be this configuration done in schematic and how should be the 2 mics placed together. Best Regards,Sakshi
I'm having problems enabling USB on STM32H503. This happens on both my custom board (STM32H503CBT6-based), as well as on MB1814B (STM32H503RBT6-based). I observe no USB connection, no USB IRQ being invoked, no hardware handshake. Here's the simplest repro:1. in STM32CubeIDE, v.1.18.0 (same with v.1.17.0), create a new STM32 project for STM32H503RBT6 core (CBT6 for my board)2. in .ioc, enable I-Cache, SWD, and USB. In "Middleware and Software Packs", the USBX section, enable "Core System", "Device CoreStack FS", "CDC ACM"3. close .ioc, build the project4. connect MB1814B to the host on both sides: USB and ST-Link. In my case, they are connected to the same USB hub, and the hub is powered after both sides are connected5. flash the compiled firmware6. notice that the host only sees the piped-through-SWD-end Virtual COM, but fails to see the USB connection on the device side. Observed under debugger, the firmware fails to invoke the USB interrupt.
Hello,I'm trying to run the Ux_Host_VIDEO example from STM32CubeN6 on the STM32N6570-DK board, but UVC camera streaming does not work. The USB device is detected, but no video stream starts. Test Environment:Board: STM32N6570-DKExample: Ux_Host_VIDEO (from STM32CubeN6 package)IDE: STM32CubeIDE 1.18.1Camera models tested: Logitech C270Connection: USB-C OTG (HS) port using USB-A adapter USB host stack detects the device and logs: **** USB OTG HS in HS VIDEO Host ****USB Host Video library started.Starting VIDEO ApplicationConnect your VIDEO DeviceUSB Video Device InsertedPID: 0x825VID: 0x46dUSB Video Host App...Video Device is ready... No streaming happens after that.Function _ux_host_class_video_alternate_setting_locate() filters out most alternate settings.The condition: if (payload_size >= max_payload_size) causes only a few alternate settings (e.g., >= 7) to be selected, but those don’t work either.Questions:Has anyone successfully tested this exa
Hi guys, first of all, after many hours of study of this peripheral i have "few" points. I will try to be as nice and calm as actually possible.1: Does anyone in ST review documentation and code you are generating? RM0456 17.4.2 paragraph 2:"After enabling/starting a GPDMA channel transfer by writing 1 in GPDMA_CxCR.EN, aGPDMA channel interrupt on a complete transfer notifies the software that the GPDMAchannel is back in idle state (EN is then deasserted by hardware) and that the channel isready to be reconfigured then enabled again."What does it mean? Do i have to start GPDMA channel and then configure it? (Nonsens) Shall be channel configured before it? (obviously) Transfer Complete interrupt is triggered right after enabling/starting channel? Do i have to somehow filter it? LEARN HOW TO WRITE DOCUMENTATION!2: How the hell shall be ports used? You recommend to use Port1 for memory access and Port0 for peripheral acces (in case the periph-memory transfer is used), but when you ge
Hello everyone. I'm developing Ethernet on NuceloF746ZG board. I'm listening to the UDP on port 1001,where there is datagram incoming every 2ms, but my callback function gets called 96 times, before it stops, and resumes for next 96 times, and so on.This is happening with lwIP and Mongoose.I followed example code, which in the end worked the same. Changing any parameter from increasing Descriptors number, to RxBuffer didn't have impact.I tracked that HAL_ETH_ReadData also gets called 98 times and hangs until it repeats itself. Bellow are attached layout and configurations.I suspect something with ETH_DMA default setup or memory alignment but wasn't unable to track it so far. Any help will be welcomed.
SPI or serial port?If it weren't for those two, Then why must the MCU_API_delay() function be set while ((LL_USART_IsActiveFlag_TXE_TXFNF(USART1) == RESET) || (LL_USART_IsActiveFlag_TC(USART1)) == RESET)) {};We can use both uart of MCU, so I want to confirm with you whether it is necessary to configure here.
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.