naren0nindiatimes / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
0 stars 0 forks source link

Msp430Adc12ImplP lock-up edge case solved #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Found an area of the MSP430 ADC12 code that can cause certain (all?) 
microcontrollers to lock-up after a software reset.  The edge case occurs when 
the ADC12 is in use before the software reset, and after the software reset the 
ADC12 interrupt fires.  After the software reset and upon boot, the 
Msp430Adc12ImplP state machine is in an undefined state (0), which is not 
covered by a switch statement later in the code that handles a new ADC12 
interrupt.  The ADC12 interrupt fires when interrupts are enabled, and 
infinitely loops because stopConversion() can never be called.

The solution is simple:  add a default case to the switch statement in 
Msp430Adc12ImplP that stops conversions if the ADC12 interrupt fires while the 
driver is in an undefined state.

Original issue reported on code.google.com by mossm...@gmail.com on 27 Apr 2011 at 10:23

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by philip.l...@gmail.com on 2 May 2011 at 7:12

GoogleCodeExporter commented 8 years ago
discussion on how to fix this is ongoing, follow it on: 
http://www.mail-archive.com/tinyos-devel@millennium.berkeley.edu/msg00008.html

Original comment by jan.hauer@gmail.com on 3 May 2011 at 3:49

GoogleCodeExporter commented 8 years ago
fixed (see also further discussion here: 
https://www.millennium.berkeley.edu/pipermail/tinyos-msp430/2011-May/000327.html
).

Original comment by jan.hauer@gmail.com on 17 May 2011 at 1:30