Merge remote-tracking branch 'origin/develop' into acs-flp-safe
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...

This commit is contained in:
Robin Müller 2023-04-14 20:13:50 +02:00
commit fa746f910d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
18 changed files with 400 additions and 195 deletions

View File

@ -47,15 +47,19 @@ will consitute of a breaking change warranting a new major release:
- Add parameter interface for core controller - Add parameter interface for core controller
- Allow setting the preferred SD card via the new parameter interface of the core controller - Allow setting the preferred SD card via the new parameter interface of the core controller
with domain ID 0 and unque ID 0. with domain ID 0 and unque ID 0.
- Added action commands to reset the PDEC. Also added autonomous reset handling for the PDEC,
because there is no way so send TCs with a faulty PDEC.
- Added `I2C_REBOOT` and `PDEC_REBOOT` events for EIVE system component to ensure ground gets
informed.
## ACS ## ACS
- Commanding from ACS Controller is now enabled. - Commanding from ACS Controller is now enabled.
- Safe Controller was reverted to FLP Design. This also introduces safe mode strategies. - Safe Controller was reverted to FLP Design. This also introduces safe mode strategies.
They contain what the controller does and which data it uses. The controller will They contain what the controller does and which data it uses. The controller will
automatically based on the available data decide on which strategy to use. If a strategy automatically based on the available data decide on which strategy to use. If a strategy
is undesirable (e.g. the MEKF should not be used) this can be handeld via setting parameters. is undesirable (e.g. the MEKF should not be used) this can be handeld via setting parameters.
# [v1.44.1] 2023-04-12 # [v1.44.1] 2023-04-12
- eive-tmtc: v2.22.1 - eive-tmtc: v2.22.1

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 285 translations. * @brief Auto-generated event translation file. Contains 289 translations.
* @details * @details
* Generated on: 2023-04-07 17:42:57 * Generated on: 2023-04-14 20:05:50
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -160,8 +160,11 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS"; const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC"; const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC"; const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
const char *PDEC_TRYING_RESET_WITH_INIT_STRING = "PDEC_TRYING_RESET_WITH_INIT";
const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED"; const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED"; const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED"; const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -268,6 +271,7 @@ const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS"; const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY"; const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
const char *I2C_REBOOT_STRING = "I2C_REBOOT"; const char *I2C_REBOOT_STRING = "I2C_REBOOT";
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE"; const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE"; const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING"; const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
@ -604,9 +608,15 @@ const char *translateEvents(Event event) {
case (12409): case (12409):
return WRITE_SYSCALL_ERROR_PDEC_STRING; return WRITE_SYSCALL_ERROR_PDEC_STRING;
case (12410): case (12410):
return PDEC_RESET_FAILED_STRING; return PDEC_TRYING_RESET_WITH_INIT_STRING;
case (12411): case (12411):
return PDEC_TRYING_RESET_NO_INIT_STRING;
case (12412):
return PDEC_RESET_FAILED_STRING;
case (12413):
return OPEN_IRQ_FILE_FAILED_STRING; return OPEN_IRQ_FILE_FAILED_STRING;
case (12414):
return PDEC_INIT_FAILED_STRING;
case (12500): case (12500):
return IMAGE_UPLOAD_FAILED_STRING; return IMAGE_UPLOAD_FAILED_STRING;
case (12501): case (12501):
@ -819,6 +829,8 @@ const char *translateEvents(Event event) {
return TRYING_I2C_RECOVERY_STRING; return TRYING_I2C_RECOVERY_STRING;
case (14011): case (14011):
return I2C_REBOOT_STRING; return I2C_REBOOT_STRING;
case (14012):
return PDEC_REBOOT_STRING;
case (14100): case (14100):
return NO_VALID_SENSOR_TEMPERATURE_STRING; return NO_VALID_SENSOR_TEMPERATURE_STRING;
case (14101): case (14101):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 171 translations. * Contains 171 translations.
* Generated on: 2023-04-07 17:42:57 * Generated on: 2023-04-14 20:05:50
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -145,17 +145,20 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h 12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/payload/PlocMemoryDumper.h 12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/payload/PlocMemoryDumper.h
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/payload/PlocMemoryDumper.h 12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/payload/PlocMemoryDumper.h
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/PdecHandler.h 12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/pdec.h
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/PdecHandler.h 12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/pdec.h
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/PdecHandler.h 12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/pdec.h
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h 12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/pdec.h
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h 12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/pdec.h
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h 12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/pdec.h
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h 12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/pdec.h
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h 12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/pdec.h
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/PdecHandler.h 12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/pdec.h
12410;0x307a;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/PdecHandler.h 12410;0x307a;PDEC_TRYING_RESET_WITH_INIT;LOW;Trying a PDEC reset with complete re-initialization;linux/ipcore/pdec.h
12411;0x307b;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/PdecHandler.h 12411;0x307b;PDEC_TRYING_RESET_NO_INIT;LOW;Trying a PDEC reset without re-initialization.;linux/ipcore/pdec.h
12412;0x307c;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/pdec.h
12413;0x307d;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/pdec.h
12414;0x307e;PDEC_INIT_FAILED;HIGH;PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues.;linux/ipcore/pdec.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h 12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h 12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h 12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h
@ -208,7 +211,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h 12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h 12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h 12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/objects/TcsBoardAssembly.h 13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h 13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h 13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h 13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h
@ -262,6 +265,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;mission/sysDefs.h 14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;mission/sysDefs.h
14010;0x36ba;TRYING_I2C_RECOVERY;MEDIUM;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h 14010;0x36ba;TRYING_I2C_RECOVERY;MEDIUM;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
14011;0x36bb;I2C_REBOOT;MEDIUM;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h 14011;0x36bb;I2C_REBOOT;MEDIUM;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
14012;0x36bc;PDEC_REBOOT;MEDIUM;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h 14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h 14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h 14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
145 12300 0x300c SEND_MRAM_DUMP_FAILED LOW Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command linux/payload/PlocMemoryDumper.h
146 12301 0x300d MRAM_DUMP_FAILED LOW Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command linux/payload/PlocMemoryDumper.h
147 12302 0x300e MRAM_DUMP_FINISHED LOW MRAM dump finished successfully linux/payload/PlocMemoryDumper.h
148 12401 0x3071 INVALID_TC_FRAME HIGH No description linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
149 12402 0x3072 INVALID_FAR HIGH Read invalid FAR from PDEC after startup linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
150 12403 0x3073 CARRIER_LOCK INFO Carrier lock detected linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
151 12404 0x3074 BIT_LOCK_PDEC INFO Bit lock detected (data valid) linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
152 12405 0x3075 LOST_CARRIER_LOCK_PDEC INFO Lost carrier lock linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
153 12406 0x3076 LOST_BIT_LOCK_PDEC INFO Lost bit lock linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
154 12407 0x3077 TOO_MANY_IRQS MEDIUM Too many IRQs over the time window of one second. P1: Allowed TCs linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
155 12408 0x3078 POLL_SYSCALL_ERROR_PDEC MEDIUM No description linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
156 12409 0x3079 WRITE_SYSCALL_ERROR_PDEC HIGH No description linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
157 12410 0x307a PDEC_RESET_FAILED PDEC_TRYING_RESET_WITH_INIT HIGH LOW Failed to pull PDEC reset to low Trying a PDEC reset with complete re-initialization linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
158 12411 0x307b OPEN_IRQ_FILE_FAILED PDEC_TRYING_RESET_NO_INIT HIGH LOW Failed to open the IRQ uio file Trying a PDEC reset without re-initialization. linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
159 12412 0x307c PDEC_RESET_FAILED HIGH Failed to pull PDEC reset to low linux/ipcore/pdec.h
160 12413 0x307d OPEN_IRQ_FILE_FAILED HIGH Failed to open the IRQ uio file linux/ipcore/pdec.h
161 12414 0x307e PDEC_INIT_FAILED HIGH PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues. linux/ipcore/pdec.h
162 12500 0x30d4 IMAGE_UPLOAD_FAILED LOW Image upload failed linux/acs/StrComHandler.h
163 12501 0x30d5 IMAGE_DOWNLOAD_FAILED LOW Image download failed linux/acs/StrComHandler.h
164 12502 0x30d6 IMAGE_UPLOAD_SUCCESSFUL LOW Uploading image to star tracker was successfulop linux/acs/StrComHandler.h
211 12901 0x3265 NOT_ENOUGH_DEVICES_DUAL_MODE HIGH No description mission/system/acs/SusAssembly.h
212 12902 0x3266 POWER_STATE_MACHINE_TIMEOUT MEDIUM No description mission/system/acs/SusAssembly.h
213 12903 0x3267 SIDE_SWITCH_TRANSITION_NOT_ALLOWED LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/acs/SusAssembly.h
214 13000 0x32c8 CHILDREN_LOST_MODE MEDIUM No description mission/system/objects/TcsBoardAssembly.h mission/system/tcs/TcsBoardAssembly.h
215 13100 0x332c GPS_FIX_CHANGE INFO Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix mission/acs/archive/GPSDefinitions.h
216 13101 0x332d CANT_GET_FIX LOW Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on. mission/acs/archive/GPSDefinitions.h
217 13200 0x3390 P60_BOOT_COUNT INFO P60 boot count is broadcasted once at SW startup. P1: Boot count mission/power/P60DockHandler.h
265 14008 0x36b8 INDIVIDUAL_BOOT_COUNTS INFO Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1. mission/sysDefs.h
266 14010 0x36ba TRYING_I2C_RECOVERY MEDIUM I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices. mission/sysDefs.h
267 14011 0x36bb I2C_REBOOT MEDIUM I2C is unavailable. Recovery did not work, performing full reboot. mission/sysDefs.h
268 14012 0x36bc PDEC_REBOOT MEDIUM PDEC recovery through reset was not possible, performing full reboot. mission/sysDefs.h
269 14100 0x3714 NO_VALID_SENSOR_TEMPERATURE MEDIUM No description mission/controller/tcsDefs.h
270 14101 0x3715 NO_HEALTHY_HEATER_AVAILABLE MEDIUM No description mission/controller/tcsDefs.h
271 14102 0x3716 SYRLINKS_OVERHEATING HIGH No description mission/controller/tcsDefs.h

View File

@ -145,17 +145,20 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h 12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/payload/PlocMemoryDumper.h
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/payload/PlocMemoryDumper.h 12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/payload/PlocMemoryDumper.h
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/payload/PlocMemoryDumper.h 12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/payload/PlocMemoryDumper.h
12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/PdecHandler.h 12401;0x3071;INVALID_TC_FRAME;HIGH;No description;linux/ipcore/pdec.h
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/PdecHandler.h 12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/ipcore/pdec.h
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/PdecHandler.h 12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/ipcore/pdec.h
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/PdecHandler.h 12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/ipcore/pdec.h
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/PdecHandler.h 12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/ipcore/pdec.h
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/PdecHandler.h 12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/ipcore/pdec.h
12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/PdecHandler.h 12407;0x3077;TOO_MANY_IRQS;MEDIUM;Too many IRQs over the time window of one second. P1: Allowed TCs;linux/ipcore/pdec.h
12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/PdecHandler.h 12408;0x3078;POLL_SYSCALL_ERROR_PDEC;MEDIUM;No description;linux/ipcore/pdec.h
12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/PdecHandler.h 12409;0x3079;WRITE_SYSCALL_ERROR_PDEC;HIGH;No description;linux/ipcore/pdec.h
12410;0x307a;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/PdecHandler.h 12410;0x307a;PDEC_TRYING_RESET_WITH_INIT;LOW;Trying a PDEC reset with complete re-initialization;linux/ipcore/pdec.h
12411;0x307b;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/PdecHandler.h 12411;0x307b;PDEC_TRYING_RESET_NO_INIT;LOW;Trying a PDEC reset without re-initialization.;linux/ipcore/pdec.h
12412;0x307c;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/pdec.h
12413;0x307d;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/pdec.h
12414;0x307e;PDEC_INIT_FAILED;HIGH;PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues.;linux/ipcore/pdec.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h 12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h 12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h 12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h
@ -208,7 +211,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h 12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h 12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h 12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/objects/TcsBoardAssembly.h 13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h 13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h 13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h 13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h
@ -262,6 +265,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;mission/sysDefs.h 14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;mission/sysDefs.h
14010;0x36ba;TRYING_I2C_RECOVERY;MEDIUM;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h 14010;0x36ba;TRYING_I2C_RECOVERY;MEDIUM;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
14011;0x36bb;I2C_REBOOT;MEDIUM;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h 14011;0x36bb;I2C_REBOOT;MEDIUM;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
14012;0x36bc;PDEC_REBOOT;MEDIUM;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h 14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h 14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h 14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
145 12300 0x300c SEND_MRAM_DUMP_FAILED LOW Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command linux/payload/PlocMemoryDumper.h
146 12301 0x300d MRAM_DUMP_FAILED LOW Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command linux/payload/PlocMemoryDumper.h
147 12302 0x300e MRAM_DUMP_FINISHED LOW MRAM dump finished successfully linux/payload/PlocMemoryDumper.h
148 12401 0x3071 INVALID_TC_FRAME HIGH No description linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
149 12402 0x3072 INVALID_FAR HIGH Read invalid FAR from PDEC after startup linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
150 12403 0x3073 CARRIER_LOCK INFO Carrier lock detected linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
151 12404 0x3074 BIT_LOCK_PDEC INFO Bit lock detected (data valid) linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
152 12405 0x3075 LOST_CARRIER_LOCK_PDEC INFO Lost carrier lock linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
153 12406 0x3076 LOST_BIT_LOCK_PDEC INFO Lost bit lock linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
154 12407 0x3077 TOO_MANY_IRQS MEDIUM Too many IRQs over the time window of one second. P1: Allowed TCs linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
155 12408 0x3078 POLL_SYSCALL_ERROR_PDEC MEDIUM No description linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
156 12409 0x3079 WRITE_SYSCALL_ERROR_PDEC HIGH No description linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
157 12410 0x307a PDEC_RESET_FAILED PDEC_TRYING_RESET_WITH_INIT HIGH LOW Failed to pull PDEC reset to low Trying a PDEC reset with complete re-initialization linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
158 12411 0x307b OPEN_IRQ_FILE_FAILED PDEC_TRYING_RESET_NO_INIT HIGH LOW Failed to open the IRQ uio file Trying a PDEC reset without re-initialization. linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
159 12412 0x307c PDEC_RESET_FAILED HIGH Failed to pull PDEC reset to low linux/ipcore/pdec.h
160 12413 0x307d OPEN_IRQ_FILE_FAILED HIGH Failed to open the IRQ uio file linux/ipcore/pdec.h
161 12414 0x307e PDEC_INIT_FAILED HIGH PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues. linux/ipcore/pdec.h
162 12500 0x30d4 IMAGE_UPLOAD_FAILED LOW Image upload failed linux/acs/StrComHandler.h
163 12501 0x30d5 IMAGE_DOWNLOAD_FAILED LOW Image download failed linux/acs/StrComHandler.h
164 12502 0x30d6 IMAGE_UPLOAD_SUCCESSFUL LOW Uploading image to star tracker was successfulop linux/acs/StrComHandler.h
211 12901 0x3265 NOT_ENOUGH_DEVICES_DUAL_MODE HIGH No description mission/system/acs/SusAssembly.h
212 12902 0x3266 POWER_STATE_MACHINE_TIMEOUT MEDIUM No description mission/system/acs/SusAssembly.h
213 12903 0x3267 SIDE_SWITCH_TRANSITION_NOT_ALLOWED LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/acs/SusAssembly.h
214 13000 0x32c8 CHILDREN_LOST_MODE MEDIUM No description mission/system/objects/TcsBoardAssembly.h mission/system/tcs/TcsBoardAssembly.h
215 13100 0x332c GPS_FIX_CHANGE INFO Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix mission/acs/archive/GPSDefinitions.h
216 13101 0x332d CANT_GET_FIX LOW Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on. mission/acs/archive/GPSDefinitions.h
217 13200 0x3390 P60_BOOT_COUNT INFO P60 boot count is broadcasted once at SW startup. P1: Boot count mission/power/P60DockHandler.h
265 14008 0x36b8 INDIVIDUAL_BOOT_COUNTS INFO Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1. mission/sysDefs.h
266 14010 0x36ba TRYING_I2C_RECOVERY MEDIUM I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices. mission/sysDefs.h
267 14011 0x36bb I2C_REBOOT MEDIUM I2C is unavailable. Recovery did not work, performing full reboot. mission/sysDefs.h
268 14012 0x36bc PDEC_REBOOT MEDIUM PDEC recovery through reset was not possible, performing full reboot. mission/sysDefs.h
269 14100 0x3714 NO_VALID_SENSOR_TEMPERATURE MEDIUM No description mission/controller/tcsDefs.h
270 14101 0x3715 NO_HEALTHY_HEATER_AVAILABLE MEDIUM No description mission/controller/tcsDefs.h
271 14102 0x3716 SYRLINKS_OVERHEATING HIGH No description mission/controller/tcsDefs.h

View File

@ -517,21 +517,21 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h 0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h 0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h 0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h
0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa1;PDEC_FrameDirtyRetval;No description;161;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa1;PDEC_FrameDirtyRetval;No description;161;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa2;PDEC_FrameIllegalMultipleReasons;No description;162;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa2;PDEC_FrameIllegalMultipleReasons;No description;162;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa3;PDEC_AdDiscardedLockoutRetval;No description;163;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa3;PDEC_AdDiscardedLockoutRetval;No description;163;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa4;PDEC_AdDiscardedWaitRetval;No description;164;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa4;PDEC_AdDiscardedWaitRetval;No description;164;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa5;PDEC_AdDiscardedNsVs;No description;165;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa5;PDEC_AdDiscardedNsVs;No description;165;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa6;PDEC_NoReportRetval;No description;166;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa6;PDEC_NoReportRetval;No description;166;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa7;PDEC_ErrorVersionNumberRetval;No description;167;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa7;PDEC_ErrorVersionNumberRetval;No description;167;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa8;PDEC_IllegalCombinationRetval;No description;168;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa8;PDEC_IllegalCombinationRetval;No description;168;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fa9;PDEC_InvalidScIdRetval;No description;169;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fa9;PDEC_InvalidScIdRetval;No description;169;PDEC_HANDLER;linux/ipcore/pdec.h
0x5faa;PDEC_InvalidVcIdMsbRetval;No description;170;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5faa;PDEC_InvalidVcIdMsbRetval;No description;170;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fab;PDEC_InvalidVcIdLsbRetval;No description;171;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fab;PDEC_InvalidVcIdLsbRetval;No description;171;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fac;PDEC_NsNotZeroRetval;No description;172;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fac;PDEC_NsNotZeroRetval;No description;172;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fae;PDEC_InvalidBcCc;No description;174;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fae;PDEC_InvalidBcCc;No description;174;PDEC_HANDLER;linux/ipcore/pdec.h
0x5fb0;PDEC_CommandNotImplemented;Received action message with unknown action id;176;PDEC_HANDLER;linux/ipcore/PdecHandler.h 0x5fb0;PDEC_CommandNotImplemented;Received action message with unknown action id;176;PDEC_HANDLER;linux/ipcore/pdec.h
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h 0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/com/CcsdsIpCoreHandler.h
0x61a0;RS_RateNotSupported;The commanded rate is not supported by the current FPGA design;160;RATE_SETTER;linux/ipcore/PtmeConfig.h 0x61a0;RS_RateNotSupported;The commanded rate is not supported by the current FPGA design;160;RATE_SETTER;linux/ipcore/PtmeConfig.h
0x61a1;RS_BadBitRate;Bad bitrate has been commanded (e.g. 0);161;RATE_SETTER;linux/ipcore/PtmeConfig.h 0x61a1;RS_BadBitRate;Bad bitrate has been commanded (e.g. 0);161;RATE_SETTER;linux/ipcore/PtmeConfig.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
517 0x5d05 GOMS_UnknownReplyId No description 5 GOM_SPACE_HANDLER mission/power/GomspaceDeviceHandler.h
518 0x5ea0 PLMEMDUMP_MramAddressTooHigh The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000. 160 PLOC_MEMORY_DUMPER linux/payload/PlocMemoryDumper.h
519 0x5ea1 PLMEMDUMP_MramInvalidAddressCombination The specified end address is lower than the start address 161 PLOC_MEMORY_DUMPER linux/payload/PlocMemoryDumper.h
520 0x5fa0 PDEC_AbandonedCltuRetval No description 160 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
521 0x5fa1 PDEC_FrameDirtyRetval No description 161 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
522 0x5fa2 PDEC_FrameIllegalMultipleReasons No description 162 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
523 0x5fa3 PDEC_AdDiscardedLockoutRetval No description 163 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
524 0x5fa4 PDEC_AdDiscardedWaitRetval No description 164 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
525 0x5fa5 PDEC_AdDiscardedNsVs No description 165 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
526 0x5fa6 PDEC_NoReportRetval No description 166 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
527 0x5fa7 PDEC_ErrorVersionNumberRetval No description 167 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
528 0x5fa8 PDEC_IllegalCombinationRetval No description 168 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
529 0x5fa9 PDEC_InvalidScIdRetval No description 169 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
530 0x5faa PDEC_InvalidVcIdMsbRetval No description 170 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
531 0x5fab PDEC_InvalidVcIdLsbRetval No description 171 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
532 0x5fac PDEC_NsNotZeroRetval No description 172 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
533 0x5fae PDEC_InvalidBcCc No description 174 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
534 0x5fb0 PDEC_CommandNotImplemented Received action message with unknown action id 176 PDEC_HANDLER linux/ipcore/PdecHandler.h linux/ipcore/pdec.h
535 0x60a0 CCSDS_CommandNotImplemented Received action message with unknown action id 160 CCSDS_HANDLER mission/com/CcsdsIpCoreHandler.h
536 0x61a0 RS_RateNotSupported The commanded rate is not supported by the current FPGA design 160 RATE_SETTER linux/ipcore/PtmeConfig.h
537 0x61a1 RS_BadBitRate Bad bitrate has been commanded (e.g. 0) 161 RATE_SETTER linux/ipcore/PtmeConfig.h

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 285 translations. * @brief Auto-generated event translation file. Contains 289 translations.
* @details * @details
* Generated on: 2023-04-07 17:42:57 * Generated on: 2023-04-14 20:05:50
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -160,8 +160,11 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS"; const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC"; const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC"; const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
const char *PDEC_TRYING_RESET_WITH_INIT_STRING = "PDEC_TRYING_RESET_WITH_INIT";
const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED"; const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED"; const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED"; const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -268,6 +271,7 @@ const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS"; const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY"; const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
const char *I2C_REBOOT_STRING = "I2C_REBOOT"; const char *I2C_REBOOT_STRING = "I2C_REBOOT";
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE"; const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE"; const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING"; const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
@ -604,9 +608,15 @@ const char *translateEvents(Event event) {
case (12409): case (12409):
return WRITE_SYSCALL_ERROR_PDEC_STRING; return WRITE_SYSCALL_ERROR_PDEC_STRING;
case (12410): case (12410):
return PDEC_RESET_FAILED_STRING; return PDEC_TRYING_RESET_WITH_INIT_STRING;
case (12411): case (12411):
return PDEC_TRYING_RESET_NO_INIT_STRING;
case (12412):
return PDEC_RESET_FAILED_STRING;
case (12413):
return OPEN_IRQ_FILE_FAILED_STRING; return OPEN_IRQ_FILE_FAILED_STRING;
case (12414):
return PDEC_INIT_FAILED_STRING;
case (12500): case (12500):
return IMAGE_UPLOAD_FAILED_STRING; return IMAGE_UPLOAD_FAILED_STRING;
case (12501): case (12501):
@ -819,6 +829,8 @@ const char *translateEvents(Event event) {
return TRYING_I2C_RECOVERY_STRING; return TRYING_I2C_RECOVERY_STRING;
case (14011): case (14011):
return I2C_REBOOT_STRING; return I2C_REBOOT_STRING;
case (14012):
return PDEC_REBOOT_STRING;
case (14100): case (14100):
return NO_VALID_SENSOR_TEMPERATURE_STRING; return NO_VALID_SENSOR_TEMPERATURE_STRING;
case (14101): case (14101):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 175 translations. * Contains 175 translations.
* Generated on: 2023-04-07 17:42:57 * Generated on: 2023-04-14 20:05:50
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 285 translations. * @brief Auto-generated event translation file. Contains 289 translations.
* @details * @details
* Generated on: 2023-04-07 17:42:57 * Generated on: 2023-04-14 20:05:50
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -160,8 +160,11 @@ const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS"; const char *TOO_MANY_IRQS_STRING = "TOO_MANY_IRQS";
const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC"; const char *POLL_SYSCALL_ERROR_PDEC_STRING = "POLL_SYSCALL_ERROR_PDEC";
const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC"; const char *WRITE_SYSCALL_ERROR_PDEC_STRING = "WRITE_SYSCALL_ERROR_PDEC";
const char *PDEC_TRYING_RESET_WITH_INIT_STRING = "PDEC_TRYING_RESET_WITH_INIT";
const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED"; const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED"; const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED"; const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED"; const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -268,6 +271,7 @@ const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS"; const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY"; const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
const char *I2C_REBOOT_STRING = "I2C_REBOOT"; const char *I2C_REBOOT_STRING = "I2C_REBOOT";
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE"; const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE"; const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING"; const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
@ -604,9 +608,15 @@ const char *translateEvents(Event event) {
case (12409): case (12409):
return WRITE_SYSCALL_ERROR_PDEC_STRING; return WRITE_SYSCALL_ERROR_PDEC_STRING;
case (12410): case (12410):
return PDEC_RESET_FAILED_STRING; return PDEC_TRYING_RESET_WITH_INIT_STRING;
case (12411): case (12411):
return PDEC_TRYING_RESET_NO_INIT_STRING;
case (12412):
return PDEC_RESET_FAILED_STRING;
case (12413):
return OPEN_IRQ_FILE_FAILED_STRING; return OPEN_IRQ_FILE_FAILED_STRING;
case (12414):
return PDEC_INIT_FAILED_STRING;
case (12500): case (12500):
return IMAGE_UPLOAD_FAILED_STRING; return IMAGE_UPLOAD_FAILED_STRING;
case (12501): case (12501):
@ -819,6 +829,8 @@ const char *translateEvents(Event event) {
return TRYING_I2C_RECOVERY_STRING; return TRYING_I2C_RECOVERY_STRING;
case (14011): case (14011):
return I2C_REBOOT_STRING; return I2C_REBOOT_STRING;
case (14012):
return PDEC_REBOOT_STRING;
case (14100): case (14100):
return NO_VALID_SENSOR_TEMPERATURE_STRING; return NO_VALID_SENSOR_TEMPERATURE_STRING;
case (14101): case (14101):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 175 translations. * Contains 175 translations.
* Generated on: 2023-04-07 17:42:57 * Generated on: 2023-04-14 20:05:50
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -15,6 +15,7 @@
#include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/tmtcservices/TmTcMessage.h" #include "fsfw/tmtcservices/TmTcMessage.h"
#include "fsfw_hal/linux/uio/UioMapper.h" #include "fsfw_hal/linux/uio/UioMapper.h"
#include "linux/ipcore/PdecConfig.h"
#include "pdec.h" #include "pdec.h"
using namespace pdec; using namespace pdec;
@ -103,21 +104,10 @@ ReturnValue_t PdecHandler::firstLoop() {
result = releasePdec(); result = releasePdec();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return returnvalue::FAILED;
}
// This configuration must be done while the PDEC is not held in reset.
if (OP_MODE == Modes::IRQ) {
// Configure interrupt mask register to enable interrupts
*(registerBaseAddress + PDEC_IMR_OFFSET) = pdecConfig.getImrReg();
}
result = resetFarStatFlag();
if (result != returnvalue::OK) {
// Requires reconfiguration and reinitialization of PDEC
triggerEvent(INVALID_FAR);
return result; return result;
} }
return returnvalue::OK;
return postResetOperation();
} }
ReturnValue_t PdecHandler::performOperation(uint8_t operationCode) { ReturnValue_t PdecHandler::performOperation(uint8_t operationCode) {
@ -141,10 +131,11 @@ ReturnValue_t PdecHandler::polledOperation() {
if (newTcReceived()) { if (newTcReceived()) {
handleNewTc(); handleNewTc();
} }
checkLocks(); doPeriodicWork();
break; break;
} }
case State::PDEC_RESET: { case State::PDEC_RESET: {
triggerEvent(pdec::PDEC_TRYING_RESET_WITH_INIT);
ReturnValue_t result = pdecToReset(); ReturnValue_t result = pdecToReset();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
triggerEvent(PDEC_RESET_FAILED); triggerEvent(PDEC_RESET_FAILED);
@ -165,8 +156,8 @@ ReturnValue_t PdecHandler::polledOperation() {
// See https://yurovsky.github.io/2014/10/10/linux-uio-gpio-interrupt.html for more information. // See https://yurovsky.github.io/2014/10/10/linux-uio-gpio-interrupt.html for more information.
ReturnValue_t PdecHandler::irqOperation() { ReturnValue_t PdecHandler::irqOperation() {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
int fd = -1; // int fd = -1;
// Used to unmask IRQ // Used to unmask IRQ
uint32_t info = 1; uint32_t info = 1;
interruptWindowCd.resetTimer(); interruptWindowCd.resetTimer();
@ -182,22 +173,29 @@ ReturnValue_t PdecHandler::irqOperation() {
switch (state) { switch (state) {
case State::INIT: { case State::INIT: {
result = handleInitState(); result = handleInitState();
if (result == returnvalue::OK) { if (result != returnvalue::OK) {
openIrqFile(&fd); break;
}
openIrqFile();
if (ptmeResetWithReinitializationPending) {
actionHelper.finish(true, commandedBy, pdec::RESET_PDEC_WITH_REINIITALIZATION);
ptmeResetWithReinitializationPending = false;
} }
break; break;
} }
case State::PDEC_RESET: { case State::PDEC_RESET: {
triggerEvent(pdec::PDEC_TRYING_RESET_WITH_INIT);
result = pdecToReset(); result = pdecToReset();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
triggerEvent(PDEC_RESET_FAILED); triggerEvent(PDEC_RESET_FAILED);
} }
usleep(20);
state = State::INIT; state = State::INIT;
break; break;
} }
case State::RUNNING: { case State::RUNNING: {
checkLocks(); doPeriodicWork();
checkAndHandleIrqs(fd, info); checkAndHandleIrqs(info);
break; break;
} }
case State::WAIT_FOR_RECOVERY: case State::WAIT_FOR_RECOVERY:
@ -219,27 +217,28 @@ ReturnValue_t PdecHandler::handleInitState() {
ReturnValue_t result = firstLoop(); ReturnValue_t result = firstLoop();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
if (result == LocalParameterHandler::SD_NOT_READY) { if (result == LocalParameterHandler::SD_NOT_READY) {
TaskFactory::delayTask(400);
if (initTries == MAX_INIT_TRIES) { if (initTries == MAX_INIT_TRIES) {
sif::error << "PdecHandler::handleInitState: SD card never " sif::error << "PdecHandler::handleInitState: SD card never becomes ready" << std::endl;
"becomes ready" initFailedHandler(result);
<< std::endl; return result;
state = State::WAIT_FOR_RECOVERY;
} else {
state = State::INIT;
} }
state = State::INIT;
initTries++;
TaskFactory::delayTask(400);
return result; return result;
} }
state = State::WAIT_FOR_RECOVERY; sif::error << "PDEC: Init failed with reason 0x" << std::hex << std::setw(4) << result
<< std::endl;
initFailedHandler(result);
return result; return result;
} }
state = State::RUNNING; state = State::RUNNING;
return returnvalue::OK; return returnvalue::OK;
} }
void PdecHandler::openIrqFile(int* fd) { void PdecHandler::openIrqFile() {
*fd = open(uioNames.irq, O_RDWR); irqFd = open(uioNames.irq, O_RDWR);
if (*fd < 0) { if (irqFd < 0) {
sif::error << "PdecHandler::irqOperation: Opening UIO IRQ file" << uioNames.irq << " failed" sif::error << "PdecHandler::irqOperation: Opening UIO IRQ file" << uioNames.irq << " failed"
<< std::endl; << std::endl;
triggerEvent(OPEN_IRQ_FILE_FAILED); triggerEvent(OPEN_IRQ_FILE_FAILED);
@ -247,16 +246,16 @@ void PdecHandler::openIrqFile(int* fd) {
} }
} }
ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) { ReturnValue_t PdecHandler::checkAndHandleIrqs(uint32_t& info) {
ssize_t nb = write(fd, &info, sizeof(info)); ssize_t nb = write(irqFd, &info, sizeof(info));
if (nb != static_cast<ssize_t>(sizeof(info))) { if (nb != static_cast<ssize_t>(sizeof(info))) {
sif::error << "PdecHandler::irqOperation: Unmasking IRQ failed" << std::endl; sif::error << "PdecHandler::irqOperation: Unmasking IRQ failed" << std::endl;
triggerEvent(WRITE_SYSCALL_ERROR_PDEC, errno); triggerEvent(WRITE_SYSCALL_ERROR_PDEC, errno);
close(fd); close(irqFd);
state = State::INIT; state = State::INIT;
return returnvalue::FAILED; return returnvalue::FAILED;
} }
struct pollfd fds = {.fd = fd, .events = POLLIN, .revents = 0}; struct pollfd fds = {.fd = irqFd, .events = POLLIN, .revents = 0};
int ret = poll(&fds, 1, IRQ_TIMEOUT_MS); int ret = poll(&fds, 1, IRQ_TIMEOUT_MS);
if (ret == 0) { if (ret == 0) {
// No TCs for timeout period // No TCs for timeout period
@ -264,7 +263,7 @@ ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) {
resetIrqLimiters(); resetIrqLimiters();
} else if (ret >= 1) { } else if (ret >= 1) {
// Interrupt handling. // Interrupt handling.
nb = read(fd, &info, sizeof(info)); nb = read(irqFd, &info, sizeof(info));
interruptCounter++; interruptCounter++;
if (nb == static_cast<ssize_t>(sizeof(info))) { if (nb == static_cast<ssize_t>(sizeof(info))) {
uint32_t pisr = *(registerBaseAddress + PDEC_PISR_OFFSET); uint32_t pisr = *(registerBaseAddress + PDEC_PISR_OFFSET);
@ -303,7 +302,7 @@ ReturnValue_t PdecHandler::checkAndHandleIrqs(int fd, uint32_t& info) {
sif::error << "PdecHandler::irqOperation: Poll error with errno " << errno << ": " sif::error << "PdecHandler::irqOperation: Poll error with errno " << errno << ": "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
triggerEvent(POLL_SYSCALL_ERROR_PDEC, errno); triggerEvent(POLL_SYSCALL_ERROR_PDEC, errno);
close(fd); close(irqFd);
state = State::INIT; state = State::INIT;
return returnvalue::FAILED; return returnvalue::FAILED;
} }
@ -335,6 +334,7 @@ MessageQueueId_t PdecHandler::getCommandQueue() const { return commandQueue->get
ReturnValue_t PdecHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, ReturnValue_t PdecHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) { const uint8_t* data, size_t size) {
using namespace pdec;
switch (actionId) { switch (actionId) {
case PRINT_CLCW: case PRINT_CLCW:
printClcw(); printClcw();
@ -342,6 +342,16 @@ ReturnValue_t PdecHandler::executeAction(ActionId_t actionId, MessageQueueId_t c
case PRINT_PDEC_MON: case PRINT_PDEC_MON:
printPdecMon(); printPdecMon();
return EXECUTION_FINISHED; return EXECUTION_FINISHED;
case RESET_PDEC_NO_REINIITALIZATION: {
pdecResetNoInit();
return EXECUTION_FINISHED;
}
case RESET_PDEC_WITH_REINIITALIZATION: {
initializeReset();
ptmeResetWithReinitializationPending = true;
this->commandedBy = commandedBy;
return returnvalue::OK;
}
default: default:
return COMMAND_NOT_IMPLEMENTED; return COMMAND_NOT_IMPLEMENTED;
} }
@ -370,7 +380,7 @@ ReturnValue_t PdecHandler::getParameter(uint8_t domainId, uint8_t uniqueIdentifi
return returnvalue::FAILED; return returnvalue::FAILED;
} }
// PDEC needs reset to apply this parameter change // PDEC needs reset to apply this parameter change
state = State::PDEC_RESET; initializeReset();
return returnvalue::OK; return returnvalue::OK;
} else if ((domainId == 0) and (uniqueIdentifier == ParameterId::NEGATIVE_WINDOW)) { } else if ((domainId == 0) and (uniqueIdentifier == ParameterId::NEGATIVE_WINDOW)) {
uint8_t newVal = 0; uint8_t newVal = 0;
@ -392,7 +402,7 @@ ReturnValue_t PdecHandler::getParameter(uint8_t domainId, uint8_t uniqueIdentifi
return returnvalue::FAILED; return returnvalue::FAILED;
} }
// PDEC needs reset to apply this parameter change // PDEC needs reset to apply this parameter change
state = State::PDEC_RESET; initializeReset();
return returnvalue::OK; return returnvalue::OK;
} }
return returnvalue::OK; return returnvalue::OK;
@ -449,22 +459,13 @@ bool PdecHandler::newTcReceived() {
return true; return true;
} }
void PdecHandler::checkLocks() { void PdecHandler::doPeriodicWork() {
uint32_t clcw = getClcw(); // scuffed test code
if (not(clcw & NO_RF_MASK) && not carrierLock) { // if(testCntr < 30) {
triggerEvent(CARRIER_LOCK); // triggerEvent(pdec::INVALID_TC_FRAME, FRAME_DIRTY_RETVAL);
carrierLock = true; // testCntr++;
} else if ((clcw & NO_RF_MASK) && carrierLock) { // }
carrierLock = false; checkLocks();
triggerEvent(LOST_CARRIER_LOCK_PDEC);
}
if (not(clcw & NO_BITLOCK_MASK) && not bitLock) {
triggerEvent(BIT_LOCK_PDEC);
bitLock = true;
} else if ((clcw & NO_BITLOCK_MASK) && bitLock) {
bitLock = false;
triggerEvent(LOST_BIT_LOCK_PDEC);
}
} }
bool PdecHandler::checkFrameAna(uint32_t pdecFar) { bool PdecHandler::checkFrameAna(uint32_t pdecFar) {
@ -748,6 +749,68 @@ void PdecHandler::resetIrqLimiters() {
interruptCounter = 0; interruptCounter = 0;
} }
void PdecHandler::checkLocks() {
uint32_t clcw = getClcw();
if (not(clcw & NO_RF_MASK) && not carrierLock) {
triggerEvent(CARRIER_LOCK);
carrierLock = true;
} else if ((clcw & NO_RF_MASK) && carrierLock) {
carrierLock = false;
triggerEvent(LOST_CARRIER_LOCK_PDEC);
}
if (not(clcw & NO_BITLOCK_MASK) && not bitLock) {
triggerEvent(BIT_LOCK_PDEC);
bitLock = true;
} else if ((clcw & NO_BITLOCK_MASK) && bitLock) {
bitLock = false;
triggerEvent(LOST_BIT_LOCK_PDEC);
}
}
void PdecHandler::initFailedHandler(ReturnValue_t reason) {
triggerEvent(pdec::PDEC_INIT_FAILED, reason, 0);
if (ptmeResetWithReinitializationPending) {
actionHelper.finish(false, commandedBy, pdec::RESET_PDEC_WITH_REINIITALIZATION, reason);
ptmeResetWithReinitializationPending = false;
}
state = State::WAIT_FOR_RECOVERY;
}
void PdecHandler::pdecResetNoInit() {
triggerEvent(pdec::PDEC_TRYING_RESET_NO_INIT);
pdecToReset();
usleep(20);
releasePdec();
ReturnValue_t result = postResetOperation();
if (result != returnvalue::OK) {
// What can we really do here? Event was already triggered if this is due to the FAR flag
// not being reset.
sif::error << "PdecHandler::pdecResetNoInit: Post reset operation failed unexpectedly"
<< std::endl;
}
}
ReturnValue_t PdecHandler::postResetOperation() {
// This configuration must be done while the PDEC is not held in reset.
if (OP_MODE == Modes::IRQ) {
// Configure interrupt mask register to enable interrupts
*(registerBaseAddress + PDEC_IMR_OFFSET) = pdecConfig.getImrReg();
}
ReturnValue_t result = resetFarStatFlag();
if (result != returnvalue::OK) {
// Requires reconfiguration and reinitialization of PDEC
triggerEvent(INVALID_FAR);
}
return result;
}
void PdecHandler::initializeReset() {
if (irqFd != 0) {
close(irqFd);
}
state = State::PDEC_RESET;
}
std::string PdecHandler::getMonStatusString(uint32_t status) { std::string PdecHandler::getMonStatusString(uint32_t status) {
switch (status) { switch (status) {
case TC_CHANNEL_INACTIVE: case TC_CHANNEL_INACTIVE:

View File

@ -3,6 +3,8 @@
#include <fsfw/timemanager/Countdown.h> #include <fsfw/timemanager/Countdown.h>
#include <atomic>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "PdecConfig.h" #include "PdecConfig.h"
#include "eive/definitions.h" #include "eive/definitions.h"
@ -79,73 +81,11 @@ class PdecHandler : public SystemObject,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues, ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
uint16_t startAtIndex) override; uint16_t startAtIndex) override;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PDEC_HANDLER;
//! [EXPORT] : [COMMENT] Frame acceptance report signals an invalid frame
//! P1: The frame analysis information (FrameAna field of PDEC_FAR register)
//! P2: When frame declared illegal this parameter this parameter gives information about the
//! reason (IReason field of the PDEC_FAR register)
static const Event INVALID_TC_FRAME = MAKE_EVENT(1, severity::HIGH);
//! [EXPORT] : [COMMENT] Read invalid FAR from PDEC after startup
static const Event INVALID_FAR = MAKE_EVENT(2, severity::HIGH);
//! [EXPORT] : [COMMENT] Carrier lock detected
static const Event CARRIER_LOCK = MAKE_EVENT(3, severity::INFO);
//! [EXPORT] : [COMMENT] Bit lock detected (data valid)
static const Event BIT_LOCK_PDEC = MAKE_EVENT(4, severity::INFO);
//! [EXPORT] : [COMMENT] Lost carrier lock
static const Event LOST_CARRIER_LOCK_PDEC = MAKE_EVENT(5, severity::INFO);
//! [EXPORT] : [COMMENT] Lost bit lock
static const Event LOST_BIT_LOCK_PDEC = MAKE_EVENT(6, severity::INFO);
//! [EXPORT] : [COMMENT] Too many IRQs over the time window of one second. P1: Allowed TCs
static constexpr Event TOO_MANY_IRQS = MAKE_EVENT(7, severity::MEDIUM);
static constexpr Event POLL_SYSCALL_ERROR_PDEC =
event::makeEvent(SUBSYSTEM_ID, 8, severity::MEDIUM);
static constexpr Event WRITE_SYSCALL_ERROR_PDEC =
event::makeEvent(SUBSYSTEM_ID, 9, severity::HIGH);
//! [EXPORT] : [COMMENT] Failed to pull PDEC reset to low
static constexpr Event PDEC_RESET_FAILED = event::makeEvent(SUBSYSTEM_ID, 10, severity::HIGH);
//! [EXPORT] : [COMMENT] Failed to open the IRQ uio file
static constexpr Event OPEN_IRQ_FILE_FAILED = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
private: private:
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
static constexpr Modes OP_MODE = Modes::IRQ; static constexpr Modes OP_MODE = Modes::IRQ;
static const ReturnValue_t ABANDONED_CLTU_RETVAL = MAKE_RETURN_CODE(0xA0);
static const ReturnValue_t FRAME_DIRTY_RETVAL = MAKE_RETURN_CODE(0xA1);
static const ReturnValue_t FRAME_ILLEGAL_ONE_REASON = MAKE_RETURN_CODE(0xA2);
static const ReturnValue_t FRAME_ILLEGAL_MULTIPLE_REASONS = MAKE_RETURN_CODE(0xA2);
static const ReturnValue_t AD_DISCARDED_LOCKOUT_RETVAL = MAKE_RETURN_CODE(0xA3);
static const ReturnValue_t AD_DISCARDED_WAIT_RETVAL = MAKE_RETURN_CODE(0xA4);
static const ReturnValue_t AD_DISCARDED_NS_VS = MAKE_RETURN_CODE(0xA5);
//! [EXPORT] : [COMMENT] Received action message with unknown action id
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xB0);
static const ReturnValue_t NO_REPORT_RETVAL = MAKE_RETURN_CODE(0xA6);
//! Error in version number and reserved A and B fields
static const ReturnValue_t ERROR_VERSION_NUMBER_RETVAL = MAKE_RETURN_CODE(0xA7);
//! Illegal combination of bypass and control command flag
static const ReturnValue_t ILLEGAL_COMBINATION_RETVAL = MAKE_RETURN_CODE(0xA8);
//! Spacecraft identifier did not match
static const ReturnValue_t INVALID_SC_ID_RETVAL = MAKE_RETURN_CODE(0xA9);
//! VC identifier bits 0 to 4 did not match
static const ReturnValue_t INVALID_VC_ID_MSB_RETVAL = MAKE_RETURN_CODE(0xAA);
//! VC identifier bit 5 did not match
static const ReturnValue_t INVALID_VC_ID_LSB_RETVAL = MAKE_RETURN_CODE(0xAB);
//! N(S) of BC or BD frame not set to all zeros
static const ReturnValue_t NS_NOT_ZERO_RETVAL = MAKE_RETURN_CODE(0xAC);
//! Invalid BC control command
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE; static const uint32_t QUEUE_SIZE = config::CCSDS_HANDLER_QUEUE_SIZE;
// Action IDs
static const ActionId_t PRINT_CLCW = 0;
// Print PDEC monitor register
static const ActionId_t PRINT_PDEC_MON = 1;
#ifdef TE0720_1CFA #ifdef TE0720_1CFA
static const int CONFIG_MEMORY_MAP_SIZE = 0x400; static const int CONFIG_MEMORY_MAP_SIZE = 0x400;
static const int RAM_MAP_SIZE = 0x4000; static const int RAM_MAP_SIZE = 0x4000;
@ -185,17 +125,6 @@ class PdecHandler : public SystemObject,
static constexpr uint32_t MAX_ALLOWED_IRQS_PER_WINDOW = 800; static constexpr uint32_t MAX_ALLOWED_IRQS_PER_WINDOW = 800;
enum class FrameAna_t : uint8_t {
ABANDONED_CLTU,
FRAME_DIRTY,
FRAME_ILLEGAL,
FRAME_ILLEGAL_MULTI_REASON,
AD_DISCARDED_LOCKOUT,
AD_DISCARDED_WAIT,
AD_DISCARDED_NS_VR,
FRAME_ACCEPTED
};
enum class IReason_t : uint8_t { enum class IReason_t : uint8_t {
NO_REPORT, NO_REPORT,
ERROR_VERSION_NUMBER, ERROR_VERSION_NUMBER,
@ -213,6 +142,7 @@ class PdecHandler : public SystemObject,
Countdown genericCheckCd = Countdown(IRQ_TIMEOUT_MS); Countdown genericCheckCd = Countdown(IRQ_TIMEOUT_MS);
object_id_t tcDestinationId; object_id_t tcDestinationId;
int irqFd = 0;
AcceptsTelecommandsIF* tcDestination = nullptr; AcceptsTelecommandsIF* tcDestination = nullptr;
@ -258,6 +188,9 @@ class PdecHandler : public SystemObject,
bool carrierLock = false; bool carrierLock = false;
bool bitLock = false; bool bitLock = false;
MessageQueueId_t commandedBy = MessageQueueIF::NO_QUEUE;
bool ptmeResetWithReinitializationPending = false;
UioNames uioNames; UioNames uioNames;
ParameterHelper paramHelper; ParameterHelper paramHelper;
@ -266,6 +199,9 @@ class PdecHandler : public SystemObject,
uint32_t initTries = 0; uint32_t initTries = 0;
// scuffed test counter.
uint8_t testCntr = 0;
/** /**
* @brief Performs initialization stuff which must be performed in first * @brief Performs initialization stuff which must be performed in first
* loop of running task * loop of running task
@ -282,8 +218,8 @@ class PdecHandler : public SystemObject,
ReturnValue_t polledOperation(); ReturnValue_t polledOperation();
ReturnValue_t irqOperation(); ReturnValue_t irqOperation();
ReturnValue_t handleInitState(); ReturnValue_t handleInitState();
void openIrqFile(int* fd); void openIrqFile();
ReturnValue_t checkAndHandleIrqs(int fd, uint32_t& info); ReturnValue_t checkAndHandleIrqs(uint32_t& info);
uint32_t readFar(); uint32_t readFar();
@ -325,6 +261,8 @@ class PdecHandler : public SystemObject,
* @brief Checks if carrier lock or bit lock has been detected and triggers appropriate * @brief Checks if carrier lock or bit lock has been detected and triggers appropriate
* event. * event.
*/ */
void doPeriodicWork();
void checkLocks(); void checkLocks();
void resetIrqLimiters(); void resetIrqLimiters();
@ -400,6 +338,13 @@ class PdecHandler : public SystemObject,
*/ */
void printPdecMon(); void printPdecMon();
void pdecResetNoInit();
ReturnValue_t postResetOperation();
void initializeReset();
void initFailedHandler(ReturnValue_t reason);
std::string getMonStatusString(uint32_t status); std::string getMonStatusString(uint32_t status);
}; };

View File

@ -1,10 +1,95 @@
#ifndef LINUX_OBC_PDEC_H_ #ifndef LINUX_OBC_PDEC_H_
#define LINUX_OBC_PDEC_H_ #define LINUX_OBC_PDEC_H_
#include <eive/resultClassIds.h>
#include <fsfw/action/ActionMessage.h>
#include <cstdint> #include <cstdint>
namespace pdec { namespace pdec {
static const uint8_t INTERFACE_ID = CLASS_ID::PDEC_HANDLER;
static const ReturnValue_t ABANDONED_CLTU_RETVAL = MAKE_RETURN_CODE(0xA0);
static const ReturnValue_t FRAME_DIRTY_RETVAL = MAKE_RETURN_CODE(0xA1);
static const ReturnValue_t FRAME_ILLEGAL_ONE_REASON = MAKE_RETURN_CODE(0xA2);
static const ReturnValue_t FRAME_ILLEGAL_MULTIPLE_REASONS = MAKE_RETURN_CODE(0xA2);
static const ReturnValue_t AD_DISCARDED_LOCKOUT_RETVAL = MAKE_RETURN_CODE(0xA3);
static const ReturnValue_t AD_DISCARDED_WAIT_RETVAL = MAKE_RETURN_CODE(0xA4);
static const ReturnValue_t AD_DISCARDED_NS_VS = MAKE_RETURN_CODE(0xA5);
//! [EXPORT] : [COMMENT] Received action message with unknown action id
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xB0);
static const ReturnValue_t NO_REPORT_RETVAL = MAKE_RETURN_CODE(0xA6);
//! Error in version number and reserved A and B fields
static const ReturnValue_t ERROR_VERSION_NUMBER_RETVAL = MAKE_RETURN_CODE(0xA7);
//! Illegal combination of bypass and control command flag
static const ReturnValue_t ILLEGAL_COMBINATION_RETVAL = MAKE_RETURN_CODE(0xA8);
//! Spacecraft identifier did not match
static const ReturnValue_t INVALID_SC_ID_RETVAL = MAKE_RETURN_CODE(0xA9);
//! VC identifier bits 0 to 4 did not match
static const ReturnValue_t INVALID_VC_ID_MSB_RETVAL = MAKE_RETURN_CODE(0xAA);
//! VC identifier bit 5 did not match
static const ReturnValue_t INVALID_VC_ID_LSB_RETVAL = MAKE_RETURN_CODE(0xAB);
//! N(S) of BC or BD frame not set to all zeros
static const ReturnValue_t NS_NOT_ZERO_RETVAL = MAKE_RETURN_CODE(0xAC);
//! Invalid BC control command
static const ReturnValue_t INVALID_BC_CC = MAKE_RETURN_CODE(0xAE);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PDEC_HANDLER;
//! [EXPORT] : [COMMENT] Frame acceptance report signals an invalid frame
//! P1: The frame analysis information (FrameAna field of PDEC_FAR register)
//! P2: When frame declared illegal this parameter this parameter gives information about the
//! reason (IReason field of the PDEC_FAR register)
static const Event INVALID_TC_FRAME = MAKE_EVENT(1, severity::HIGH);
//! [EXPORT] : [COMMENT] Read invalid FAR from PDEC after startup
static const Event INVALID_FAR = MAKE_EVENT(2, severity::HIGH);
//! [EXPORT] : [COMMENT] Carrier lock detected
static const Event CARRIER_LOCK = MAKE_EVENT(3, severity::INFO);
//! [EXPORT] : [COMMENT] Bit lock detected (data valid)
static const Event BIT_LOCK_PDEC = MAKE_EVENT(4, severity::INFO);
//! [EXPORT] : [COMMENT] Lost carrier lock
static const Event LOST_CARRIER_LOCK_PDEC = MAKE_EVENT(5, severity::INFO);
//! [EXPORT] : [COMMENT] Lost bit lock
static const Event LOST_BIT_LOCK_PDEC = MAKE_EVENT(6, severity::INFO);
//! [EXPORT] : [COMMENT] Too many IRQs over the time window of one second. P1: Allowed TCs
static constexpr Event TOO_MANY_IRQS = MAKE_EVENT(7, severity::MEDIUM);
static constexpr Event POLL_SYSCALL_ERROR_PDEC =
event::makeEvent(SUBSYSTEM_ID, 8, severity::MEDIUM);
static constexpr Event WRITE_SYSCALL_ERROR_PDEC = event::makeEvent(SUBSYSTEM_ID, 9, severity::HIGH);
//! [EXPORT] : [COMMENT] Trying a PDEC reset with complete re-initialization
static constexpr Event PDEC_TRYING_RESET_WITH_INIT =
event::makeEvent(SUBSYSTEM_ID, 10, severity::LOW);
//! [EXPORT] : [COMMENT] Trying a PDEC reset without re-initialization.
static constexpr Event PDEC_TRYING_RESET_NO_INIT =
event::makeEvent(SUBSYSTEM_ID, 11, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to pull PDEC reset to low
static constexpr Event PDEC_RESET_FAILED = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
//! [EXPORT] : [COMMENT] Failed to open the IRQ uio file
static constexpr Event OPEN_IRQ_FILE_FAILED = event::makeEvent(SUBSYSTEM_ID, 13, severity::HIGH);
//! [EXPORT] : [COMMENT] PDEC initialization failed. This might also be due to the persistent
//! confiuration never becoming available, for example due to SD card issues.
static constexpr Event PDEC_INIT_FAILED = event::makeEvent(SUBSYSTEM_ID, 14, severity::HIGH);
// Action IDs
static constexpr ActionId_t PRINT_CLCW = 0;
// Print PDEC monitor register
static constexpr ActionId_t PRINT_PDEC_MON = 1;
static constexpr ActionId_t RESET_PDEC_NO_REINIITALIZATION = 2;
static constexpr ActionId_t RESET_PDEC_WITH_REINIITALIZATION = 3;
enum class FrameAna_t : uint8_t {
ABANDONED_CLTU,
FRAME_DIRTY,
FRAME_ILLEGAL,
FRAME_ILLEGAL_MULTI_REASON,
AD_DISCARDED_LOCKOUT,
AD_DISCARDED_WAIT,
AD_DISCARDED_NS_VR,
FRAME_ACCEPTED
};
static const uint8_t STAT_POSITION = 31; static const uint8_t STAT_POSITION = 31;
static const uint8_t FRAME_ANA_POSITION = 28; static const uint8_t FRAME_ANA_POSITION = 28;
static const uint8_t IREASON_POSITION = 25; static const uint8_t IREASON_POSITION = 25;

View File

@ -90,9 +90,11 @@ static constexpr Event REBOOT_COUNTER = event::makeEvent(SUBSYSTEM_ID, 7, severi
static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO); static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
//! [EXPORT] : [COMMENT] I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C //! [EXPORT] : [COMMENT] I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C
//! devices. //! devices.
static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM); static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10, severity::HIGH);
//! [EXPORT] : [COMMENT] I2C is unavailable. Recovery did not work, performing full reboot. //! [EXPORT] : [COMMENT] I2C is unavailable. Recovery did not work, performing full reboot.
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::MEDIUM); static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot.
static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
} // namespace core } // namespace core

View File

@ -4,10 +4,12 @@
#include <fsfw/events/EventManager.h> #include <fsfw/events/EventManager.h>
#include <fsfw/ipc/QueueFactory.h> #include <fsfw/ipc/QueueFactory.h>
#include <fsfw/power/PowerSwitchIF.h> #include <fsfw/power/PowerSwitchIF.h>
#include <fsfw/tasks/TaskFactory.h>
#include <mission/acs/defs.h> #include <mission/acs/defs.h>
#include <mission/com/defs.h> #include <mission/com/defs.h>
#include <mission/controller/tcsDefs.h> #include <mission/controller/tcsDefs.h>
#include "linux/ipcore/pdec.h"
#include "mission/power/bpxBattDefs.h" #include "mission/power/bpxBattDefs.h"
#include "mission/power/defs.h" #include "mission/power/defs.h"
#include "mission/sysDefs.h" #include "mission/sysDefs.h"
@ -62,6 +64,7 @@ void EiveSystem::performChildOperation() {
performSafeRecovery = false; performSafeRecovery = false;
return; return;
} }
pdecRecoveryLogic();
i2cRecoveryLogic(); i2cRecoveryLogic();
} }
@ -86,6 +89,12 @@ ReturnValue_t EiveSystem::initialize() {
} }
coreCtrlQueueId = coreCtrl->getCommandQueue(); coreCtrlQueueId = coreCtrl->getCommandQueue();
auto* pdecHandler = ObjectManager::instance()->get<HasActionsIF>(objects::PDEC_HANDLER);
if (pdecHandler == nullptr) {
return ObjectManager::CHILD_INIT_FAILED;
}
pdecHandlerQueueId = pdecHandler->getCommandQueue();
auto* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER); auto* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (manager == nullptr) { if (manager == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
@ -105,8 +114,7 @@ ReturnValue_t EiveSystem::initialize() {
manager->subscribeToEvent(eventQueue->getId(), manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(tcsCtrl::PCDU_SYSTEM_OVERHEATING)); event::getEventId(tcsCtrl::PCDU_SYSTEM_OVERHEATING));
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(tcsCtrl::OBC_OVERHEATING)); manager->subscribeToEvent(eventQueue->getId(), event::getEventId(tcsCtrl::OBC_OVERHEATING));
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(pdec::INVALID_TC_FRAME));
// manager->subscribeToEvent(eventQueue->getId(), event::getEventId(CoreController::))
return Subsystem::initialize(); return Subsystem::initialize();
} }
@ -117,6 +125,12 @@ void EiveSystem::handleEventMessages() {
switch (event.getMessageId()) { switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE: case EventMessage::EVENT_MESSAGE:
switch (event.getEvent()) { switch (event.getEvent()) {
case pdec::INVALID_TC_FRAME: {
if (event.getParameter1() == pdec::FRAME_DIRTY_RETVAL) {
frameDirtyErrorCounter++;
}
break;
}
case tcsCtrl::OBC_OVERHEATING: case tcsCtrl::OBC_OVERHEATING:
case tcsCtrl::PCDU_SYSTEM_OVERHEATING: { case tcsCtrl::PCDU_SYSTEM_OVERHEATING: {
if (isInTransition) { if (isInTransition) {
@ -175,11 +189,11 @@ void EiveSystem::i2cRecoveryLogic() {
// Try recovery. // Try recovery.
executeAction(EXECUTE_I2C_REBOOT, MessageQueueIF::NO_QUEUE, nullptr, 0); executeAction(EXECUTE_I2C_REBOOT, MessageQueueIF::NO_QUEUE, nullptr, 0);
} else { } else {
triggerEvent(core::I2C_REBOOT);
// We already tried an I2C recovery but the bus is still broken. // We already tried an I2C recovery but the bus is still broken.
// Send full reboot request to core controller. // Send full reboot request to core controller.
CommandMessage msg; sendFullRebootCommand();
ActionMessage::setCommand(&msg, core::REBOOT_OBC, store_address_t()); return;
result = commandQueue->sendMessage(coreCtrlQueueId, &msg);
} }
} }
} }
@ -258,6 +272,39 @@ void EiveSystem::i2cRecoveryLogic() {
void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0); } void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0); }
ReturnValue_t EiveSystem::sendFullRebootCommand() {
CommandMessage msg;
ActionMessage::setCommand(&msg, core::REBOOT_OBC, store_address_t());
return commandQueue->sendMessage(coreCtrlQueueId, &msg);
}
void EiveSystem::pdecRecoveryLogic() {
if (ptmeResetWasAttempted and ptmeResetWasAttemptedCd.hasTimedOut()) {
ptmeResetWasAttempted = false;
}
if (frameDirtyCheckCd.hasTimedOut()) {
if (frameDirtyErrorCounter >= FRAME_DIRTY_COM_REBOOT_LIMIT) {
// If a PTME reset was already attempted and there is still an issue receiving TC frames,
// reboot the system.
if (ptmeResetWasAttempted) {
triggerEvent(core::PDEC_REBOOT);
// Send reboot command.
sendFullRebootCommand();
} else {
// Try one full PDEC reset.
CommandMessage msg;
store_address_t dummy{};
ActionMessage::setCommand(&msg, pdec::RESET_PDEC_WITH_REINIITALIZATION, dummy);
commandQueue->sendMessage(pdecHandlerQueueId, &msg);
ptmeResetWasAttemptedCd.resetTimer();
ptmeResetWasAttempted = true;
}
}
frameDirtyErrorCounter = 0;
frameDirtyCheckCd.resetTimer();
}
}
void EiveSystem::commonI2cRecoverySequenceFinish() { void EiveSystem::commonI2cRecoverySequenceFinish() {
alreadyTriedI2cRecovery = true; alreadyTriedI2cRecovery = true;
performI2cReboot = false; performI2cReboot = false;

View File

@ -9,6 +9,8 @@
class EiveSystem : public Subsystem, public HasActionsIF { class EiveSystem : public Subsystem, public HasActionsIF {
public: public:
static constexpr uint8_t FRAME_DIRTY_COM_REBOOT_LIMIT = 4;
static constexpr ActionId_t EXECUTE_I2C_REBOOT = 10; static constexpr ActionId_t EXECUTE_I2C_REBOOT = 10;
EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables, EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables,
@ -33,10 +35,19 @@ class EiveSystem : public Subsystem, public HasActionsIF {
bool performI2cReboot = false; bool performI2cReboot = false;
bool alreadyTriedI2cRecovery = false; bool alreadyTriedI2cRecovery = false;
uint8_t frameDirtyErrorCounter = 0;
Countdown frameDirtyCheckCd = Countdown(10000);
// If the PDEC reset was already attempted in the last 2 minutes, there is a high chance that
// only a full reboot will fix the issue.
Countdown ptmeResetWasAttemptedCd = Countdown(120000);
bool ptmeResetWasAttempted = false;
ActionHelper actionHelper; ActionHelper actionHelper;
PowerSwitchIF* powerSwitcher = nullptr; PowerSwitchIF* powerSwitcher = nullptr;
std::atomic_uint16_t& i2cErrors; std::atomic_uint16_t& i2cErrors;
MessageQueueId_t pdecHandlerQueueId = MessageQueueIF::NO_QUEUE;
MessageQueueId_t bpxBattQueueId = MessageQueueIF::NO_QUEUE; MessageQueueId_t bpxBattQueueId = MessageQueueIF::NO_QUEUE;
MessageQueueId_t coreCtrlQueueId = MessageQueueIF::NO_QUEUE; MessageQueueId_t coreCtrlQueueId = MessageQueueIF::NO_QUEUE;
MessageQueueId_t actionCommandedBy = MessageQueueIF::NO_QUEUE; MessageQueueId_t actionCommandedBy = MessageQueueIF::NO_QUEUE;
@ -51,6 +62,10 @@ class EiveSystem : public Subsystem, public HasActionsIF {
const uint8_t* data, size_t size) override; const uint8_t* data, size_t size) override;
ReturnValue_t handleCommandMessage(CommandMessage* message) override; ReturnValue_t handleCommandMessage(CommandMessage* message) override;
ReturnValue_t sendFullRebootCommand();
void pdecRecoveryLogic();
void i2cRecoveryLogic(); void i2cRecoveryLogic();
void handleEventMessages(); void handleEventMessages();
void commandSelfToSafe(); void commandSelfToSafe();

View File

@ -105,9 +105,9 @@ ReturnValue_t ComSubsystem::initialize() {
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return ObjectManager::CHILD_INIT_FAILED; return ObjectManager::CHILD_INIT_FAILED;
} }
result = manager->subscribeToEventRange(eventQueue->getId(), result =
event::getEventId(PdecHandler::CARRIER_LOCK), manager->subscribeToEventRange(eventQueue->getId(), event::getEventId(pdec::CARRIER_LOCK),
event::getEventId(PdecHandler::BIT_LOCK_PDEC)); event::getEventId(pdec::BIT_LOCK_PDEC));
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ComSubsystem::initialize: Failed to subscribe to events from PDEC " sif::error << "ComSubsystem::initialize: Failed to subscribe to events from PDEC "
@ -167,11 +167,11 @@ void ComSubsystem::handleEventMessage(EventMessage *eventMessage) {
startRxOnlyRecovery(true); startRxOnlyRecovery(true);
break; break;
} }
case PdecHandler::BIT_LOCK_PDEC: { case pdec::BIT_LOCK_PDEC: {
handleBitLockEvent(); handleBitLockEvent();
break; break;
} }
case PdecHandler::CARRIER_LOCK: { case pdec::CARRIER_LOCK: {
handleCarrierLockEvent(); handleCarrierLockEvent();
break; break;
} }

2
tmtc

@ -1 +1 @@
Subproject commit f57342602da3232c0bfecaecb0c10be6d692b384 Subproject commit 1f06ea4590d6340990fb8d9534a84e7e9de68951