How to change battery monitoring parameters?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
joki_2146851
Level 3
Level 3
5 likes given First like received First like given

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.



0 Likes
1 Solution

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 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.

View solution in original post

0 Likes
3 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

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.

0 Likes

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.

0 Likes

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 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.

0 Likes