Skip to content

Conversation

@KSMehta11
Copy link

@KSMehta11 KSMehta11 commented Dec 31, 2025

Changes

  • Ported redundancy code from Shepard to TSECU.

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please reach out to your Project Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • No merge conflicts
  • All checks passing
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #29

@KSMehta11 KSMehta11 self-assigned this Dec 31, 2025
@KSMehta11 KSMehta11 linked an issue Dec 31, 2025 that may be closed by this pull request
Copy link
Contributor

@caiodasilva2005 caiodasilva2005 left a comment

Choose a reason for hiding this comment

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

This is very awesome Kaushik thank you for doing this. Do we have to add to the can json in Odyssey definitions for the isospi status message?

void read_adbms_data(cell_asic chips[NUM_CHIPS], uint8_t command[2], TYPE type,
GRP group, SPI_HandleTypeDef *hspi)
{
adbms_wake_isospi(hspi);
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this tested during your previous tests of isoSpi redundancy? Didn't know that we didn't have to wake before reading on the 6830

Copy link
Author

@KSMehta11 KSMehta11 Jan 2, 2026

Choose a reason for hiding this comment

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

The wake function calls were moved into the driver functions. After break recovery, the driver functions must determine the chip count on each isoSPI line and issue wake commands using the dynamic count for each line.

mutex_get(&state_mach->state_mutex);

// Sets non-critical isospi break fault
state_mach->fault_code_noncrit |= ISOSPI_BREAK_FAULT;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should add a function to the state machine interface like set_segments_comms_fault() just to make it clear that we are mutating the fault status of the state machine form an external file

Copy link
Author

@KSMehta11 KSMehta11 Jan 2, 2026

Choose a reason for hiding this comment

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

That makes sense. I can add this.

Also, should I update the fault name to SEGMENT_COMMS_FAULT per the new fault table.

Copy link
Contributor

@caiodasilva2005 caiodasilva2005 left a comment

Choose a reason for hiding this comment

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

Looks very good. Once building then I can approve merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate Isospi Redundancy

3 participants