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.

624 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
15
votes
0answers
684 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
883 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 ...
5
votes
0answers
314 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
104 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
108 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
65 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
346 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
616 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
306 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
988 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
3k 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
9k 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
0answers
71 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
55 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
56 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
84 views

STM32 HAL_ADC_Start() ends with HAL_ERROR

I'm new to microcontroller programming and I have a problem I can't solve. I am using STM32 Nucleo board L4R5ZI and I try to read the analog value on one of the pins, and then use the ADC to convert ...
2
votes
0answers
50 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
57 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
62 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
44 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
299 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
146 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
90 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
92 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
1k views

Cube IDE : Error: unknown type name 'HAL_StatusTypeDef'

I am taking code from a stm32f0 series and trying to convert it to a stm32l4 series dev kit. I have already changed the necessary addresses and include files that I needed to migrate, but I keep on ...
2
votes
1answer
98 views

Flash and debug of multiple STM32 in JTAG with J-LINK

I have a board where 3 STM32 are connected to a JTAG port. The 3 STM32 are daisy chained. I am using a JLINK EDU Mini with Atollic TrueStudio IDE. One STM32F746 is a master for the two slaves ...
2
votes
0answers
111 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
213 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 ...
2
votes
0answers
126 views

How to implement multiple functions on single push button

I am using a STM32 Nucleo MCU and trying to pull a multi-function single-button method. I need a way to implement this form of functionality for a single push-button: Push 1: function 1 Push 2: ...
2
votes
0answers
76 views

Verify Total conversion time of ADC1 STM32F303

I am using ADC1 channel1 of STM32F303 in Time triggered mode. TIM1 is used to generate update event and is used as trigger source for ADC1. Time Trigger comes at 1kHz. I want to verify the total ...
2
votes
0answers
339 views

STM32f7 ADC DMA transfer not populating the buffer

I'm trying to compute the FFT of a 100 kHz signal from the STM32f746G discovery board using the HAL and CMSIS DSP libraries and I've run into a few issues. My first issue was trying to trigger the ...
2
votes
0answers
98 views

Weird SWD debug port behaviour

Today I have started to encounter strange problems with SWD debugging. The debug only works if I keep my finger on the SWD pins. To be more interesting I have the same problem with the boards I was ...
2
votes
0answers
146 views

STM32F429 PWM GLITCH

I have set up Timer 1 Channel 1 for pwm mode 1. I used the STM32CUBE to generate code for MDK-ARM. Parameters as below- ...
2
votes
0answers
2k views

stm32 external interrupt

I am working with a stm32f103 and am trying to get the external interrupt done. My code is: ...
2
votes
0answers
521 views

STM32L0 ADC Interrupt Low Sampling Rate

My observed sampling rate is much lower than expected and I cannot understand why. I have the discovery STM32L053C6 Discovery board and I want to use ADCs sampling. I started from the example ...
2
votes
0answers
86 views

nucleo-64 103rb EXTI stays pending

The PC13 EXTI interrupt (EXTI15_10) configured here keeps firing none stop. Most other questions about this same topic indicate that the respective EXTI_PR pending bit needs to be cleared in the ISR. ...
2
votes
0answers
224 views

STM32L1 Discovery Kit 5MHz PWM Generation

I have been using the STM32L1 Discovery Kit with the STM32L152RCT6 MCU. A project that I am working on requires me to output two PWM signals. One of these is a 100KHz square wave and the other is ...
2
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 ...
2
votes
1answer
459 views

TX Polling Not Working when setting RX interrupt stm32f103rc

I was trying USART on STM32F103RC,baud 115200, sysclk 72MHz, 1 stop bit, no parity and i connected my stm with usb to serial to look my output on terminal. At first i did polling of RX and TX and send ...
2
votes
0answers
366 views

L298 distorts signal

I connected STM32 F334R8 microcontroller to L298 H-bridge. I made some measurements. The problem is output signal on L298 has quite slow slopes and is not as sharp as input signal. I do not understand ...

1
2 3 4 5
13