Questions tagged [stm32]

The STM32 is the third ARM family by STMicroelectronics. It follows their earlier STR9 family based on the ARM9E core, and STR7 family based on the ARM7TDMI core. The STM32 is based on the ARM Cortex-M family of cores.

730 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
18
votes
0answers
1k views

Switch from JTAG to SWD with bitbang sequence on STM32F103VB

I am trying to switch from JTAG to SWD without any external devices. Why? Because I would like to use the SWO pin to send a stream of logging information to another device. To accomplish this ...
6
votes
1answer
1k views

Receiver issues on STM32H7 interrupt-based SPI

I want to configure a simple interrupt-based SPI slave transmitter/receiver on a STM32H7 MCU. Even though I have quite a bit experience with the older series of STM32 ARM MCUs, it seems that a lot of ...
4
votes
0answers
523 views

Is JTAG faster than SWD for debugging on an STM32F with STLINK-V3SET programmer?

There is a new STLINK-V3SET programmer that someone dropped off on my desk today. It supports USB 2.0. My thinking is that if SWD is the bandwidth limiter in the signal chain then a new programmer isn'...
4
votes
1answer
4k views

Run IAR Program without Debugging

I'm having a simple problem with IAR Embedded Workbench, programming an STM32 using an ST-LINK/V2 programmer. I'm trying to run a program that temporarily switches off the JTAG pins, so I can't run it ...
3
votes
0answers
60 views

Custom USB Gamepad Working But Not Detected In-Game

I've created a custom HID gamepad using an STM32L151C8T6 (probably irrelevant) and my computer recognizes the device using the gamepad tester application built into Windows 10. I can verify the ...
3
votes
1answer
251 views

Getting an ACK failure right away after writing slave address in interrupt mode for I2C [STM32F4]

I see that once slave address is written in the interrupt handler, I get an ACK Failure right away, but when I do the same thing with polling approach, I do get an ACK and goes on to read off the ...
3
votes
0answers
214 views

Increasing system clock frequency on STM32F303 drops I2C clock proportionately - why?

I'm trying to figure out a weird little issue I've discovered while debugging another element of my code. I've got a STM32F303K8 reading and writing to an I2C peripheral. The I2C clock speed is ...
3
votes
0answers
71 views

Hard fault on only one of two identical STM32F405 boards

So I've made two prototypes of a new custom board with a STM32F405RG microcontroller at heart and while one of them works totally fine, after a few seconds or more I'm getting a hard fault on the ...
3
votes
0answers
426 views

Weird problem on STM32 ADC with Interleaved Mode

I am sampling a signal on the STM32F3 Discovery board (stm32f303vct6) with two ADCs working in interleaved mode. It works great with a 200kHz 1V sine wave. But when I apply 10kHz 100mV sine wave, I ...
3
votes
0answers
1k views

STM32F7 - Quad SPI dummy cycle behavior

I am working with the STM32F767ZIT6. At the moment I am exploring the QuadSPI peripheral. After setting up the peripheral with the following configuration I noticed some undesired behavior of the data ...
3
votes
0answers
809 views

STM32F429ZIT6 with SDRAM IS42S16320F Read/Write Issue

I designed a board which is containing two SDRAM (IS42S16320F) and STM32F476ZIT6 MCU (and other components also). I can access the SDRAM but the data is changing independently from the code. My board ...
3
votes
1answer
3k views

STM32 UID decoding

In my project I need to make readable 96bit UID, in reference manual is described how the number is encoded: ...
3
votes
0answers
318 views

Wait make the STM32L073RZ freeze in stopmode

With my STM32 I'm trying to configure a deepSleep mode and use RTC to generate interruption (actually each 30 seconds). When my STM start, this one configure the RTC and directly go in Stop mode. ...
3
votes
0answers
1k views

Master-slave timing on ARM Cortex-M0

