Skip to content
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

M024 AMS, IMD meas and other CAN message definced - Andy #8

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

dngusaud
Copy link
Contributor

@dngusaud dngusaud commented Jun 8, 2024

The new AMS CAN message and old existing one included

IMD Measure output
AMS can read the frequency of the IMD_STM_MEAS pin to get more information about IMD state.

  • 10Hz = Normal State and its duty cycle represent healthnies of insulation 5%=Good, 95%=Bad, this duty cycle data should be output as uint8 as name of IMD_insulation_meas.
  • 20Hz = Under Voltage Lock Out, if the measured HV voltage is below, its set value (depend on unit) the IMD will enter Fault state
  • 30Hz is similar to 10Hz normal state but reports before the 2 second delay. We don't send CAN message in that 2 second start up so negligible.
  • 40Hz = IMD Error, for whatever reason, if the IMD unit itself is in error.
  • 50Hz = IMD Earth Connection faulty. The earth (chassis and GND) connection for IMD is bad.

AMS AUX GPIO state
Each bit of byte 1 ID 0x101, reflects the GPIO state of the STM's AUX GPIO pin. these are reserved for future debug purpose.

AMS Firmware version
Its set as uint8, but feel free to use more byte if needed to represent AMS firmware version.

And there are some other old original stuff that are simply included to the protobuf, so it all kept in one place.
0x105
0x106

Copy link
Member

@Jack17432 Jack17432 left a comment

Choose a reason for hiding this comment

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

Just minor changes

bool AMS_AUX_GPIO7 = 15; /* AMS's AUX GPIO 1 state, reserved for future purpose. */

/* Below is about AMS firmware version*/
int8 AMS_firmware_version = 17; /* Current AMS Firmware's version or equivalent info */
Copy link
Member

Choose a reason for hiding this comment

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

If we wanna do this I recomend the first 4 char of a git commit and so please change this to a char[4] or other such data. This means that it auto sets the value depending on what git hash it is and so we can search through the commit history rather then each individual commit

Comment on lines +49 to +56
message AMSError {
bool precharge_completed = 8; /* Only send this message with value of 1 at bit 7 once when precharge completed, so rising edge only. */
}

/* Current ID: 0x106 */
message AccNotReady{
bool acc_not_ready = 8; /* Send this message when the ACC is not ready to enter TS Active mode. */
}
Copy link
Member

Choose a reason for hiding this comment

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

Please merge this takes up to much space on the can line for what it dose

bool AIR_NEG = 8; /* AIR Negative Relay State. 1 is closed, 0 is open */
/* Current ID: 0x105 */
message AMSError {
bool precharge_completed = 8; /* Only send this message with value of 1 at bit 7 once when precharge completed, so rising edge only. */
}
Copy link
Member

Choose a reason for hiding this comment

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

O lol I thought this wasnt done yet my bad

@Jack17432 Jack17432 merged commit b2f45f3 into main Jun 12, 2024
1 check failed
@Jack17432 Jack17432 deleted the M024-AMS-CAN branch June 12, 2024 04:02
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.

2 participants