BitCloud: WakeUp from external interrupt and UART

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys,

 

The ED is sleeping and waking up from INT1. ATmega256rfr2 must immediatly start to receive UART data (10usec delay bettweet INT1 signal and UART). In this case my idea is not call ZDO_WakeUpReq() before all UART data received. After received all, called ZDO_WakeUpReq() and then processed data (after WakeUp callback). But it looks like that first several UART bytes lose or distort. I turned on echo on Atmel. For example, send 3 bytes: 0x02 0x2D 0x2D, received: 0xA9 0xF9. But if send 0x05 0x04 0x03 0x02 0x2D 0x2D, received 0x02 0x2D 0x2D. Any suggestions and ideas?

Last Edited: Fri. Oct 16, 2015 - 12:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Both 8 MHz RC oscillator and Xtal oscillator have some startup time, and it is way longer than 10 us. So your UART is just not getting the right clock frequency. You can verify that by sending a string of 'U' bytes (0x55) and looking at how bit length changes with time.
 

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I see. Thank you.