-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement interrupt-driven UART transfers #267
base: main
Are you sure you want to change the base?
Conversation
9c04f4f
to
a465463
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall seems good. Mainly add macros
@@ -391,7 +391,8 @@ static obc_error_code_t handleSendingConnState(void) { | |||
} | |||
obc_error_code_t errCode; | |||
#if COMMS_PHY == COMMS_PHY_UART | |||
RETURN_IF_ERROR_CODE(sciSendBytes(connCmdPkt.data, (uint32_t)connCmdPkt.length, portMAX_DELAY, UART_PRINT_REG)); | |||
RETURN_IF_ERROR_CODE( | |||
sciSendBytes(connCmdPkt.data, (uint32_t)connCmdPkt.length, portMAX_DELAY, pdMS_TO_TICKS(100), UART_PRINT_REG)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add macro for pdMS_TO_TICKS(100)
and change it everywhere this value is used. What does this represent? Why is it 100?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, changed to 1000ms to be more generous. It's just a value that should be enough for the transmit, and I'm now using 1000 to keep it in line with the timeout for reading the first byte (sciReadBytes in same file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be tested on board with vn100 before merge but lgtm other than that. Also make sure you saved the project after making the halcogen changes
Purpose
https://www.notion.so/uworbital/Implement-interrupt-driven-UART-transfers-210f61abbeed4549bacdadde775f3bee?pvs=4
Make transfers from the RM46 to the IMU async (using UART).
New Changes
sciSendBytes
inobc_sci_io
.sciReadBytes
.Testing
Outstanding Changes