• AVR Freaks

Hot!UART RX interrupt

Author
m_snaeem@hotmail.com
Junior Member
  • Total Posts : 105
  • Reward points : 0
  • Joined: 2020/07/10 10:54:03
  • Location: 0
  • Status: offline
2020/07/29 15:11:24 (permalink)
0

UART RX interrupt

Hello,
I am using PIC32MX512F795L using Harmony 3. I am trying to use TX interrupt when 1 or more then 1 byte received. When i send 1 byte from terminal The program should execute code in RX callback register but it don't enter in Receive Callback Register as RXIF does go high. I have initialized the rx buffer as follow.
uart1Obj.rxBuffer = &test;
uart1Obj.rxSize = 1;


Declaration of my callback register is as follow
UART1_WriteCallbackRegister(Write_ISR, NULL);
 
and I have wrote a simple ISR as follow to check whether enter in the ISR or not
void Read_ISR() {
char data=0;
data = (char)test;
UART4_String_Send(&data, 0);
}

Please guide me where i doing mistake??? 
#1

2 Replies Related Threads

    m_snaeem@hotmail.com
    Junior Member
    • Total Posts : 105
    • Reward points : 0
    • Joined: 2020/07/10 10:54:03
    • Location: 0
    • Status: offline
    Re: UART RX interrupt 2020/07/30 01:33:50 (permalink)
    2 (1)
    When I write a function to send data byte or receive a data byte in UART it executes the ISR for both UART sender and UART reciver. But i don't need this. I want to use UART interrupt when 1 byte is received on the UART receiver. Can somebody suggest what to do???
    #2
    m_snaeem@hotmail.com
    Junior Member
    • Total Posts : 105
    • Reward points : 0
    • Joined: 2020/07/10 10:54:03
    • Location: 0
    • Status: offline
    Re: UART RX interrupt 2020/07/30 15:10:06 (permalink)
    0
    I have received data automatically using Ring Buffer but after the first data received I could not receive data second time and data in the register remain the same.
    I have copy data in a variable. I don't know how which register to read so UART get acknowledgment that data register is received so it can allow the second buffer
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5