[Avrora] Avrora and Msp430/TelosB

Ben L. Titzer ben.titzer at gmail.com
Thu Jan 13 14:27:52 PST 2011


Impressive progress. I am not too sure how correct the MSP430 interpreter
is. Have you done some work to debug it, because I left it in a rather
incomplete state before getting frustrated and starting work on something
else.

-B

On Thu, Jan 13, 2011 at 8:50 AM, Urs Hunkeler <urs.hunkeler at epfl.ch> wrote:

> I've implemented a first version of everything that should be needed to run
> the TinyOS Blink application on the TelosB simulation in Avrora. It doesn't
> quite work and I am running out of ideas on how to debug this. Does anybody
> have some more ideas? (problem description follows)
>
> What is implemented (at least to some extend):
> - low-power modes (including energy monitoring)
> - interrupts (simulated mcu wakes up on timer interrupts)
> - timer A and B (including the compare mode of the capture & compare
> registers, but not the capture mode)
> - basic clock module (including dynamically changing clock source (HF/LF)
> and prescaler for the ACLK and SMCLK signals)
> - watchdog module (does not do resets but would signal if an error occurs)
> - digital input/output ports (LEDs are connected and seem to work)
>
> What happens when I run the Blink application: With the debugging
> statements that I have added, I can see that the Blink application
> initializes. It runs the DCO calibration routine (although there is nothing
> it can calibrate :-) ). It then initializes the ports (and seems to try to
> initialize the external flash). After that it enters the sleep mode (LPM3).
> TimerB is configured to run on the external low-frequency clock. Interrupts
> for TimerB (TBIE) are enabled (so the overflow will be signaled), but not
> for the capture/compare 0 (CCA0) module. With the configuration the TimerB
> gets, it overflows every 2 simulated seconds and generates an interrupt. The
> program seems to handle this interrupt and reenters sleep mode. It does not
> appear to execute any pending tasks (that should occur much earlier anyway).
>
> If I force the TimerB CCA0 interrupt to constantly be enabled, the program
> wakes up from sleep mode much earlier (about on time) and turns on the red
> LED. It then reconfigures the TimerB CCA0 and enables its interrupt, then
> enters sleep mode again. From now on the TimerB CCA0 interrupt (TBCCR0
> CCIFG) is regularly called (and reconfigured with the TBCCR0 interrupt
> enabled), but the output for the LEDs doesn't change anymore.
>
> Any ideas on what could go wrong or how I could further debug the program
> are welcome.
>
> Cheers,
> Urs
>
> _______________________________________________
> Avrora mailing list
> Avrora at lists.ucla.edu
> http://lists.ucla.edu/cgi-bin/mailman/listinfo/avrora
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ucla.edu/pipermail/avrora/attachments/20110113/b7cac7e0/attachment.htm>


More information about the Avrora mailing list