Skip to content

Conversation

@raffael0
Copy link
Member

This PR works in conjunction with the PRs in STRHAL, LLServer and can_houbolt.
It adds monitoring of the can chip states of each ECU. The data is sent via can to the llserver which logs it in Influx.

Notable here is that the LEC and DLEC counters are measured in between getSensorState calls and only values != 0b111 are saved to not overwrite values.

@raffael0 raffael0 requested a review from miDeb April 10, 2025 19:57
Copy link
Member

@miDeb miDeb left a comment

Choose a reason for hiding this comment

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

Looks good, just had one question about LEC and DLEC where I'm probably missing some context. EDIT: Sorry, overlooked what you wrote in the PR description.

@raffael0
Copy link
Member Author

I'm not entirely sure this is the best way to read the DLEC/LEC stats but I haven't found a better way. I'm open to suggestions though.

The DLEC/LEC Registers are reset when there was a successful transmission without error (See page 1991 of the datasheet) so we have to save them between getSensorData calls

@raffael0
Copy link
Member Author

raffael0 commented Apr 12, 2025

One thing i don't how to fix: Most of the PSR/CSR Register Values are reset on read. Idk how the chip deals with me getting the whole register but then only accessing certain bits(when reading DLEC/LEC). Are they then reset? What should my code do in that case?

It could be that we are reading so quickly that we never reach high error values because they are reset before even getting high. But then again I don't know of a better way to do it

Do you have an Idea how we should tackle this?

@raffael0 raffael0 force-pushed the feature/can_monitoring branch from a345760 to 37b1fbe Compare April 15, 2025 18:21
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.

3 participants