⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
11 posts / 0 new
Last post
matthieuW
Offline
Last seen:3 months 1 week ago
加入:2015-11-20 14:55
DA16881 fuel gauge

Dear Dialog,

i implemented a da14681 on a custom system on chip.

My system runs on a lithium ion batterie.

My problem is that the socf function is crashing my system when activated, the board is not booting and thus it is not possible debug easily.

I implemented a workaround in which i retreive manually the battery voltage through the ad_battery_raw_to_mvolt() function and then calculate the battery level through linear regression.

However this method do not take into account the current consumption and thus is not precise enough, i have battery level jumping a few percent during device operation.

Thus it looks like i need the socf system working

i defined my battery parameters in a custom_socf_battery_profile.h file (attached here) and defined the dg_configUSE_ADC_GAIN_ERROR_CORRECTION and dg_configUSE_SOC in my custom_config_qspi.

Device:
PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi matthieuW,

Hi matthieuW,

Thanks for your question. Please refer to theUM-B-075: DA1468x State of Charge Functionalityuser manual. Do you have same configuration? Additionally, are you able to run the pxp_reporter example of the SDK in your custom board and with the SoC enabled?

请检查项目\ dk_apps \ demo \ pxp_reporter\ readme_soc.md file.

I assume that you have the SOCp / SOCn physically connected in your design.

If you run it in debug mode, where it gets stuck ? Are you able to run it until the main() function? If yes, then are you able to step the code? Please provide me some more details on this.

Thanks, PM_Dialog

matthieuW
Offline
Last seen:3 months 1 week ago
加入:2015-11-20 14:55
Dear Dialog,

Dear Dialog,

Socp and socn are connected, I attached my schematic for your validation.

I cannot launch the debugger, it does not run to the main function.

I am working to implement the pxp_reporter on my design, it seems, i have some configurations to check, i ll comeba ck to you soon on this point

Attachment:
matthieuW
Offline
Last seen:3 months 1 week ago
加入:2015-11-20 14:55
Dear dialog,

Dear dialog,

i managed to run the pxp_reporter project on my custom board with and without soc activated, Thus is seems my problem is not hardware but in the configuration.

can you help me on the subject?

Best Regards

Matthieu

PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi Matthieu,

Hi Matthieu,

Could you please check that you have the same configuration like the pxp_reporter? Please also refer to paragraph 5.4 How to Enable SOCF Driver. Are you using the same configuration?

You mentioned that the code is not booting, so can you please run it in debug mode? If you disable the SoC, does the device boots?

Thanks, PM_Dialog

matthieuW
Offline
Last seen:3 months 1 week ago
加入:2015-11-20 14:55
Hi Dialog,

Hi Dialog,

i implemented the socf in my project using the code from pxp_reporter project.

when i disable soc the device is booting whitout problem.

I compared my configuration with the one from pxp reporter, aside from peripheral enables and other options i need in my application, i have the following difference ;

optimal_retram =0 , power_1v8_sleep=0 and memory specific is different.

Can these configurations impact the soc?

I attached my config for your review

Thanks

Matthieu

Attachment:
PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi Matthieu,

Hi Matthieu,

Could you please try to use same configuration as in the pxp_reporter? Is this working? Additionally if you try to run in debug mode, is the code getting stuck anywhere (for example into an assertion). Additionally, I would suggest to run it in debug mode, add some break points and try to step the code. What is the behavior?

Thanks, PM_Dialog

matthieuW
Offline
Last seen:3 months 1 week ago
加入:2015-11-20 14:55
Hi dialog,

Hi dialog,

i used pxp reporter configuration without the optimal retram option ( linker error when i use this option), I disabled some parts of my application in order to match the pxp reporter config.

and the result is the same, the debbugger is stoping before reaching my code, thus i cabnot give you the behavior.

Thanks for your help

matthieu

Attachment:
PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi Matthieu,

Hi Matthieu,

你能添加一个破发点我吗n the start of main() ? Does the BKPT hit?

Thanks, PM_Dialog

matthieuW
Offline
Last seen:3 months 1 week ago
加入:2015-11-20 14:55
Dear Dialog,

Dear Dialog,

i don't know why but i can't manage to have the debbuger working on my application,

Anyway I managed to have a correct battery level by smoothing the level with a moving average filtering.

Best Regards

matthieu

PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi Matthieu,

Hi Matthieu,

To be honest I am not completely sure why you are not able to attach the debugger. Probably you might try it in a new SDK directory and with the .metadata folder deleted.

Glad that you are now able to get better results and thanks for let us know.

Thanks, PM_Dialog