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

Problem: race condition #1

Draft
wants to merge 2 commits into
base: Closythia_test
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions 0_Src/AppSw/Tricore/SDP/Inverter/AmkInverter_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ CanCommunication_Message T_TC275_RR;
CanCommunication_Message T_TC275_FR;
CanCommunication_Message T_InvCtr;

CanCommunication_Message T_INV_FL_AMK_Set_Point_log;
CanCommunication_Message T_INV_RL_AMK_Set_Point_log;
CanCommunication_Message T_INV_RR_AMK_Set_Point_log;
CanCommunication_Message T_INV_FR_AMK_Set_Point_log;
// CanCommunication_Message T_INV_FL_AMK_Set_Point_log;
// CanCommunication_Message T_INV_RL_AMK_Set_Point_log;
// CanCommunication_Message T_INV_RR_AMK_Set_Point_log;
// CanCommunication_Message T_INV_FR_AMK_Set_Point_log;
CanCommunication_Message T_INV_FL_AMK_Actual_Values1_log;
CanCommunication_Message T_INV_RL_AMK_Actual_Values1_log;
CanCommunication_Message T_INV_RR_AMK_Actual_Values1_log;
Expand Down Expand Up @@ -321,8 +321,8 @@ void AmkInverter_writeMessage(uint16 Value1, uint16 Value2)
AmkInverter_can_write(&INV_FR_AMK_Setpoint1,T_TC275_FR,Value2);

// Logging
AmkInverter_can_write(&INV_FL_AMK_Setpoint1,T_INV_FL_AMK_Set_Point_log,Value1);
AmkInverter_can_write(&INV_FR_AMK_Setpoint1,T_INV_FR_AMK_Set_Point_log,Value2);
// AmkInverter_can_write(&INV_FL_AMK_Setpoint1,T_INV_FL_AMK_Set_Point_log,Value1);
// AmkInverter_can_write(&INV_FR_AMK_Setpoint1,T_INV_FR_AMK_Set_Point_log,Value2);
// if (Inv_switch_msg.B.BE1on||Inv_switch_msg.B.BE2on||Inv_switch_msg.B.EFon){
if(alreadyOn != 0){
InverterControlSet();
Expand All @@ -337,8 +337,8 @@ void AmkInverter_writeMessage2(uint16 Value1, uint16 Value2)
AmkInverter_can_write(&INV_RL_AMK_Setpoint1,T_TC275_RL,Value2);

// Logging
AmkInverter_can_write(&INV_FL_AMK_Setpoint1,T_INV_RR_AMK_Set_Point_log,Value1);
AmkInverter_can_write(&INV_FR_AMK_Setpoint1,T_INV_RL_AMK_Set_Point_log,Value2);
// AmkInverter_can_write(&INV_FL_AMK_Setpoint1,T_INV_RR_AMK_Set_Point_log,Value1);
// AmkInverter_can_write(&INV_FR_AMK_Setpoint1,T_INV_RL_AMK_Set_Point_log,Value2);
}

void AmkInverter_Start(boolean rtdFlag)
Expand Down Expand Up @@ -592,10 +592,10 @@ static void setTransmitMessageLog(uint32_t ID, CanCommunication_Message *Tm,uint
void AMKInverter_initLoggingMessage(void) {

//Init CAN msg of AMK_Set_Point
setTransmitMessageLog((uint32_t)Inverter_FL.ID_AMK_Set + (uint32_t)0x275000, &T_INV_FL_AMK_Set_Point_log,0);
setTransmitMessageLog((uint32_t)Inverter_RL.ID_AMK_Set + (uint32_t)0x275000, &T_INV_RL_AMK_Set_Point_log,0);
setTransmitMessageLog((uint32_t)Inverter_FR.ID_AMK_Set + (uint32_t)0x275000, &T_INV_FR_AMK_Set_Point_log,0);
setTransmitMessageLog((uint32_t)Inverter_RR.ID_AMK_Set + (uint32_t)0x275000, &T_INV_RR_AMK_Set_Point_log,0);
// setTransmitMessageLog((uint32_t)Inverter_FL.ID_AMK_Set + (uint32_t)0x275000, &T_INV_FL_AMK_Set_Point_log,0);
// setTransmitMessageLog((uint32_t)Inverter_RL.ID_AMK_Set + (uint32_t)0x275000, &T_INV_RL_AMK_Set_Point_log,0);
// setTransmitMessageLog((uint32_t)Inverter_FR.ID_AMK_Set + (uint32_t)0x275000, &T_INV_FR_AMK_Set_Point_log,0);
// setTransmitMessageLog((uint32_t)Inverter_RR.ID_AMK_Set + (uint32_t)0x275000, &T_INV_RR_AMK_Set_Point_log,0);
//Init CAN msg of AMK_Actual_Values1
setTransmitMessageLog((uint32_t)Inverter_FL.ID_AMK_Ac1 + (uint32_t)0x275000, &T_INV_FL_AMK_Actual_Values1_log,0);
setTransmitMessageLog((uint32_t)Inverter_RL.ID_AMK_Ac1 + (uint32_t)0x275000, &T_INV_RL_AMK_Actual_Values1_log,0);
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hotfix race condition on inverter public