Atmel LightWeight Mesh stack hanging

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

We've been working with Atmel's new LightWeight Mesh stack for the past couple months. We're using the ATmega128RFA1 and decided to go with LightWeight Mesh over BitCloud because the footprint was so much smaller.

I have a pretty straight forward application level protocol for LightWeight Mesh, a master sends a request, a slave replies.

Right now the interface runs fine between the master/slave, but the master seems to get stuck in the LightWeight Mesh stack randomely. I connected an AVR Dragon to run the debugger and found the stack getting stuck in:

void nwkDataReqTaskHandler(void) in nwkDataReq.c.

I see that req and req->next point to the same address, so it gets stuck in the for loop that is checking the state. req->state is equal to 1. It appears the stack is waiting for a confirmation that doesn't come in, but there isn't a timeout for this condition. Also it just seems wrong that req->next is equal to req. HELP PLEASE, I've been stuck on this for a few days now.

Last Edited: Fri. Oct 16, 2015 - 02:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

To add more details, in addition to the transceiver interrupts, I have blocking interrupts for Timer1 and Timer3 in my code - none of the other features of LightWeight Mesh other than the RF part are used.

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

You are calling NWK_DataReq() twice on the same structure before previous request was confirmed. Don't do that.

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

alexru wrote:
You are calling NWK_DataReq() twice on the same structure before previous request was confirmed. Don't do that.

Nailed it, thanks.