Skip to main content

All Questions

Tagged with
2 votes
1 answer
51 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 ...
Erik Vincent's user avatar
1 vote
1 answer
83 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 ...
missedSemiColon's user avatar
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 ...
Radek Hlavinka's user avatar
0 votes
2 answers
1k 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. ...
Andreiul's user avatar
-1 votes
1 answer
965 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 ...
Vilius Žalėnas's user avatar
1 vote
1 answer
736 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 ...
Ilya's user avatar
  • 3,613
1 vote
1 answer
371 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 ...
K.Azizollahi's user avatar
0 votes
2 answers
202 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: ...
Momo's user avatar
  • 120
2 votes
1 answer
234 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 ...
Abhishek Anand's user avatar
0 votes
1 answer
485 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 ...
dman's user avatar
  • 31
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 ...
kucar's user avatar
  • 211
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 ...
mathco's user avatar
  • 33
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 ...
bas's user avatar
  • 581
0 votes
1 answer
212 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 ...
user13174343's user avatar
1 vote
2 answers
261 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 ...
user13174343's user avatar

15 30 50 per page
1
2 3 4 5 6