3 Replies Latest reply on Feb 8, 2014 10:07 AM by MichaelF_56

    How to change battery monitoring parameters?

    joki_2146851

      blebat_batmon_cfg  in blebatt.c contains parameters that I want to change (for example changing the measurement Interval), but it doesn't seem like I can change them (when I recompile the project this file is not recompiled). Perhaps I'm misunderstanding how this image is used form the ROM. Furthermore I wanted to add trace statement to the blebat_measureAverage function, but I see no trace output, which again leads me to believe either my makefile is not setup correctly or I can't do what I want to do here.

       

      Thanks in advance.



        • 1. Re: How to change battery monitoring parameters?
          MichaelF_56

          Are you able to see the trace ouput for other functions?  There is a procedure within the Quick Start Guide which explains how to setup trace output over the HCI UART.  I will talk to the SW team about the battery monitoring function and it's intended use.

          • 2. Re: How to change battery monitoring parameters?
            joki_2146851

            Yes, I have been using the trace output extensively. I think I'm just not fully understanding how or what code can be overridden or how it needs to be re-compiled in order to change things. I will keep digging and look forward to some insight from your software team.

            • 3. Re: How to change battery monitoring parameters?
              MichaelF_56

              As it turns out, the code in the bleapp\app directory is the ROM code (not patched in).  It's provided primarily as a reference and was not intended to be compiled in the manner described.  What you can do is copy the necessry file[s] to the RAM\<your app> directory, and then include those in the makefile.inc and rename the entry functions to something new. 

               

              For example hello_sensor calls blebat_Init, you can change that to call _blebat_Init and then provide RAM code which will be doing something similar as what was done in the ROM version, but with your required modifications.