Skip to content

Conversation

@dmolteni
Copy link

Hi,
testing an app on a custom platform I found the node stop to send radio message: the problem was the InterrupCCA in CC2420ControlP is never fired like the logical level from radio remains low. This hang the code in an infinite wait of CC2420 oscillator is stable. Also hang the SPI bus so also external memory is not usable.

I don't know why on telosb/tmote platform is not consider CC2420 oscillator can not stabilize, but I think this changes can useful also on that pltaform to handle it.

I add a timeout for the interrupt, using double time reported on CC2420 datasheet. When timeout expire it checks, using a NOP, the status byte to see if oscillator is stable or not: in case it isn't set status on S_VREG_STARTED and signal it fails.

I also handle error condition in default LPL component:

  • in DefaultLpl componet: resignal the error case on sendDone event to signal the message is not sent
  • in PowerCycle component: post task to retry to turn on the radio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants