Skip to content

[BUGFIX] OBC SPI Driver - bus owner check#266

Merged
ThenujaL merged 5 commits intomainfrom
thenuja/SPI-BusOwner-BugFix
Mar 2, 2025
Merged

[BUGFIX] OBC SPI Driver - bus owner check#266
ThenujaL merged 5 commits intomainfrom
thenuja/SPI-BusOwner-BugFix

Conversation

@ThenujaL
Copy link
Contributor

@ThenujaL ThenujaL commented Jan 28, 2024

Purpose

New Changes

  • Updated mutex check to work without the task having to acquire the mutex
  • Get the mutex holder task handle, get the current task handle and compare the two

Testing

  • Tested build
  • Wrote test tasks and verified behaviours. Test task pushed to new test branch here
  • Test serial output:
Acquired mutex
PASS: isSpiBusOwner returned TRUE after acquiring mutex
Releasing mutex...
Released mutex
PASS: isSpiBusOwner returned FALSE after releasing mutex
PASSED isSpiBusOwner Test!

Outstanding Changes

  • NA

EDIT 2025-03-01: Added more change details, on-board testing

@github-actions
Copy link

Pull reviewers stats

Stats of the last 120 days for UWOrbital:

User Total reviews Time to review Total comments
Navtajh04 33 5d 16h 5m 276
dgobalak 29 4d 10h 5m 213
Gjjjiang 5 12d 17h 14m 16
Yarik-Popov 5 1d 8h 47m 63
manumanuk 2 1d 7h 24m 7
JoelManYunLee 1 17h 57m 4
TheSpaceDragon 1 14d 22h 25m 0

Navtajh04
Navtajh04 previously approved these changes Jan 31, 2024
Copy link
Contributor

@Navtajh04 Navtajh04 left a comment

Choose a reason for hiding this comment

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

LGTM

@dgobalak
Copy link
Member

dgobalak commented Feb 5, 2024

lgtm too, but let's test this before merging

@ThenujaL
Copy link
Contributor Author

ThenujaL commented Feb 9, 2024

lgtm too, but let's test this before merging

@dgobalak Any suggestions on how to test this?

@Yarik-Popov
Copy link
Contributor

Yarik-Popov commented Mar 3, 2024

Errors when running code on launchpad

@ThenujaL
Copy link
Contributor Author

ThenujaL commented Mar 3, 2024

@Yarik-Popov Do we have any logs or any more details on what the errors were?

@Yarik-Popov
Copy link
Contributor

@Yarik-Popov Do we have any logs or any more details on what the errors were?

Couldnt get logs as I'm having some difficulty with serial ports on my laptop, they stopped working for some reason.

I ran your code directly and added port enter/exit critical functions as before, both around xSemaphoreGetHolder and around both helper function calls. In all cases without additional modifications, the launchpad goes into an error state where the ERR LED keeps flashing. If I call this function before a while(1) inside the state_mgr init when the ERR LED doesn't turn on, but the normal led doesn't blink as state_mgr doesn't get to the end of its init. Hope this helps

@Yarik-Popov Yarik-Popov added status: easily testable A member could realistically finish and test during a work session bug Something isn't working labels Mar 1, 2025
@ThenujaL
Copy link
Contributor Author

ThenujaL commented Mar 2, 2025

Added testing

Copy link
Contributor

@kepler452b123 kepler452b123 left a comment

Choose a reason for hiding this comment

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

lgtm

@Yarik-Popov Yarik-Popov removed the status: easily testable A member could realistically finish and test during a work session label Mar 2, 2025
Copy link
Contributor

@Yarik-Popov Yarik-Popov left a comment

Choose a reason for hiding this comment

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

Lgtm

@Yarik-Popov Yarik-Popov dismissed dgobalak’s stale review March 2, 2025 15:32

Already handled

@ThenujaL ThenujaL merged commit 40e1365 into main Mar 2, 2025
48 checks passed
@ThenujaL ThenujaL deleted the thenuja/SPI-BusOwner-BugFix branch March 2, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants