diff options
author | Aseda Aboagye <aaboagye@google.com> | 2021-02-11 15:57:45 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-17 01:16:14 +0000 |
commit | c9132466c0c6a7743246e0a5d8f8c407d4cf13f1 (patch) | |
tree | 79837e59afcd49b0b7c7862683f2503fa71b65d3 /board/sasuke | |
parent | 2d117a7373bb48e4ddd5385952a3bc070794f73a (diff) | |
download | chrome-ec-c9132466c0c6a7743246e0a5d8f8c407d4cf13f1.tar.gz |
magolor and friends: Adjust OCPC PID constants
Thus far, it seems that boards that use the same OCPC PID constants
behave similarly. Therefore, this commit updates the constants that
were most recently used on madoo to the other OCPC boards that use the
same charger IC such that the behaviour meets the criteria at
go/ocpc-testing.
- Converges around the target current.
- Average steady state error is less than 4% of target.
- Current is reduced to target level in less than 5s when load is
suddenly released.
BUG=None
BRANCH=dedede
TEST=Build and flash magolor. Verify that battery can charge to 100%.
Verify that it meets or exceeds the constraints above.
TEST=Verify that DUT can come out of battery cutoff from sub board.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I206854c097c307b941a64547f9b74c8259a7d499
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2691585
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/sasuke')
-rw-r--r-- | board/sasuke/board.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/board/sasuke/board.c b/board/sasuke/board.c index 962f4a6bab..39223fc60c 100644 --- a/board/sasuke/board.c +++ b/board/sasuke/board.c @@ -392,25 +392,12 @@ __override void ocpc_get_pid_constants(int *kp, int *kp_div, int *ki, int *ki_div, int *kd, int *kd_div) { - /* - * Early boards need different constants due to a change in charger IC - * silicon revision. - */ - if (system_get_board_version() >= 0) { - *kp = 1; - *kp_div = 128; - *ki = 1; - *ki_div = 1024; - *kd = 0; - *kd_div = 1; - } else { - *kp = 1; - *kp_div = 4; - *ki = 1; - *ki_div = 15; - *kd = 1; - *kd_div = 10; - } + *kp = 1; + *kp_div = 20; + *ki = 1; + *ki_div = 250; + *kd = 0; + *kd_div = 1; } int pd_snk_is_vbus_provided(int port) |