Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

All Questions

Tagged with
0
votes
1answer
44 views

DMA, Interrupt and UART connection in STM32 for detecting chararcters

I am trying to make a project and am planning to use DMA for my UART from one STM32 to another STM32. Here are some details of what am I using: Chip: STM32F107RB debugger and programmer: Atollic for ...
0
votes
1answer
34 views

Tasks inside Interrupt Handler

Is there any schedular that exists for STM32F103 in which the 'tasks' are run at the ISR() level while the Schedular() code runs in the main() thread?
2
votes
1answer
60 views

single or multiple interrupt handlers in stm32

I am coming from 8-bit world to 32-bit world specifically stm32f103. At present I am only doing study and discussion with my fellows to know the major differences in the two worlds and also to select ...
0
votes
1answer
44 views

timer interrupt on STM32F303

I'm kind of a newbie so excuse me if this is a beginner's question. tried to find an answer but couldn't find one. I'm working on STM32f3Discovery eval board, with the stm32f303vc on it. The code ...
0
votes
0answers
32 views

Calling a function that uses HW_Delay inside timer interrupt

I have the following timer interrupt configuration ...
2
votes
0answers
61 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: ...
0
votes
0answers
43 views

Can't use the Wake-on-Motion functionality of an MPU9250 with STM32

Hi there :) I'm trying to use the Wake-on-Motion functionality of this particular MEMS (MPU9250) with my STM32L152C-Discovery board: if the MPU9250 sense a motion, the INT pin will be high. To achieve ...
1
vote
0answers
54 views

STM32F042 ADC Interrupt with STMCUBEMX

I need to read 15 channels ADC. However my MCU is specific named STM32F042K6T6. I decided to use an analog MUX to read every channel from just one pin. But, I didn't read accurately the datas by ...
0
votes
2answers
36 views

STM32 EXTI does not trigger interrupt

I am working on a device with a button that is supposed to turn it on (when pressed briefly) and off (when held longer). The MCU is an STM32L432. The button is connected to PB0. I want to use EXTI as ...
0
votes
1answer
65 views

Microcontrollers (STM32) and GPIO with momentary buttons

