All Questions
Tagged with interrupts uart
84 questions
0
votes
0
answers
57
views
Using two UARTs to receive causes one UART to save data from another
I am working with the STM32-H7 microcontroller and am attempting to receive bytes from another microcontroller and then printing to Putty using the USB UART. I am using USART 2 and 6 with interrupts ...
2
votes
1
answer
90
views
In AVR-GCC, I am trying to get an atmega328p to sleep and then wake on USART RX, but it locks up
My hardware is pretty straight forward. I have an ATMEGA328P hooked up with an LED on PB5, primarily to troubleshoot, and a wire that connects PD2 (INT0) to PD0 (RX), hoping to use INT0 to wake up the ...
1
vote
1
answer
178
views
For a UART communication, when do we enable/disable the peripheral wrt changing between transmitting and receiving mode?
I am working with SAML22 microcontroller and I am supposed to write the transmission code using the interrupt mode. I am confused in which case I am supposed to disable the peripheral.
When changing ...
1
vote
1
answer
1k
views
STM32: USART interrupt triggered with no flags
I am using USART1 on STM32L051 with interrupts for serial communication. I start my program by sending 5 bytes from MCU to PC, which works fine, but then a USART interrupt gets triggered with only TXE ...
0
votes
2
answers
2k
views
How can I handle Overrun and Framing errors in UART transmissions on PIC16 devices?
I am transmitting and receiving data over UART between two PIC16 devices using interrupts, but at random times, one of them seems to block its receiver and it stays stuck in that position permanently. ...
-1
votes
1
answer
1k
views
PIC18 UART interrupt priority problems
I am completely new to microcontroller programing. Just started my journey with PIC18F24K22 and now I am on the UART interrupt stage. I have been reading the datasheet meticulously and it really took ...
1
vote
1
answer
776
views
STM32 USART Does Interrupt Trigger if TXE was set before TXEIE
STM32F746 Disco, STM32CubeIDE 1.7.0, Win 10, CMSIS-only, C language, on registers.
I'm writing a UART transmit driver on interrupts (load data into buffer array, automatically fetch it from there with ...
1
vote
1
answer
405
views
PIC18, XC8 compiler, enable multiple interupts
I am trying to make a module that needs to communicate over USART module, and also, do some tasks on a timer basis. (1ms / 30sec / 2 minutes)
Now I need to enable USART interrupt and enable a 1ms ...
0
votes
2
answers
221
views
Transmission interrupt in PIC18F46K80
I'm using a PIC18F46K80 and have been trying to send data to the computer using USART module (simulating in Proteus). This is my code:
...
2
votes
1
answer
263
views
PL011 clear interrupt when interrupt condition is true
PL011 seems to have a level triggered interrupt system, meaning, when certain criteria (e.g. enough space in TX buffer) is true, the interrupt line will be asserted. It is confusing how this interacts ...
0
votes
1
answer
532
views
MSP430 UART Trouble
I'm trying to learn how to use UART on a MSP430G2553 and I wrote this simple program. The program should set up a timer interrupt to happen once a second. The interrupt service routine should toggle a ...
1
vote
1
answer
7k
views
STM32 UART interrupt with callback not working
I am trying to make a small project with an STM32 which uses serial commands to control the rotation direction of a motor. I used UART interrupts and callbacks to try to achieve that.
I am using an ...
2
votes
2
answers
5k
views
Determining how many bytes DMA receives with HAL_UART_Receive_DMA
How can I determine how many bytes to receive with DMA?
I use the this function:
HAL_UART_Receive_DMA(&huart2, (uint8_t*)rs485RxDMABuffer, 100)
If I don't ...
0
votes
0
answers
1k
views
STM32 uart interrupt not firing
After having a UART echo working on my nucleo F446ze, I am trying to get UART interrupts working.
I thought all I had to do is :
set the priority for the UART3 interrupt
enable the USART3_IRQn
...
0
votes
1
answer
226
views
UART doesn't transmit all characters when using UDREn interrupt
Note: I am beginner :) MCU: Atemega328p
In Method 1, I am using a UDRn data register empty interrupt once the transmit buffer is empty and inputting characters from ...
1
vote
2
answers
287
views
Does this interrupt improve performance even with while loop in ISR?
Note: I am a beginner :) MCU: Atmega328p
Which program below burdens the CPU the least? Would it be a significant difference?
Objective: to make a more "efficient" serial monitor by ...
0
votes
1
answer
2k
views
UART RX Interrupts Stop Working After a Few Seconds
I am writing a very simple program to validate that my board (STM32L4) can receive terminal (TeraTerm) characters via interrupt. The program runs as expected for the first few seconds (anywhere ...
0
votes
0
answers
245
views
Why Arduino not receiving RS485 data?
I am trying to send data from Arduino mega (message "ping") to Arduino nano, then send back (message pong) to the mega board, I am not receiving "pong" back to the mega board, why ...
0
votes
1
answer
1k
views
STM32 - cannot properly send UART response because EXTI frequently interrupts UART handler with higher priority
I'm using STM32F4 with HAL. It is configured as a simple counter as it counts pulses via EXTI interrupt. I want to asynchronously ask for the current number of impulses via UART.
Highest frequency of ...
0
votes
0
answers
655
views
STM32G474 HAL Interrupt problem
I've just started learning STM32. I want to make a simple code that uses UART in interrupt mode. Unfortunately I can't make it work.
I want an interruption occur when the microcontroller receives a ...
1
vote
0
answers
285
views
TXE Interrupt is not generated ARM STM32F103C6
I'm trying to write a class to have the possibility of sending data using UART by TXE (TDR is empty) Interrupt. The class uses only USART1. The class has a ring data buffer to send. I have written a ...
2
votes
1
answer
3k
views
Checking interrupt flags for UART data receiving and transmitting on STM32
I'm trying to develop a UART receiver/transmitter for an academic project. For now i developed the UART continuous data receiving part and it works quite well. Here is the code:
Interrupt file:
...
0
votes
1
answer
202
views
ATSAM4E UART1 interrupt not working
I am working on ATSAM4E8C on custom board. The uart0 and its interrupt is working fine but while on uart1 I faced an strange issue. The uart1 is sending the data but interrupt handler is not calling ...
1
vote
1
answer
674
views
STM32 UART: combining interrupt and DMA modes
I am trying to use UART3 of STM32F103K8 to rx data in interrupt mode and tx in DMA mode.
Reception works well, but transmission ...
3
votes
2
answers
1k
views
Reading interrupt safe ring buffer
I have a piece of code here that was generated by Atmel START Wizard.
It setups a UART and it also creates a ring buffer for reading data.
This is the code that reads data from the buffer:
...
0
votes
1
answer
78
views
Do UART RX interrupts require support from the transmitter?
I'm trying to understand why I am seeing RX interrupts when tying RX to TX of my SAMR34 but not when I connect it to the transmitting device. The transmitting device notes the following restrictions:
...
1
vote
1
answer
707
views
UART receive detection
I am working with UART and I want to do something but could not achieve myself.
I want to enter an interrupt when the data receive stops, i.e when I unplug the cable, do something only once and then ...
0
votes
0
answers
57
views
MEGA2560 only starts program after pressing RESET button multiple times
I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
2
votes
1
answer
1k
views
DMA, Interrupt, and UART connection in STM32 for detecting characters
I am trying to make a project and planning on using 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 ...
5
votes
2
answers
12k
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 ...
0
votes
2
answers
2k
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 ...
1
vote
1
answer
4k
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
1
answer
266
views
USART ISR on TXC breaking delays from <util/delay.h>?
I am trying to work out USART ISR's on the ATmega 328P. So far I have got the USART rx and tx working. I have come across a strange issue when it comes to the UART ISR's, though. The ISR seems to ...
2
votes
1
answer
2k
views
PIC32MX UART interrupt not working
I am writing a program to send data from one microcontroller and receive the data using on another PIC32 microcontroller and display the received data on LCD.
I am using UART2 of both PIC32MX to send ...
0
votes
1
answer
162
views
Why is the the uart_rx _interrupt is not triggering on a PIC32MX775F256H?
void __ISR(_UART1_VECTOR, ipl6) IntUart1Handler(void)
{
if(!INTGetFlag(INT_U1RX))
{
g_intraised++;
}
IFS0bits.U1RXIF=0;
}
uart ...
0
votes
1
answer
721
views
Using UDRIE0 interrupt in ATmega168
I only have some limited knowledge in interrupts.
This is what I understand about following ISR functions
ISR(USART_RX_vect) will get called when a new data ...
0
votes
1
answer
442
views
USART not entering ISR STM32F030C8
I'm working on UART using interrupts on Stm32F030 controller.
I have done the following init.
...
1
vote
1
answer
2k
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
2
answers
5k
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.
...
0
votes
1
answer
273
views
why doesn't this code receive string ?(it just receive the first character)
I want to receive a string whit atmega8 that is sent by another atmega8. The sender send string just one time, but in receiver just first character is received. I can't understand what is the problem?
...
0
votes
2
answers
4k
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
1
answer
2k
views
stm32f0 uart1 rx interrupt [closed]
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 ...
2
votes
1
answer
314
views
PIC24FJ256GA410, UART interrupt, freeze after enable
I'm fairly new to PIC and MCUs. My board has PIC24FJ256GA410 MCU with external 3.6864 MHz crystal. I'd like to use UART1 for debugging purposes. Below is my main() ...
0
votes
1
answer
3k
views
UART on PIC16F1829 - RCIF Interrupt for RX pin not working, cannot receive anything even with polling
Code is written in MPLABX v4.00 with XC8 compiler.
I am new to writing firmware for 8-bit PICs and could use some help with my code. I am using a PIC16F1829 for an LED module which gets RX commands. ...
1
vote
2
answers
543
views
USART ISR keeps repeating 4 times
Hi,
I'm having a problem with the USART_RX_vect interrupt of the ATMega 328p. The receiving works fine and I'm able to evaluate the sent bits (so it's not due to the baudrate) but everytime I send a ...
3
votes
3
answers
2k
views
How to allow thread and interrupt safe writing of incoming USART data on FreeRTOS?
I have a [circular] buffer that is written with incoming data from the USART using IRQ. I also have other tasks reading data from the buffer as well. What should I do in a scenario where a task has ...
1
vote
1
answer
2k
views
USART in SPI mode vs. SPI hardware speed
On AVR ATmega devices, the USART has the capability to function in SPI mode (i.e. synchronous with no start or stop bits). The chief operational difference is that the TX line (i.e. MOSI) has a buffer,...
0
votes
0
answers
294
views
How can I echo characters from UART0 to UART1
I am looking for a good tutorial or help in working with two UART's at the same time. I have UART1 connected to a BT modem and UART0 connected to a cell modem. I want to be able to have good two way ...
0
votes
2
answers
758
views
preventing Rx/Tx data clashing on a xmega USART
I am using the USART module on an atxmega128a1 to communicate with a PC, and I've noticed that receiving and transmitting a byte uses the same data register address:
My question is then, if I am in ...
1
vote
3
answers
12k
views
STM32F031K6 HAL UART Interrupts problem
I got a new STM32F0 31 K6 nucleo board and I need to make a GSM UART interface on that board. I need to send an AT and receive an OK from the GSM board as a first step.I am able to transmit AT ...