• AVR Freaks

USART Overrun Error with PIC32mz

Author
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
2019/03/17 19:24:06 (permalink)
0

USART Overrun Error with PIC32mz

Hi
I am using PIc32MZ2048EFM064 for my project.
My USART freezes and not receiving any data on USART1 (baudrate:256000).
It always gives overrun error.
I have tried work around given in Erata sheet by microchip, but still not able to solve this.
Tried to Disable and enable usart but nothing works.
Is this my device bad ? Or something wrong with harmony 2.4 ?
Can anybody advice me ?
#1
Mysil
Super Member
  • Total Posts : 3951
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 20:03:36 (permalink)
0
Hi,
Why are you asking about USART  in Ethernet forum?
Then there is no Synchronous USART in any PIC32MX or MZ device.
 
Nitpicking aside,
Does the harmony code you have, function at lower bitrates, lower than 100 kbit/s ?
Is there any Flow control enabled?
Do you have access to Oscilloscope or Logic analyzer, to capture UART signaling and Interrupt handler performance?
 
    Mysil
#2
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 20:08:39 (permalink)
0
Sorry for posting at wrong spot.
Microchip in Errata sheet stats that USART lose its synchronisation and its a silicon issue.
 
I have tested with oscilloscope and found that receiver stops receiving 8 bytes buffer and set overrun error.
It continues to generate over run error on all the data.
Looks like never cleared.
Thanks
#3
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 20:25:54 (permalink)
0
Are you getting any good data?
What pin have you assigned U1RX to?
Has this pin been switched form analog to digital mode?
What is driving the PIC's RX pin?
What level does it idle at? (high or low)
 
post edited by qhb - 2019/03/17 20:32:34

Nearly there...
#4
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 20:29:44 (permalink)
0
No, no good data at all.
USART connected with 485 transceiver.
I can see the data in on pic32 Rx pin with Oscilloscope but not receiving on usart register which I have printed on console.
#5
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 20:33:18 (permalink)
0
I added this as you were replying.
 
What pin have you assigned U1RX to?
Has this pin been switched from analog to digital mode?
 
(and you did not answer the final question, "What level does it idle at? (high or low)" )
 
post edited by qhb - 2019/03/17 20:38:23

Nearly there...
#6
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 21:09:07 (permalink)
0
I have assigned RD4 pin to U2RX and RD5 to U2Tx.
Yes, they are configured in digital mode.
 
In Idle : U2Rx = HIGH
U2Tx =HIGH
Thanks
#7
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 21:12:45 (permalink)
0
arpatel
I have assigned RD4 pin to U2RX and RD5 to U2Tx.

In post#1 you said you are using UART#1.
Which is it?
 

Nearly there...
#8
arpatel
Starting Member
  • Total Posts : 69
  • Reward points : 0
  • Joined: 2019/01/09 23:24:14
  • Location: 0
  • Status: offline
Re: USART Overrun Error with PIC32mz 2019/03/17 21:14:43 (permalink)
0
SOrry its USART 2 but on harmony its instance 1.
Thanks
#9
Jump to:
© 2020 APG vNext Commercial Version 4.5