Monthly Archives: January 2015

Playing With and Learning Embedded System Stuff

A Lost-wakeup Race Condition Actual Example:

//The code below should make us wait until displayInterruptCount becomes 0.
//The problem is that it stopped after a short while.
 __disable_interrupt();   //first I added this
 while ( displayInterruptCountdown )
 {
    __low_power_mode_3(); //This halts the cpu.  An interrupt will
                          //restart the cpu.  The irq service routine
                          //determines whether the cpu will halt when
                          //servicing is finished.
    //I found operation went BAD here. It counted a bit and then stopped.
    __disable_interrupt();
        //I found second I had to protect the tests after the first!!
 }
 __enable_interrupt();

Ideas for advice to students:

  • You must learn permanently that you must learn temporarily the many precise details corresponding to those in study projects when you do professional projects.
  • A lot of the programming work is to interpret data from an externally defined interface and transmit data to an externally defined interface.
Advertisements