I have six momentary buttons and an STM32 Discovery board. I want to check the button presses. As far as I understand, I create a continuous loop that will check each GPIO consecutively. (I am aware ...
0
votes
1answer
58 views

STM32 interrupt from Matlab Code

I'm using the STM32 MAT plugin and embedded coder for Simulink to generate C-Code out of my models to compile them onto an STM32F4. As IDE I use TrueStudio and for my MCU Configuration I use CubeMX. ...
0
votes
1answer
53 views

Identifying unhandled interrupt

I stopped in the middle of debugging a very simple project where I send "hello world\r\n" every couple seconds out of USART2. The first print hits the console and then I hang in an infinite loop ...
3
votes
2answers
309 views

How to configure DMA to receive variable length USART messages?

I am trying to receive USART messages on a microcontroller originating from PC which will command it to execute certain tests. I am using STM32F4, I chose to use DMA as messages on the same USART ...
1
vote
1answer
40 views

Low Jitter and Latency on signal trigger using WFI / WFE on STM32F405

I have a hobby project using a STM32F405 MCU, which is intended to respond to a fast clock signal (~1Mhz) connected to Pin 1 of GPIOA. For every transition of the input (both rising and falling), I ...
2
votes
2answers
116 views

STM32 CAN bus Rx interrupt only triggers in loopback mode

I'm designing the CAN interface for a STM32F042C4T6 to be able to receive and send messages. I've tested my code and everything seems to work perfectly fine in loopback mode. However, when I hook up ...
0
votes
1answer
153 views

Using Character Match functionality in a STM32F7 chip

I'm trying to implement a UART receiver that works by finding a '\0' in the datastream, OR when it receives 256 characters at which point the data should be processed by an interrupt. The point is to ...
0
votes
1answer
178 views

STM32F7: activate USART Receiver Timeout Interrupt (USART_RTOR.RTOF)

I want the STM32F769NI to generate an interrupt when a pause after a received byte on USART6 was detected. I cofigured USART6 with 9600 baud in asynchronous mode and enabled the receiver interrupt ...
0
votes
0answers
160 views

SPI problem with STM32F103

I am trying to connect blue pill board(master) to arduino nano(slave) over SPI and read what I have sent on serial monitor. However I haven't been able to get SPI working. I run a timer to generate an ...
6
votes
1answer
741 views

Inaccurate timer interrupt STM32

I wrote a simple program to toggle an LED on and off using the TIM1 interrupt on an STM32F0 discovery board. CLK Freq = 48MHz Prescalar = 48000 Auto Reload Register = 1000 Using the following ...
3
votes
3answers
722 views

STM32 CAN bus receive interrupt is sometimes not fired, and CAN transmit sometimes times out

I have two STM32 boards connected via a CAN bus. They periodically transmit a message to each other. For some transmissions however, HAL_CAN_Transmit returns with ...
0
votes
1answer
169 views

STM32F411VE ADC interrupt not working

My code works fine without interrupt (I tried polling the ADC value) but when I enabled the interrupt, it didn't work - while debugging in Keil, it never reaches the ...
0
votes
1answer
180 views

Problem with interrupt-based timer on STM32F411

I was following this online tutorial and cannot get the interrupt-based timer to work. I know the timer is running because if I uncomment the five lines in the main loop, I get a nice square wave ...
0
votes
1answer
69 views

What are the minimum and maximum number of cycles consumed when executing an interrupt on an STM32F0 MCU?

Assuming I set an external GPIO interrupt to highest priority, how many cycles does an STM32F0 MCU take to: start executing the interrupt handler code return from the interrupt I expect that the ...
2
votes
1answer
473 views

NVIC Pending register vs EXTI Pending register (STM32F4)

Why there are two pending registers for interrupt? One of them is EXTI_PR and other one is Interrupt Set-pending Registers(ISPR) which is in NVIC controller registers. EXTI unit pending register: ...
0
votes
1answer
46 views

STM32F030(K6) Systick not triggering (BOOT0 problem)

I'm trying to write a simple program for a STM32F030K6T6 microcontroller. The problem I am facing is the more common "Systick is not working" problem. The code is generated using Cube32MX (Firmware 1....
0
votes
3answers
2k views

STM32F4 How are Preemption Priorities and Sub-Priorities used?

I have started working with ARM-based microcontrollers. I not understand subpriority and preeemptionpriority. For example: NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00; ...
1
vote
1answer
4k views

How to receive bytes from SPI with interrupts using HAL on STM32?

Background I am trying to make a SPI connection between two STM32F103C8T6's. Measurements According to my logic analyzer I get a signal that looks ok (sending 10 bytes with values 0x55): Results ...
2
votes
0answers
72 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. ...
1
vote
1answer
1k views

Remapping vector table in STM32F0 (no vector offset register)

I have written a bootloader before for a STM32 that had support for the vector offset and is easy peasy. For STM32F0xx using HAL I read I need to move the vector table to ram and copy from flash. I ...
0
votes
2answers
605 views

STM32 - more buttons pressed interrupt

I am using STM32L433CCT6 and I am programming it with eclipse and code genereted by STM32CubeMX. I would like to ask you, if is possible to add iterrupt that will be called, if i press two (or more) ...
0
votes
1answer
196 views

USART not entering ISR STM32F030C8

I'm working on UART using interrupts on Stm32F030 controller. I have done the following init. ...
1
vote
1answer
2k views

How to add external GPIO interrupts on STM32?

I'm trying to configure STM32CubeMx to external GPIO interrupts, however, in the NVIC screen I don't see an EXTI... interrupt to be set. What should I do to be able to e.g. check for interrupts on ...
1
vote
1answer
793 views

STM32L031 Nucleo USART Problem

I have a problem with STM32L031 Nucleo board USART communication. I am trying to send data to PC on USART periodically and catch the spesific character ('a') with Rx interrupt and toggle the onboard ...
1
vote
2answers
2k views

USART interrupt not working as expected [STM32 Nucleo]

could someone explain why i can only receive 13 chars with USART interrupt? I use '\n' to detect the end of string. ...
1
vote
1answer
3k views

How to dynamically adjust a timer with STM32

I've got this timer (TIM4) that's in PWM mode. I'm outputting one PWM channel and i want to wait a bit, and then grab the latest ADC samples from a DMA conversion. TIM4 -> ARR is 4096 TIM4 -> CCR1 ...
1
vote
2answers
129 views

Embedded system task scheduling for data aquisition on a CAN network

I'm struggling with the concept of how to schedule my tasks. My Setup: STM32F103 hooked up on CAN. Taking measurements with a Lidar V3 module comms via I2C, then distributing that measurement on the ...
1
vote
0answers
122 views

Interrupt priority in STM32F103RB

I got a doubt about an interrupt grouping in stm32f103. In programming manual of microcontroller I found 5 ways to configure it. But, while debugging, I found 8 ways. How is it possible to get ...
0
votes
2answers
380 views

External Interrupt delayed to in STM31F103C8

I have to write a C program to toggle an LED using an external interrupt on STM32F103(72MHz System Clock). I have initialized EXTI3 on the Falling edge and the ISR Handler toggles an led at high ...
2
votes
2answers
192 views

Length of an interrupt

I know that an interrupt should be as short as possible, however, what is short? My routine is quite long, but has quite some if-statements, so the execution time is short. But maybe it still is ...
0
votes
2answers
2k views

Possibility for UART receive data loss?

In a lot of examples using STM32, HAL, where UART data is received by interrupt the code looks like: Initially (to start the receiving): ...
1
vote
1answer
1k views

stm32f0 uart1 rx interrupt

I have stm32f030f4p6 Microcontroller and using iar Compiler , library cmsis , After confige Uart1 the RXNE , FE and CMF bits return 1 whereas not recieve or send was done if I dont set RXNE bit to 0 ...
1
vote
1answer
97 views

Are there any ways to improve this ISR - STM32F401RE?

I am currently coding a flight controller from scratch and am currently working on the module to decode the incoming PPM signal. Keeping in mind that this is an ISR, I've limited its functionality ...
6
votes
2answers
4k views

What's the difference between setting SysTick Interrupt in NVIC and using it as an exception?

I'm using an STM32F303 MCU and I've noticed that the SysTick can be set up to cause an exception, which seems to mentioned quite often in various User Guides. This way, it will have a priority level ...
3
votes
1answer
6k views

STM32F4 HAL Library Button Interrupt

I'm trying to toggle built in LED with external interrupt instead of while loop. Probably I'm doing something wrong with EXTI functions. Can you help me to fix it? ...
5
votes
1answer
392 views

How do I interrupt an ISR with a higher-priority ISR on an STM32F105?

I have two external interrupt sources coming into an STM32F105. I want one of them (call it "IRQHigh") to pre-empt the other ("IRQLow"). Currently, if IRQHigh is triggered during the IRQLow ISR, the ...
1
vote
1answer
2k views

STM32 interrupt does not fire

I'm using an STM32F103C8T6 (aka blue pill). GPIO Init and interrupt handler: ...
0
votes
1answer
263 views

STM32 one timer for multiple push buttons

I have a small project where I set up a timer interrupt to check the state of few buttons. Do I need to set up 1 timer per button or can I check 2 or 3 with 1 timer?
2
votes
1answer
3k views

STM32: Timer encoder reset

I configured my TIM4 as encoder input and everything is working well when I execute TIM_GetCounter(TIM4) But I would like to put the timer value back to 0 (reset?) when I press a push button with an ...
0
votes
1answer
463 views

Can I use Timer Input capture interrupt and GPIO interrupt on same line?

I use Timer Input Capture of STM32L476RG.Is it possible if a timer capture based on interrupt will disable normal EXTI interrupt on the same line? For example TIM2_CH1 can be input capture on PA0. ...
2
votes
3answers
929 views

Problem on NVIC STM32F100

I am using STM32VL discovery board(STM32f100rb6).. I wrote following code for NVIC: ...