I have set up a slave timer that starts counting when the master timer is enabled. I want to know if the slave starts counting when the master timer receives a valid edge (my configuration is count ...
3
votes
0answers
2k views

STM32F0 USB device - unexpected Device_Qualifier descriptor request

Edit I may not have asked the correct questions here. Please do not attempt to answer before I edit again to remove this message. Summary I'm developing firmware for a USB device, and I can't get ...
3
votes
0answers
4k views

UART reception problem when SysTick Interrupt is enabled

I'm using a STM32F411RE-Nucleo board and generating a project with Cube MX for System Workbench. The problem is that HAL_UART_Receive function doesn't receive input ...
3
votes
0answers
3k views

How to know the memory occupied by the various memory segments in a microcontroller

I'm using STM32 based microcontroller, IAR embedded workbench and STlink v2 debugger. I just want to know how to check the memory utilized/used by the program/system in various memory segments like: ...
3
votes
1answer
10k views

STM32F4 NAND flash via FSMC, difference between bytes written and read back

I have a Waveshare Open407V-D development board, basically a "motherboard" in which an STM32F4DISCOVERY kit is fitted (this kit, for those not familiar with it, is made by ST itself and based on the ...
2
votes
1answer
23 views

Can I use the STLink on a Nucleo to program a 5V board

I want to use the STLinkV2 on the nucleo board I have to program an external STM32f4, and I have the SWD pins connected according to section 6.2.4 in the documentation.An earlier unsuccessful attempt ...
2
votes
0answers
83 views

STM32L4 LPTIM as pulse counter of intermittent pulses fails when initializing with no pulse

I'm working with LPTIM as a Pulse Counter on a STM32L432KC, I have a rain gauge connected to LPTIM1 (PB5) and a anemometer to LPTIM2 (PB1). Both configured on STM32CubeMX as Standalone: counts ...
2
votes
0answers
81 views

why does my STM32L412 ADC never reach its full value?

Im using the ADCs on an STM32L412 but it seems that they never reach their full value - the power is 3.3v and the reference is 3v, but they only ever fill to 3863 and not 4095. Why might this be? I ...
2
votes
0answers
72 views

How to improve a high frequency square wave for laser imaging

I am trying to create a current source for laser direct imaging and I have a problem in the circuit I cannot solve. The laser is a 120 mW 405nm diode and I use it in a laser module from a laser ...
2
votes
1answer
95 views

STM32 usart interface sends data but “128” is added to each sent byte

I'm using the newest version of stm32cubemx to config my hardware. I'm using a Waveshare STM32H743 dev board and it's completely healthy and uClinux works(I can easily communicate with it using that ...
2
votes
0answers
118 views

STM32 DAC Setup Issues

I am using the STM32F3 Discovery development board which has an STM32F303VCT6 mcu. I am also using the STM32CubeIDE. I am trying to set up the DAC to perform one-off digital to analog conversions when ...
2
votes
0answers
48 views

ADC Overrun with Multimode, Scan and timer-triggered configuration

I'm using the STM32F446VE with 3 ADCs. I have a 50 kHz PWM running and want 2 of the ADCs to measure 2 Channels synchronized with the 50 kHz PWM. To achive this I used the regular simultanuous dual ...
2
votes
0answers
125 views

N-Channel MOSFET Circuit

a friend of mine developed this Schematic and Circuit. The Problem is, on LIN_BUS (please ignore the Name) should be KL15 Volage (13.8V) if the FET switches. But if FET1_CNTRL is LOW (0.0V) the ...
2
votes
1answer
91 views

STM32 Encoder Mode, CNT don't count

I'm using STM32L476RT. I've got encoders based on TLE4946-2K. I can't get it to work. I'm attaching my code and config below. I'm kind of stuck at this point - I tried to lower the voltage by divide ...
2
votes
0answers
73 views

STM32 Timer Discrete Jitter

I'm using a STM32F746 running at 200MHz. A timer (tim2) is counting up at 100MHz and triggers an update interrupt with the following simplified ISR that writes a pattern to GPIOB ...
2
votes
0answers
297 views

MCP2551 with STM32 MCU

im learning about the CAN protocol, and bought the transceiver module MCP2551 like this: I made the driver for CAN controller first in loopback mode for debug, im sending the numbers 1,2,3 and 4 with ...
2
votes
0answers
81 views

STM32F103 random reboots

we have made a 2 layer board for a STM32f103, and apparently it works fine but we get a random resets now and then. When that occurs there is a 1 in the Bit 27 PORRSTF: POR/PDR reset flag and Bit 26 ...
2
votes
0answers
56 views

Can't seem to properly generate a delay via timer

So I am trying to create a delay using a timer but doesn't seem like it's working as expected. With a clock of 16MHz and a prescaler of 1, it should take 10us to reach a count of 160 (unless I did ...
2
votes
0answers
1k views

How to setup STM32 as I2C slave device?

I've been trying to set up MCU (STM32 L432KC) as an I2C slave device. I have previously tested it as a master device to interface with a port expander(MCP2307) and it works perfectly fine. The ...
2
votes
0answers
153 views

SPI data arrives at every 2nd send and in the wrong sequence

I am simulating a project where two STM32s communicate with each other through SPI (HAL drivers), where the SPI Master is an STM32F4 and the SPI Slave is an STM32F3. Basically, the master will send 5 ...
2
votes
0answers
111 views

ADC in STM32F103 drops ouput voltage from unity buffer

I'm building a signal analyzer based on STM32F103RB6 placed on a noname board with the following schematics: I'm trying to normalize the AC input signal initially centered at 0V. The amplitude is 2....
2
votes
0answers
99 views

CAN bus traffic is destroyed for unknown reason

I am a bit stuck with connecting several STM32F405 with BeagleBone black via CAN bus. Strange things happen when I connect 3 stm32 and 1 BB. I have checked that BB works perfectly with any ...
2
votes
0answers
219 views

how to handle 'heavy' task in FreeRTOS

I know that each task in FreeRTOS should have a vTaskDelay() to release CPU resource to other tasks periodically. However, when there is a very time-consuming function in a task, like read a large ...
2
votes
1answer
91 views

STM32 SWO & OpenOCD with Variable SysClock

I have been using SWO with STM32 chips for debugging for a number of years. I have managed to side-step this issue until now. I would like to be able to use SWO for debugging while varying the ...
2
votes
1answer
332 views

STM32 TIM2 PWM and TIM 5 basic mode simultaneous output issues

Using an stm32f411re I want to generate a PWM of 20% Duty Cycle with a period of 200uS and simultaneously I want a basic timer to be ticking in the background that sends an interrupt every 70uS (that ...
2
votes
1answer
700 views

STM32F303 ADC+DMA Averaging of measurements

What is the best method of taking multiple measurements using ADC+DMA interrupts and averaging them? Currently I have an STM32F303 with ADC2 initialized with channels 3 and 18 (Vrefint). My aim is to ...
2
votes
0answers
260 views

STM32F4 HardFault caused by Timer?

I built a STemwin Project with Cubemx and run this project on STM32F429ii based PCB. Every time when it reached the GUI_INIT() which was related to the memory allocation, it ran into HardFault_Handler(...
2
votes
0answers
104 views

Looking for help improving power control circuit

I am looking for ideas on improving the circuit below. Any constructive criticism is very much appreciated as well. The following is a long explanation how I arrived at this monstrosity, it can be ...
2
votes
0answers
111 views

STM32F103 timer behaves differently after hardware reset instead of st-flash reset

I'm learning to program the STM32F103C8 Cortex-M3 (on a BluePill board) and was playing around with the general purpose timers (TIM2 to TIM5) because I wanted to time some routines. In my simple ...
2
votes
0answers
496 views

stm32 does not exit sleep

When trying to implement sleep mode it appears the code enters and exits sleep mode once and then gets stuck in sleep mode after and will not wake back up. I posted some code below of what I believe ...
2
votes
0answers
94 views

Powering down parts of a pcb to conserve power, is it possible? Any caveats?

I'm building a USB 2.0 bus-powered STM32F429-based audio device that is able to run in a stand-alone mode from a phone charger, or running as a USB device when connected to a computer. To comply with ...
2
votes
0answers
202 views

Address Sent bit is not set on STM32F4 Disco

I am trying to interface my STM32F4 Discovery board with a sensor that works over i2c, since the sensor required a specialized i2c protocol, I decided to implement my functions using registers. But ...
2
votes
0answers
298 views

STM32 read external FIFO through FSMC

I want to use FSMC of STM32F429 to read external FIFO implemented in an FPGA MAX10. Since no mode of FSMC can fit the FIFO interface precisely, I try to use the modified synchronous multiplexed PSRAM ...

1
2 3 4 5
15