travisgoodspeed / goodwatch

Replacement board for Casio Calculator Watches using the CC430F6147

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Radio Active in Non-Radio Devices

travisgoodspeed opened this issue · comments

In a GoodWatch30 prototype with a CC430F6147, the following high
current draw was observed in EnergyTrace. The prototype has no radio,
but ought to gracefully degrade its consumption rather than draw so
much.

                                GoodWatch Current Consumption                  
                                                                               
         0.00274 +---------------------------------------------------------+   
                 |           +          +           +      A   +           |   
         0.00272 |-+                             "energytrace.txt"    A  +-|   
                 |                                        A A              |   
          0.0027 |-+     A      AA               AA A        A     A AA  +-|   
                 |A  AA A A  A      A   A        A  A     A A A  AAA     A |   
         0.00268 |A+ AAAA AAAA  AA          A  A AAA   A AAAAA  AA AAAA A+-|   
                 |AA AAAAA AA   AAAAAAAAAAA AAA  AAA     AAAAAA  AAAAAA AAA|   
         0.00266 |AAAAAA AAAAAAAAAAAA AAAA AAAAAAAAAAAA AAAAAAAAAAAAAAAA AA|   
                 |AAAAAAAAAAAAAAAAAAAAAAAAA A  AAAAAAAAAAAAAAAAA AAAAAAAAAA|   
                 |AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|   
         0.00264 |AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|   
                 |AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|   
         0.00262 |AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA|   
                 |AAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAA AAAA|   
          0.0026 |AAA     AA          A       AAA  AA A AA    AAAAA AA AAAA|   
                 |           +          +           +         AAA          |   
         0.00258 +---------------------------------------------------------+   
                 10          20         30          40         50          60  
                                           Seconds                             
                                                                               
../bin/batterylife.py <energytrace.txt
2631.487862 µA average consumption
0.052022 months of CR2016 battery life.

Disabling the radio module fixed the problem, implying that we
do not properly disable the radio hardware when no high frequency
crystal is present.

                                GoodWatch Current Consumption                  
                                                                               
        0.0000048 +--------------------------------------------------------+   
                  |          +           +          +           +          |   
                  |                              "energytrace.txt"    A    |   
        0.0000047 |-+                        AA      AA          AA      +-|   
                  |                                                        |   
                  |                                                        |   
        0.0000046 |AAA AA        AAAA    AAA    AA         AAAAAAA AA  AAA-|   
                  |                                                        |   
                  |  AA  AAAAA        AAAA  AA   AA   AAAA          AAA  AA|   
        0.0000045 |-+                                                    +-|   
                  |                                                        |   
        0.0000044 |-+      AA  AAA   AA       AAA         AA   A      AA +-|   
                  |                                                        |   
                  |                                                        |   
        0.0000043 |AA   AAA  AA AAAAAA AA  AA      AAA   AA  AA   AA   AA+A|   
                  |                                                        |   
                  |          +           +          +           +          |   
        0.0000042 +--------------------------------------------------------+   
                  10         20          30         40          50         60  
                                           Seconds                             
                                                                               
../bin/batterylife.py <energytrace.txt
4.471645 µA average consumption
30.614092 months of CR2016 battery life.

This is caused by improper sequencing in radio_off() and radio_strobe() exiting early if !has_radio.