Skip to content

ADBMS reversible isospi & command count#2118

Open
pranay-o wants to merge 5 commits into
masterfrom
pranayo/adbms_cc_reviso
Open

ADBMS reversible isospi & command count#2118
pranay-o wants to merge 5 commits into
masterfrom
pranayo/adbms_cc_reviso

Conversation

@pranay-o

Copy link
Copy Markdown
Contributor

No description provided.


uint8_t expected_count = 0U;
Segments<uint32_t> mismatch_counts{};
io::semaphore command_count_lock { true };

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way this lock is used is kinda stupid. easy to cause a deadlock with spi lock

mismatch_counts[seg]++;
return false;
}
return true;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if it should resync or reset. if i try to reset, it causes deadlock so keep this way or think of smth better

continue;
}

if (not commandCount::check(static_cast<uint8_t>(segment), segment_reg_group.cmd_count())) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if i unplug the segment, bus will go high so would i expect 0x3F here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do I care if ts happens cuz this a different issue. it would keep on trying to correct it but it will always stay 0x3F so mismatch number will keep on increasing

@pranay-o
pranay-o marked this pull request as ready for review July 15, 2026 23:37
@pranay-o pranay-o self-assigned this Jul 16, 2026
@pranay-o pranay-o added the BMS Battery Management System label Jul 16, 2026
@pranay-o pranay-o changed the title I LOVE ADBMS!! ADBMS reversible isospi & command count Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BMS Battery Management System

Development

Successfully merging this pull request may close these issues.

1 participant