diff --git a/modules/hpm.c b/modules/hpm.c index 55fb33abd..fbf6328b2 100644 --- a/modules/hpm.c +++ b/modules/hpm.c @@ -293,6 +293,7 @@ IPMI_HANDLER(ipmi_picmg_upload_firmware_block, NETFN_GRPEXT, IPMI_PICMG_CMD_HPM_ { uint8_t len = rsp->data_len = 0; uint8_t block_data[HPM_BLOCK_SIZE]; + uint8_t block_sz = req->data_len-2; if (active_id > 7) { /* Component ID out of range */ @@ -303,13 +304,13 @@ IPMI_HANDLER(ipmi_picmg_upload_firmware_block, NETFN_GRPEXT, IPMI_PICMG_CMD_HPM_ return; } - memcpy(&block_data[0], &req->data[2], req->data_len-2); + memcpy(&block_data[0], &req->data[2], block_sz); /* TODO: perform checksum of the block */ if (hpm_components[active_id].hpm_upload_block_f) { /* WARNING: This function can't block! */ - rsp->completion_code = hpm_components[active_id].hpm_upload_block_f(&block_data[0], sizeof(block_data)); + rsp->completion_code = hpm_components[active_id].hpm_upload_block_f(&block_data[0], block_sz); } else { rsp->completion_code = IPMI_CC_UNSPECIFIED_ERROR; } diff --git a/modules/ipmb.c b/modules/ipmb.c index 504e3201d..de2f32af8 100644 --- a/modules/ipmb.c +++ b/modules/ipmb.c @@ -260,7 +260,7 @@ ipmb_error ipmb_send_request ( ipmi_msg * req ) req_cfg->retries = 0; /* Blocks here until is able put message in tx queue */ - if (xQueueSend( ipmb_txqueue, &req_cfg, 1) != pdTRUE ){ + if (xQueueSend( ipmb_txqueue, &req_cfg, portMAX_DELAY) != pdTRUE ){ vPortFree( req_cfg ); return ipmb_error_failure; } diff --git a/modules/ipmb.h b/modules/ipmb.h index be8d169eb..82e060691 100644 --- a/modules/ipmb.h +++ b/modules/ipmb.h @@ -48,11 +48,12 @@ /** * @brief Maximum count of messages to be sent */ -#define IPMB_TXQUEUE_LEN 2 +#define IPMB_TXQUEUE_LEN 10 + /** - * @brief Maximum count if received messages to be delivered to client task + * @brief Maximum count of received messages to be delivered to client task */ -#define IPMB_CLIENT_QUEUE_LEN 2 +#define IPMB_CLIENT_QUEUE_LEN 10 /** * @brief Maximum retries made by IPMB TX Task when sending a message diff --git a/modules/main.c b/modules/main.c index 54d40d4c9..bf263942d 100755 --- a/modules/main.c +++ b/modules/main.c @@ -49,7 +49,7 @@ int main( void ) #endif printf("openMMC Starting!\n"); - printf("Build date: %s %s\n" __DATE__, __TIME__); + printf("Build date: %s %s\n", __DATE__, __TIME__); printf("Version: %s\n", g_GIT_TAG); printf("SHA1: %s\n", g_GIT_SHA1); diff --git a/modules/sdr.c b/modules/sdr.c index e32b104a7..33d40674e 100644 --- a/modules/sdr.c +++ b/modules/sdr.c @@ -41,6 +41,27 @@ volatile uint8_t sdr_count = 0; static uint16_t reservationID; static uint32_t sdr_change_count; +uint8_t compare_val(uint8_t val1, uint8_t val2, uint8_t comp, uint8_t sign) +{ + if(sign == SIGNED) { + switch(comp) { + case UPPER_EQ: + return (((int8_t)val1) >= ((int8_t)val2)); + case LOWER_EQ: + return (((int8_t)val1) <= ((int8_t)val2)); + } + } else { + switch(comp){ + case UPPER_EQ: + return ((val1) >= (val2)); + case LOWER_EQ: + return ((val1) <= (val2)); + } + } + + return 0x00; +} + size_t sdr_get_size_by_type(SDR_TYPE type) { switch (type) { @@ -115,6 +136,7 @@ sensor_t * sdr_insert_entry( SDR_TYPE type, void * sdr, TaskHandle_t *monitor_ta entry->entityinstance = 0x60 | ((ipmb_addr - 0x70) >> 1); entry->readout_value = 0; entry->state = SENSOR_STATE_LOW_NON_REC; + entry->event_scan = 0xC0; /* Start with sensor enabled */ /* Link the sdr list */ if (sdr_tail) { @@ -193,6 +215,16 @@ void sdr_pop( void ) } } +void sensor_enable(sensor_t *sensor) +{ + sensor->event_scan = 0xC0; +} + +void sensor_disable(sensor_t *sensor) +{ + sensor->event_scan = 0x00; +} + /******************************/ /* IPMI SDR Commands handlers */ /******************************/ @@ -363,34 +395,16 @@ IPMI_HANDLER(ipmi_se_get_sensor_reading, NETFN_SE, IPMI_GET_SENSOR_READING_CMD, if (*(cur_sensor->task_handle) == vTaskHotSwap_Handle) { rsp->data[len++] = 0x00; - rsp->data[len++] = 0xC0; + rsp->data[len++] = cur_sensor->event_scan; /* Current State Mask */ rsp->data[len++] = cur_sensor->readout_value; } else { rsp->data[len++] = cur_sensor->readout_value; - rsp->data[len++] = 0xC0; + rsp->data[len++] = cur_sensor->event_scan; /* Present threshold status ( [7:6] Reserved, return as 1b )*/ rsp->data[len] = 0xC0; - - if (cur_sensor->state == SENSOR_STATE_LOW) { - rsp->data[len] |= 0x01; - } - if (cur_sensor->state == SENSOR_STATE_LOW_CRIT) { - rsp->data[len] |= 0x02; - } - if (cur_sensor->state == SENSOR_STATE_LOW_NON_REC) { - rsp->data[len] |= 0x04; - } - if (cur_sensor->state == SENSOR_STATE_HIGH) { - rsp->data[len] |= 0x08; - } - if (cur_sensor->state == SENSOR_STATE_HIGH_CRIT) { - rsp->data[len] |= 0x10; - } - if (cur_sensor->state == SENSOR_STATE_HIGH_NON_REC) { - rsp->data[len] |= 0x20; - } + rsp->data[len] |= cur_sensor->state; len++; } @@ -436,403 +450,204 @@ IPMI_HANDLER(ipmi_se_get_sensor_threshold, NETFN_SE, IPMI_GET_SENSOR_THRESHOLD_C rsp->completion_code = IPMI_CC_OK; } +/* Sensor state checking function adapted from CERN MMCv2 implementation, credits in this file header */ +void sensor_state_check( sensor_t *sensor ) +{ + if (sensor == NULL) return; + + SDR_type_01h_t * sdr = (SDR_type_01h_t *) sensor->sdr; + if(sdr == NULL || sdr->hdr.rectype != TYPE_01) return; + + /* Only check enabled sensors */ + if (!(sensor->event_scan & 0xC0)) return; + + if(compare_val(sensor->readout_value, sdr->lower_noncritical_thr, UPPER_EQ, sensor->signed_flag) && compare_val(sensor->readout_value, sdr->upper_noncritical_thr, LOWER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_NORMAL; + } else if(compare_val(sensor->readout_value, sdr->upper_noncritical_thr, UPPER_EQ, sensor->signed_flag) && compare_val(sensor->readout_value, sdr->upper_critical_thr, LOWER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_HIGH; + } else if(compare_val(sensor->readout_value, sdr->upper_critical_thr, UPPER_EQ, sensor->signed_flag) && compare_val(sensor->readout_value, sdr->upper_nonrecover_thr, LOWER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_HIGH_CRIT; + } else if(compare_val(sensor->readout_value, sdr->upper_nonrecover_thr, UPPER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_HIGH_NON_REC; + } else if(compare_val(sensor->readout_value, sdr->lower_noncritical_thr, LOWER_EQ, sensor->signed_flag) && compare_val(sensor->readout_value, sdr->lower_critical_thr, UPPER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_LOW; + } else if(compare_val(sensor->readout_value, sdr->lower_critical_thr, LOWER_EQ, sensor->signed_flag) && compare_val(sensor->readout_value, sdr->lower_nonrecover_thr, UPPER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_LOW_CRIT; + } else if(compare_val(sensor->readout_value, sdr->lower_nonrecover_thr, LOWER_EQ, sensor->signed_flag)) { + sensor->state = SENSOR_STATE_LOW_NON_REC; + } +} + /* Sensor alarm checking function adapted from CERN MMCv2 implementation, credits in this file header */ void check_sensor_event( sensor_t * sensor ) { /** Should be rewritten to be compliant with RTM management !! */ - uint8_t ev = 0xFF; + /* Event message: [0] - Event Data 1 + [7:6] 00b = unspecified byte 2 + 01b = trigger reading in byte 2 + 10b = OEM code in byte 2 + 11b = sensor-specific event extension code in byte 2 + [5:4] 00b = unspecified byte 3 + 01b = trigger threshold value in byte 3 + 10b = OEM code in byte 3 + 11b = sensor-specific event extension code in byte 3 + [3:0] Offset from Event/Reading Code for threshold event. + [1] - Event data 2 -> Reading that triggered the event + [2] - Event data 3 -> Threshold value that triggered the event + */ + uint8_t ev[3] = {0x0F, 0xFF, 0xFF}; uint8_t ev_type; - configASSERT(sensor); + if (sensor == NULL) return; - SDR_type_01h_t * sdr = ( SDR_type_01h_t * ) sensor->sdr; - configASSERT(sdr); + SDR_type_01h_t * sdr = (SDR_type_01h_t *) sensor->sdr; - if( sdr->hdr.rectype != TYPE_01 ) { - return; - } + if(sdr == NULL || sdr->hdr.rectype != TYPE_01) return; - /** Compare value with threshold */ - switch(sensor->state) { - case SENSOR_STATE_HIGH_NON_REC: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) <= (((int8_t)sdr->upper_nonrecover_thr) - (1+((int8_t)sdr->pos_thr_hysteresis)))){ - if(sensor->asserted_event.upper_non_recoverable_go_high){ - ev = IPMI_THRESHOLD_UNR_GH; - sensor->asserted_event.upper_non_recoverable_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_HIGH_CRIT; - } + /* Only check enabled sensors */ + if (!(sensor->event_scan & 0xC0)) return; - if(sensor->old_state != sensor->state && ((int8_t)sensor->readout_value) <= ((int8_t)sdr->upper_nonrecover_thr) && !sensor->asserted_event.upper_non_recoverable_go_low){ - ev = IPMI_THRESHOLD_UNR_GL; - sensor->asserted_event.upper_non_recoverable_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(((int8_t)sensor->readout_value) >= (((int8_t)sdr->upper_nonrecover_thr) + (1+((int8_t)sdr->neg_thr_hysteresis)))){ - if(sensor->asserted_event.upper_non_recoverable_go_low){ - ev = IPMI_THRESHOLD_UNR_GL; - sensor->asserted_event.upper_non_recoverable_go_low = 0; + /* The 0x50 OR'ed in ev[0] indicates that the sensor read value and threshold + * that triggered the event will be present in bytes 1 and 2, respectively */ - } - } - } - else{ - if(sensor->readout_value <= (sdr->upper_nonrecover_thr - (1+sdr->pos_thr_hysteresis))){ - if(sensor->asserted_event.upper_non_recoverable_go_high){ - ev = IPMI_THRESHOLD_UNR_GH; - sensor->asserted_event.upper_non_recoverable_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_HIGH_CRIT; - } + /** Compare threshold with the upper thresholds */ - if(sensor->old_state != sensor->state && sensor->readout_value <= sdr->upper_nonrecover_thr && !sensor->asserted_event.upper_non_recoverable_go_low){ - ev = IPMI_THRESHOLD_UNR_GL; - sensor->asserted_event.upper_non_recoverable_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(sensor->readout_value >= (sdr->upper_nonrecover_thr + (1+sdr->neg_thr_hysteresis))){ - if(sensor->asserted_event.upper_non_recoverable_go_low){ - ev = IPMI_THRESHOLD_UNR_GL; - sensor->asserted_event.upper_non_recoverable_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + /** Upper non-critical threshold going-high */ + if(sdr->assertion_event_mask & (1 << IPMI_THRESHOLD_UNC_GH)) { + if(!sensor->asserted_event.upper_non_critical_go_high && compare_val(sensor->readout_value, sdr->upper_noncritical_thr, UPPER_EQ, sensor->signed_flag)){ + ev_type = ASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_UNC_GH; + ev[1] = sensor->readout_value; + ev[2] = sdr->upper_noncritical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.upper_non_critical_go_high = 1; } - break; - - case SENSOR_STATE_HIGH_CRIT: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) >= ((int8_t)sdr->upper_nonrecover_thr)){ - ev = IPMI_THRESHOLD_UNR_GH; - sensor->asserted_event.upper_non_recoverable_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_HIGH_NON_REC; - } - else if(((int8_t)sensor->readout_value) <= (((int8_t)sdr->upper_critical_thr) - (1+((int8_t)sdr->pos_thr_hysteresis)))){ - if(sensor->asserted_event.upper_critical_go_high){ - ev = IPMI_THRESHOLD_UC_GH; - sensor->asserted_event.upper_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_HIGH; - } - - if(sensor->old_state != sensor->state && ((int8_t)sensor->readout_value) <= ((int8_t)sdr->upper_critical_thr) && !sensor->asserted_event.upper_critical_go_low){ - ev = IPMI_THRESHOLD_UC_GL; - sensor->asserted_event.upper_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(((int8_t)sensor->readout_value) >= (((int8_t)sdr->upper_critical_thr) + (1+((int8_t)sdr->neg_thr_hysteresis)))){ - if(sensor->asserted_event.upper_critical_go_low){ - ev = IPMI_THRESHOLD_UC_GL; - sensor->asserted_event.upper_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } - } - else{ - if(sensor->readout_value >= sdr->upper_nonrecover_thr){ - ev = IPMI_THRESHOLD_UNR_GH; - sensor->asserted_event.upper_non_recoverable_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_HIGH_NON_REC; - } - else if(sensor->readout_value <= (sdr->upper_critical_thr - (1+sdr->pos_thr_hysteresis))){ - if(sensor->asserted_event.upper_critical_go_high){ - ev = IPMI_THRESHOLD_UC_GH; - sensor->asserted_event.upper_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_HIGH; - } - - if(sensor->old_state != sensor->state && sensor->readout_value <= sdr->upper_critical_thr && !sensor->asserted_event.upper_critical_go_low){ - ev = IPMI_THRESHOLD_UC_GL; - sensor->asserted_event.upper_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(sensor->readout_value >= (sdr->upper_critical_thr + (1+sdr->neg_thr_hysteresis))){ - if(sensor->asserted_event.upper_critical_go_low){ - ev = IPMI_THRESHOLD_UC_GL; - sensor->asserted_event.upper_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } - } - - break; - - case SENSOR_STATE_HIGH: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) >= ((int8_t)sdr->upper_critical_thr)){ - ev = IPMI_THRESHOLD_UC_GH; - sensor->asserted_event.upper_critical_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_HIGH_CRIT; - } - else if(((int8_t)sensor->readout_value) <= (((int8_t)sdr->upper_noncritical_thr) - (1+((int8_t)sdr->pos_thr_hysteresis)))){ - if(sensor->asserted_event.upper_non_critical_go_high){ - ev = IPMI_THRESHOLD_UNC_GH; - sensor->asserted_event.upper_non_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_NORMAL; - } + } - if(sensor->old_state != sensor->state && ((int8_t)sensor->readout_value) <= ((int8_t)sdr->upper_noncritical_thr) && !sensor->asserted_event.upper_non_critical_go_low){ - ev = IPMI_THRESHOLD_UNC_GL; - sensor->asserted_event.upper_non_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(((int8_t)sensor->readout_value) >= (((int8_t)sdr->upper_noncritical_thr) + (1+((int8_t)sdr->neg_thr_hysteresis)))){ - if(sensor->asserted_event.upper_non_critical_go_low){ - ev = IPMI_THRESHOLD_UNC_GL; - sensor->asserted_event.upper_non_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + if(sdr->deassertion_event_mask & (1 << IPMI_THRESHOLD_UNC_GH)) { + if(sensor->asserted_event.upper_non_critical_go_high && compare_val(sensor->readout_value, (sdr->upper_noncritical_thr - sdr->neg_thr_hysteresis), LOWER_EQ, sensor->signed_flag)){ + ev_type = DEASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_UNC_GH; + ev[1] = sensor->readout_value; + ev[2] = sdr->upper_noncritical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.upper_non_critical_go_high = 0; } - else{ - if(sensor->readout_value >= sdr->upper_critical_thr){ - ev = IPMI_THRESHOLD_UC_GH; - sensor->asserted_event.upper_critical_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_HIGH_CRIT; - } - else if(sensor->readout_value <= (sdr->upper_noncritical_thr - (1+sdr->pos_thr_hysteresis))){ - if(sensor->asserted_event.upper_non_critical_go_high){ - ev = IPMI_THRESHOLD_UNC_GH; - sensor->asserted_event.upper_non_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_NORMAL; - } + } - if(sensor->old_state != sensor->state && sensor->readout_value <= sdr->upper_noncritical_thr && !sensor->asserted_event.upper_non_critical_go_low){ - ev = IPMI_THRESHOLD_UNC_GL; - sensor->asserted_event.upper_non_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(sensor->readout_value >= (sdr->upper_noncritical_thr + (1+sdr->neg_thr_hysteresis))){ - if(sensor->asserted_event.upper_non_critical_go_low){ - ev = IPMI_THRESHOLD_UNC_GL; - sensor->asserted_event.upper_non_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + /** Upper critical threshold going-high */ + if(sdr->assertion_event_mask & (1 << IPMI_THRESHOLD_UC_GH)) { + if(!sensor->asserted_event.upper_critical_go_high && compare_val(sensor->readout_value, sdr->upper_critical_thr, UPPER_EQ, sensor->signed_flag)){ + ev_type = ASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_UC_GH; + ev[1] = sensor->readout_value; + ev[2] = sdr->upper_critical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.upper_critical_go_high = 1; } - break; - - case SENSOR_STATE_NORMAL: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) >= ((int8_t)sdr->upper_noncritical_thr)){ - ev = IPMI_THRESHOLD_UNC_GH; - sensor->asserted_event.upper_non_critical_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_HIGH; - } + } - else if(((int8_t)sensor->readout_value) <= ((int8_t)sdr->lower_noncritical_thr)){ - ev = IPMI_THRESHOLD_LNC_GL; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_LOW; - } + if(sdr->deassertion_event_mask & (1 << IPMI_THRESHOLD_UC_GH)) { + if(sensor->asserted_event.upper_critical_go_high && compare_val(sensor->readout_value, (sdr->upper_critical_thr - sdr->neg_thr_hysteresis), LOWER_EQ, sensor->signed_flag)){ + ev_type = DEASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_UC_GH; + ev[1] = sensor->readout_value; + ev[2] = sdr->upper_critical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.upper_critical_go_high = 0; } - else{ - if(sensor->readout_value >= sdr->upper_noncritical_thr){ - ev = IPMI_THRESHOLD_UNC_GH; - sensor->asserted_event.upper_non_critical_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_HIGH; - } + } - else if(sensor->readout_value <= sdr->lower_noncritical_thr){ - ev = IPMI_THRESHOLD_LNC_GL; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_LOW; - } + /** Upper non-recoverable threshold going-high */ + if(sdr->assertion_event_mask & (1 << IPMI_THRESHOLD_UNR_GH)) { + if(!sensor->asserted_event.upper_non_recoverable_go_high && compare_val(sensor->readout_value, sdr->upper_nonrecover_thr, UPPER_EQ, sensor->signed_flag)){ + ev_type = ASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_UNR_GH; + ev[1] = sensor->readout_value; + ev[2] = sdr->upper_nonrecover_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.upper_non_recoverable_go_high = 1; } - break; - - case SENSOR_STATE_LOW: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) <= ((int8_t)sdr->lower_critical_thr)){ - ev = IPMI_THRESHOLD_LC_GH; - sensor->asserted_event.lower_critical_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_LOW_CRIT; - } - else if(((int8_t)sensor->readout_value) >= (((int8_t)sdr->lower_noncritical_thr) + (1+((int8_t)sdr->pos_thr_hysteresis)))){ - if(sensor->asserted_event.upper_non_critical_go_high){ - ev = IPMI_THRESHOLD_LNC_GH; - sensor->asserted_event.lower_non_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_NORMAL; - } + } - if(sensor->old_state != sensor->state && ((int8_t)sensor->readout_value) >= ((int8_t)sdr->lower_noncritical_thr)){ - ev = IPMI_THRESHOLD_LNC_GL; - sensor->asserted_event.lower_non_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(((int8_t)sensor->readout_value) <= (((int8_t)sdr->lower_noncritical_thr) - (1+((int8_t)sdr->neg_thr_hysteresis)))){ - if(sensor->asserted_event.lower_non_critical_go_low){ - ev = IPMI_THRESHOLD_LNC_GL; - sensor->asserted_event.lower_non_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + if(sdr->deassertion_event_mask & (1 << IPMI_THRESHOLD_UNR_GH)) { + if(sensor->asserted_event.upper_non_recoverable_go_high && compare_val(sensor->readout_value, (sdr->upper_nonrecover_thr - sdr->neg_thr_hysteresis), LOWER_EQ, sensor->signed_flag)){ + ev_type = DEASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_UNR_GH; + ev[1] = sensor->readout_value; + ev[2] = sdr->upper_nonrecover_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.upper_non_recoverable_go_high = 0; } - else{ - if(sensor->readout_value <= sdr->lower_critical_thr){ - ev = IPMI_THRESHOLD_LC_GH; - sensor->asserted_event.lower_critical_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_LOW_CRIT; - } - else if(sensor->readout_value >= (sdr->lower_noncritical_thr + (1+sdr->pos_thr_hysteresis))){ - if(sensor->asserted_event.upper_non_critical_go_high){ - ev = IPMI_THRESHOLD_LNC_GH; - sensor->asserted_event.lower_non_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_NORMAL; - } + } - if(sensor->old_state != sensor->state && sensor->readout_value >= sdr->lower_noncritical_thr){ - ev = IPMI_THRESHOLD_LNC_GL; - sensor->asserted_event.lower_non_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(sensor->readout_value <= (sdr->lower_noncritical_thr - (1+sdr->neg_thr_hysteresis))){ - if(sensor->asserted_event.lower_non_critical_go_low){ - ev = IPMI_THRESHOLD_LNC_GL; - sensor->asserted_event.lower_non_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + /** Lower non-critical threshold going-high */ + if(sdr->assertion_event_mask & (1 << IPMI_THRESHOLD_LNC_GL)) { + if(!sensor->asserted_event.lower_non_critical_go_low && compare_val(sensor->readout_value, sdr->lower_noncritical_thr, LOWER_EQ, sensor->signed_flag)){ + ev_type = ASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_LNC_GL; + ev[1] = sensor->readout_value; + ev[2] = sdr->lower_noncritical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.lower_non_critical_go_low = 1; } - break; - - case SENSOR_STATE_LOW_CRIT: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) <= ((int8_t)sdr->lower_nonrecover_thr)){ - ev = IPMI_THRESHOLD_LNR_GH; - sensor->asserted_event.lower_non_recorverable_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_LOW_NON_REC; - } - else if(((int8_t)sensor->readout_value) >= (((int8_t)sdr->lower_critical_thr) + (1+((int8_t)sdr->pos_thr_hysteresis)))){ - if(sensor->asserted_event.upper_critical_go_high){ - ev = IPMI_THRESHOLD_LC_GH; - sensor->asserted_event.lower_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_LOW; - } + } - if(sensor->old_state != sensor->state && ((int8_t)sensor->readout_value) >= ((int8_t)sdr->lower_critical_thr)){ - ev = IPMI_THRESHOLD_LC_GL; - sensor->asserted_event.lower_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(((int8_t)sensor->readout_value) <= (((int8_t)sdr->lower_critical_thr) - (1+((int8_t)sdr->neg_thr_hysteresis)))){ - if(sensor->asserted_event.lower_critical_go_low){ - ev = IPMI_THRESHOLD_LC_GL; - sensor->asserted_event.lower_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + if(sdr->deassertion_event_mask & (1 << IPMI_THRESHOLD_LNC_GL)) { + if(sensor->asserted_event.lower_non_critical_go_low && compare_val(sensor->readout_value, (sdr->lower_noncritical_thr + sdr->pos_thr_hysteresis), UPPER_EQ, sensor->signed_flag)){ + ev_type = DEASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_LNC_GL; + ev[1] = sensor->readout_value; + ev[2] = sdr->lower_noncritical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.lower_non_critical_go_low = 0; } - else{ - if(sensor->readout_value <= sdr->lower_nonrecover_thr){ - ev = IPMI_THRESHOLD_LNR_GH; - sensor->asserted_event.lower_non_recorverable_go_high = 1; - ev_type = ASSERTION_EVENT; - sensor->state = SENSOR_STATE_LOW_NON_REC; - } - else if(sensor->readout_value >= (sdr->lower_critical_thr + (1+sdr->pos_thr_hysteresis))){ - if(sensor->asserted_event.upper_critical_go_high){ - ev = IPMI_THRESHOLD_LC_GH; - sensor->asserted_event.lower_critical_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_LOW; - } + } - if(sensor->old_state != sensor->state && sensor->readout_value >= sdr->lower_critical_thr){ - ev = IPMI_THRESHOLD_LC_GL; - sensor->asserted_event.lower_critical_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(sensor->readout_value <= (sdr->lower_critical_thr - (1+sdr->neg_thr_hysteresis))){ - if(sensor->asserted_event.lower_critical_go_low){ - ev = IPMI_THRESHOLD_LC_GL; - sensor->asserted_event.lower_critical_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + /** Lower critical threshold going-high */ + if(sdr->assertion_event_mask & (1 << IPMI_THRESHOLD_LC_GL)) { + if(!sensor->asserted_event.lower_critical_go_low && compare_val(sensor->readout_value, sdr->lower_critical_thr, LOWER_EQ, sensor->signed_flag)){ + ev_type = ASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_LC_GL; + ev[1] = sensor->readout_value; + ev[2] = sdr->lower_critical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.lower_critical_go_low = 1; } - break; - - case SENSOR_STATE_LOW_NON_REC: - if(sensor->signed_flag){ - if(((int8_t)sensor->readout_value) >= (((int8_t)sdr->lower_nonrecover_thr) + (1+((int8_t)sdr->pos_thr_hysteresis)))){ - if(sensor->asserted_event.upper_non_recoverable_go_high){ - ev = IPMI_THRESHOLD_LNR_GH; - sensor->asserted_event.lower_non_recorverable_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_LOW_CRIT; - } + } - if(sensor->old_state != sensor->state && ((int8_t)sensor->readout_value) >= ((int8_t)sdr->lower_nonrecover_thr)){ - ev = IPMI_THRESHOLD_LNR_GL; - sensor->asserted_event.lower_non_recoverable_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(((int8_t)sensor->readout_value) <= (((int8_t)sdr->lower_critical_thr) - (1+((int8_t)sdr->neg_thr_hysteresis)))){ - if(sensor->asserted_event.lower_non_recoverable_go_low){ - ev = IPMI_THRESHOLD_LNR_GL; - sensor->asserted_event.lower_non_recoverable_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + if(sdr->deassertion_event_mask & (1 << IPMI_THRESHOLD_LC_GL)) { + if(sensor->asserted_event.lower_critical_go_low && compare_val(sensor->readout_value, (sdr->lower_critical_thr + sdr->pos_thr_hysteresis), UPPER_EQ, sensor->signed_flag)){ + ev_type = DEASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_LC_GL; + ev[1] = sensor->readout_value; + ev[2] = sdr->lower_critical_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.lower_critical_go_low = 0; } - else{ - if(sensor->readout_value >= (sdr->lower_nonrecover_thr + (1+sdr->pos_thr_hysteresis))){ - if(sensor->asserted_event.upper_non_recoverable_go_high){ - ev = IPMI_THRESHOLD_LNR_GH; - sensor->asserted_event.lower_non_recorverable_go_high = 0; - ev_type = DEASSERTION_EVENT; - } - sensor->state = SENSOR_STATE_LOW_CRIT; - } + } - if(sensor->old_state != sensor->state && sensor->readout_value >= sdr->lower_nonrecover_thr){ - ev = IPMI_THRESHOLD_LNR_GL; - sensor->asserted_event.lower_non_recoverable_go_low = 1; - ev_type = ASSERTION_EVENT; - } - else if(sensor->readout_value <= (sdr->lower_critical_thr - (1+sdr->neg_thr_hysteresis))){ - if(sensor->asserted_event.lower_non_recoverable_go_low){ - ev = IPMI_THRESHOLD_LNR_GL; - sensor->asserted_event.lower_non_recoverable_go_low = 0; - ev_type = DEASSERTION_EVENT; - } - } + /** Lower non-recoverable threshold going-high */ + if(sdr->assertion_event_mask & (1 << IPMI_THRESHOLD_LNR_GL)) { + if(!sensor->asserted_event.lower_non_recoverable_go_high && compare_val(sensor->readout_value, sdr->lower_nonrecover_thr, LOWER_EQ, sensor->signed_flag)){ + ev_type = ASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_LNR_GL; + ev[1] = sensor->readout_value; + ev[2] = sdr->lower_nonrecover_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.lower_non_recoverable_go_high = 1; } - break; } - sensor->old_state = sensor->state; - - if ((ev != 0xFF)) { - ipmi_event_send(sensor, ev_type, &ev, 1); + if(sdr->deassertion_event_mask & (1 << IPMI_THRESHOLD_LNR_GL)) { + if(sensor->asserted_event.lower_non_recoverable_go_high && compare_val(sensor->readout_value, (sdr->lower_nonrecover_thr + sdr->pos_thr_hysteresis), UPPER_EQ, sensor->signed_flag)){ + ev_type = DEASSERTION_EVENT; + ev[0] = 0x50 | IPMI_THRESHOLD_LNR_GL; + ev[1] = sensor->readout_value; + ev[2] = sdr->lower_nonrecover_thr; + ipmi_event_send(sensor, ev_type, ev, sizeof(ev)); + sensor->asserted_event.lower_non_recoverable_go_high = 0; + } } } diff --git a/modules/sdr.h b/modules/sdr.h index d288701e2..9d6e09ada 100644 --- a/modules/sdr.h +++ b/modules/sdr.h @@ -64,6 +64,13 @@ #define IPMI_THRESHOLD_UNR_GL 0x0A // upper non recoverable going low #define IPMI_THRESHOLD_UNR_GH 0x0B // upper non recoverable going high +/* Constants for comparison function */ +#define UNSIGNED 0x00 +#define SIGNED 0x01 + +#define LOWER_EQ 0x00 +#define UPPER_EQ 0x01 + typedef enum { TYPE_01 = 0x1, @@ -91,8 +98,8 @@ typedef struct { uint8_t sensorcap; uint8_t sensortype; uint8_t event_reading_type; - uint8_t assertion_event_mask[2]; - uint8_t deassertion_event_mask[2]; + uint16_t assertion_event_mask; + uint16_t deassertion_event_mask; uint8_t settable_threshold_mask; uint8_t readable_threshold_mask; uint8_t sensor_units_1; @@ -139,8 +146,8 @@ typedef struct { uint8_t sensorcap; uint8_t sensortype; uint8_t event_reading_type; - uint8_t assertion_event_mask[2]; - uint8_t deassertion_event_mask[2]; + uint16_t assertion_event_mask; + uint16_t deassertion_event_mask; uint8_t settable_threshold_mask; uint8_t readable_threshold_mask; uint8_t sensor_units_1; @@ -182,6 +189,7 @@ typedef struct sensor_t { uint16_t readout_value; uint8_t chipid; uint8_t signed_flag; + uint8_t event_scan; uint8_t ownerID; /* This field is repeated here because its value is assigned during initialization, so it can't be const */ uint8_t entityinstance; /* This field is repeated here because its value is assigned during initialization, so it can't be const */ TaskHandle_t * task_handle; @@ -192,7 +200,7 @@ typedef struct sensor_t { uint16_t upper_critical_go_low:1; uint16_t upper_non_critical_go_high:1; uint16_t upper_non_critical_go_low:1; - uint16_t lower_non_recorverable_go_high:1; + uint16_t lower_non_recoverable_go_high:1; uint16_t lower_non_recoverable_go_low:1; uint16_t lower_critical_go_high:1; uint16_t lower_critical_go_low:1; @@ -219,8 +227,10 @@ void amc_sdr_init( void ); void rtm_sdr_init( void ); #endif void sensor_init( void ); +void sensor_enable(sensor_t *sensor); +void sensor_disable(sensor_t *sensor); void check_sensor_event( sensor_t * sensor ); - +void sensor_state_check( sensor_t *sensor ); sensor_t * sdr_insert_entry( SDR_TYPE type, void * sdr, TaskHandle_t *monitor_task, uint8_t diag_id, uint8_t slave_addr); void sdr_remove_entry( sensor_t * entry ); void sdr_pop( void ); diff --git a/modules/sensors/ina220.c b/modules/sensors/ina220.c index 39b2d9254..be0890cfa 100644 --- a/modules/sensors/ina220.c +++ b/modules/sensors/ina220.c @@ -100,10 +100,11 @@ void vTaskINA220( void *Parameters ) } /* Check for threshold events */ + sensor_state_check(ina220_sensor); check_sensor_event(ina220_sensor); - vTaskDelayUntil( &xLastWakeTime, xFrequency ); } + vTaskDelayUntil( &xLastWakeTime, xFrequency ); } } diff --git a/modules/sensors/lm75.c b/modules/sensors/lm75.c index b2b782a28..04b8389ec 100644 --- a/modules/sensors/lm75.c +++ b/modules/sensors/lm75.c @@ -77,6 +77,7 @@ void vTaskLM75( void* Parameters ) } /* Check for threshold events */ i2c_give(i2c_interf); + sensor_state_check(temp_sensor); check_sensor_event(temp_sensor); } } diff --git a/modules/sensors/max6642.c b/modules/sensors/max6642.c index 1d111235a..6582cc4ff 100644 --- a/modules/sensors/max6642.c +++ b/modules/sensors/max6642.c @@ -67,7 +67,8 @@ void vTaskMAX6642( void* Parameters ) max6642_read_remote( temp_sensor, (uint8_t *) &(temp_sensor->readout_value) ); /* Check for threshold events */ - check_sensor_event( temp_sensor ); + sensor_state_check(temp_sensor); + check_sensor_event(temp_sensor); } vTaskDelay(xFrequency); } diff --git a/port/board/afc-bpm/v3_0/sdr_list.c b/port/board/afc-bpm/v3_0/sdr_list.c index daaa35b45..e1138afd8 100644 --- a/port/board/afc-bpm/v3_0/sdr_list.c +++ b/port/board/afc-bpm/v3_0/sdr_list.c @@ -69,10 +69,8 @@ const SDR_type_02h_t SDR_HOTSWAP_AMC = { .sensorcap = 0xc1, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_HOT_SWAP, /* sensor type: HOT SWAP*/ .event_reading_type = 0x6f, /* sensor reading*/ - .assertion_event_mask = { 0x00, /* LSB assert event mask: 3 bit value */ - 0x00 }, /* MSB assert event mask */ - .deassertion_event_mask = { 0x00, /* LSB deassert event mask: 3 bit value */ - 0x00 }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0000, /* assertion event mask */ + .deassertion_event_mask = 0x0000, /* deassertion event mask */ .readable_threshold_mask = 0x00, /* LSB: readable Threshold mask: no thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: no thresholds are setable: */ .sensor_units_1 = 0xc0, /* sensor units 1 : Does not return analog reading*/ @@ -90,47 +88,6 @@ const SDR_type_02h_t SDR_HOTSWAP_AMC = { .IDstring = "HOTSWAP AMC" /* sensor string */ }; -#ifdef MODULE_RTM -const SDR_type_02h_t SDR_HOTSWAP_RTM = { - - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ - .hdr.recID_MSB = 0x00, - .hdr.SDRversion = 0x51, - .hdr.rectype = TYPE_02, - .hdr.reclength = sizeof(SDR_type_02h_t) - sizeof(SDR_entry_hdr_t), - - .ownerID = 0x00, /* i2c address, -> SDR_Init */ - .ownerLUN = 0x00, /* sensor owner LUN */ - .sensornum = 0x00, /* Filled by sdr_insert_entry() */ - -/* record body bytes */ - .entityID = 0xC0, /* entity id: RTM */ - .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x03, /* init: event generation + scanning enabled */ - .sensorcap = 0xc1, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_HOT_SWAP, /* sensor type: HOT SWAP*/ - .event_reading_type = 0x6f, /* sensor reading*/ - .assertion_event_mask = { 0x00, /* LSB assert event mask: 3 bit value */ - 0x00 }, /* MSB assert event mask */ - .deassertion_event_mask = { 0x00, /* LSB deassert event mask: 3 bit value */ - 0x00 }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x00, /* LSB: readable Threshold mask: no thresholds are readable: */ - .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: no thresholds are setable: */ - .sensor_units_1 = 0xc0, /* sensor units 1 : Does not return analog reading*/ - .sensor_units_2 = 0x00, /* sensor units 2 :*/ - .sensor_units_3 = 0x00, /* sensor units 3 :*/ - .record_sharing[0] = 0x00, - .record_sharing[1] = 0x00, - .pos_thr_hysteresis = 0x00, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 0x00, /* negative going Threshold hysteresis value */ - .reserved1 = 0x00, /* reserved */ - .reserved2 = 0x00, /* reserved */ - .reserved3 = 0x00, /* reserved */ - .OEM = 0x00, /* OEM reserved */ - .IDtypelen = 0xc0 | STR_SIZE("HOTSWAP RTM"), /* 8 bit ASCII, number of bytes */ - .IDstring = "HOTSWAP RTM" /* sensor string */ -}; -#endif #endif #ifdef MODULE_INA220_VOLTAGE @@ -150,16 +107,14 @@ const SDR_type_01h_t SDR_FMC1_12V = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: Voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -178,7 +133,7 @@ const SDR_type_01h_t SDR_FMC1_12V = { .sensor_min_reading = 0x00, /* Sensor Minimum reading */ .upper_nonrecover_thr = 205, /* Upper non-recoverable Threshold */ .upper_critical_thr = 200, /* Upper critical Threshold */ - .upper_noncritical_thr = 190, /* Upper non critical Threshold */ + .upper_noncritical_thr = 195, /* Upper non critical Threshold */ .lower_nonrecover_thr = 170, /* Lower non-recoverable Threshold */ .lower_critical_thr = 175, /* Lower critical Threshold */ .lower_noncritical_thr = 180, /* Lower non-critical Threshold */ @@ -193,7 +148,6 @@ const SDR_type_01h_t SDR_FMC1_12V = { /* FMC1 PVADJ */ const SDR_type_01h_t SDR_FMC1_VADJ = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -207,16 +161,14 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -239,8 +191,8 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ .lower_critical_thr = 32, /* Lower critical Threshold */ .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ - .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ + .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ + .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ .reserved2 = 0x00, /* reserved */ .OEM = 0x00, /* OEM reserved */ @@ -250,7 +202,6 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { /* FMC1 P3V3 */ const SDR_type_01h_t SDR_FMC1_P3V3 = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -264,16 +215,14 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: VOLTAGE*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -306,7 +255,6 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { /* FMC2 12V */ const SDR_type_01h_t SDR_FMC2_12V = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -320,16 +268,14 @@ const SDR_type_01h_t SDR_FMC2_12V = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: Voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -363,7 +309,6 @@ const SDR_type_01h_t SDR_FMC2_12V = { /* FMC2 PVADJ */ const SDR_type_01h_t SDR_FMC2_VADJ = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -377,16 +322,14 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -409,8 +352,8 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ .lower_critical_thr = 32, /* Lower critical Threshold */ .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ - .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ + .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ + .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ .reserved2 = 0x00, /* reserved */ .OEM = 0x00, /* OEM reserved */ @@ -434,16 +377,14 @@ const SDR_type_01h_t SDR_FMC2_P3V3 = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: VOLTAGE*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -493,16 +434,14 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Voltage*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Current */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -514,17 +453,17 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 190, /* Nominal reading = 12.285V */ - .normal_max = 156, /* Normal maximum - 5A per sensor */ + .nominal_reading = 32, /* Nominal reading = 1A */ + .normal_max = 125, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 15, /* Lower non-critical Threshold - 0.5A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -536,7 +475,6 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { /* FMC1 PVADJ Current */ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -550,38 +488,36 @@ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: voltage*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ .linearization = 0x00, /* Linearization */ - .M = 32, /* M -> Current LSB*20 */ + .M = 32, /* M */ .M_tol = 0x00, /* M - Tolerance */ .B = 0x00, /* B */ .B_accuracy = 0x00, /* B - Accuracy */ .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 39, /* Nominal reading */ - .normal_max = 47, /* Normal maximum */ - .normal_min = 0, /* Normal minimum */ + .nominal_reading = 39, /* Nominal reading - 1.24A */ + .normal_max = 47, /* Normal maximum - 1.5A*/ + .normal_min = 0, /* Normal minimum - 0A */ .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ .sensor_min_reading = 0x80, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -10, /* Lower non-recoverable Threshold - -0.32A */ + .lower_critical_thr = 0, /* Lower critical Threshold - 0A */ + .lower_noncritical_thr = 5, /* Lower non-critical Threshold - 0.16A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -593,7 +529,6 @@ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { /* FMC1 P3V3 Current */ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -607,16 +542,14 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: VOLTAGE*/ - .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ + .event_reading_type = 0x01, /* sensor reading */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -627,17 +560,17 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 52, /* Nominal reading */ - .normal_max = 59, /* Normal maximum */ - .normal_min = 45, /* Normal minimum */ + .nominal_reading = 85, /* Nominal reading */ + .normal_max = 94, /* Normal maximum - 3A */ + .normal_min = 32, /* Normal minimum - 1A */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 32, /* Lower non-critical Threshold - 1A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -649,7 +582,6 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { /* FMC2 12V Current */ const SDR_type_01h_t SDR_FMC2_12V_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -663,16 +595,14 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Voltage*/ - .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Current */ + .event_reading_type = 0x01, /* sensor reading */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -684,17 +614,17 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 190, /* Nominal reading = 12.285V */ - .normal_max = 200, /* Normal maximum */ + .nominal_reading = 32, /* Nominal reading = 1A */ + .normal_max = 125, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 15, /* Lower non-critical Threshold - 0.5A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -706,7 +636,6 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { /* FMC2 PVADJ Current */ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -720,16 +649,14 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -741,17 +668,17 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 39, /* Nominal reading */ - .normal_max = 47, /* Normal maximum */ - .normal_min = 0, /* Normal minimum */ - .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ - .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .nominal_reading = 39, /* Nominal reading - 1.24A */ + .normal_max = 47, /* Normal maximum - 1.5A*/ + .normal_min = 0, /* Normal minimum - 0A */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -10, /* Lower non-recoverable Threshold - -0.32A */ + .lower_critical_thr = 0, /* Lower critical Threshold - 0A */ + .lower_noncritical_thr = 5, /* Lower non-critical Threshold - 0.16A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -763,7 +690,6 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { /* FMC2 P3V3 Current */ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -777,16 +703,14 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: VOLTAGE*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -797,17 +721,17 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 52, /* Nominal reading */ - .normal_max = 59, /* Normal maximum */ - .normal_min = 45, /* Normal minimum */ + .nominal_reading = 85, /* Nominal reading */ + .normal_max = 94, /* Normal maximum - 3A */ + .normal_min = 32, /* Normal minimum - 1A */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 32, /* Lower non-critical Threshold - 1A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -821,7 +745,6 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { #ifdef MODULE_LM75 /* LM75 SDR List */ const SDR_type_01h_t SDR_LM75_uC = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -835,16 +758,14 @@ const SDR_type_01h_t SDR_LM75_uC = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -877,7 +798,6 @@ const SDR_type_01h_t SDR_LM75_uC = { }; const SDR_type_01h_t SDR_LM75_ADN4604 = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -891,16 +811,14 @@ const SDR_type_01h_t SDR_LM75_ADN4604 = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -933,7 +851,6 @@ const SDR_type_01h_t SDR_LM75_ADN4604 = { }; const SDR_type_01h_t SDR_LM75_DCDC = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -947,16 +864,14 @@ const SDR_type_01h_t SDR_LM75_DCDC = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -989,7 +904,6 @@ const SDR_type_01h_t SDR_LM75_DCDC = { }; const SDR_type_01h_t SDR_LM75_RAM = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -1003,16 +917,14 @@ const SDR_type_01h_t SDR_LM75_RAM = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -1047,7 +959,6 @@ const SDR_type_01h_t SDR_LM75_RAM = { #ifdef MODULE_MAX6642 const SDR_type_01h_t SDR_MAX6642_FPGA = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -1061,16 +972,14 @@ const SDR_type_01h_t SDR_MAX6642_FPGA = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x0, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -1134,6 +1043,7 @@ void amc_sdr_init( void ) #endif #ifdef MODULE_MAX6642 + /* FPGA Die Temperature */ sdr_insert_entry( TYPE_01, (void *) &SDR_MAX6642_FPGA, &vTaskMAX6642_Handle, 0, CHIP_ID_MAX6642 ); #endif diff --git a/port/board/afc-bpm/v3_1/sdr_list.c b/port/board/afc-bpm/v3_1/sdr_list.c index 36735f1a1..6f0915d91 100644 --- a/port/board/afc-bpm/v3_1/sdr_list.c +++ b/port/board/afc-bpm/v3_1/sdr_list.c @@ -69,10 +69,8 @@ const SDR_type_02h_t SDR_HOTSWAP_AMC = { .sensorcap = 0xc1, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_HOT_SWAP, /* sensor type: HOT SWAP*/ .event_reading_type = 0x6f, /* sensor reading*/ - .assertion_event_mask = { 0x00, /* LSB assert event mask: 3 bit value */ - 0x00 }, /* MSB assert event mask */ - .deassertion_event_mask = { 0x00, /* LSB deassert event mask: 3 bit value */ - 0x00 }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0000, /* assertion event mask */ + .deassertion_event_mask = 0x0000, /* deassertion event mask */ .readable_threshold_mask = 0x00, /* LSB: readable Threshold mask: no thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: no thresholds are setable: */ .sensor_units_1 = 0xc0, /* sensor units 1 : Does not return analog reading*/ @@ -89,48 +87,6 @@ const SDR_type_02h_t SDR_HOTSWAP_AMC = { .IDtypelen = 0xc0 | STR_SIZE("HOTSWAP AMC"), /* 8 bit ASCII, number of bytes */ .IDstring = "HOTSWAP AMC" /* sensor string */ }; - -#ifdef MODULE_RTM -const SDR_type_02h_t SDR_HOTSWAP_RTM = { - - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ - .hdr.recID_MSB = 0x00, - .hdr.SDRversion = 0x51, - .hdr.rectype = TYPE_02, - .hdr.reclength = sizeof(SDR_type_02h_t) - sizeof(SDR_entry_hdr_t), - - .ownerID = 0x00, /* i2c address, -> SDR_Init */ - .ownerLUN = 0x00, /* sensor owner LUN */ - .sensornum = 0x00, /* Filled by sdr_insert_entry() */ - -/* record body bytes */ - .entityID = 0xC0, /* entity id: RTM */ - .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x03, /* init: event generation + scanning enabled */ - .sensorcap = 0xc1, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_HOT_SWAP, /* sensor type: HOT SWAP*/ - .event_reading_type = 0x6f, /* sensor reading*/ - .assertion_event_mask = { 0x00, /* LSB assert event mask: 3 bit value */ - 0x00 }, /* MSB assert event mask */ - .deassertion_event_mask = { 0x00, /* LSB deassert event mask: 3 bit value */ - 0x00 }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x00, /* LSB: readable Threshold mask: no thresholds are readable: */ - .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: no thresholds are setable: */ - .sensor_units_1 = 0xc0, /* sensor units 1 : Does not return analog reading*/ - .sensor_units_2 = 0x00, /* sensor units 2 :*/ - .sensor_units_3 = 0x00, /* sensor units 3 :*/ - .record_sharing[0] = 0x00, - .record_sharing[1] = 0x00, - .pos_thr_hysteresis = 0x00, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 0x00, /* negative going Threshold hysteresis value */ - .reserved1 = 0x00, /* reserved */ - .reserved2 = 0x00, /* reserved */ - .reserved3 = 0x00, /* reserved */ - .OEM = 0x00, /* OEM reserved */ - .IDtypelen = 0xc0 | STR_SIZE("HOTSWAP RTM"), /* 8 bit ASCII, number of bytes */ - .IDstring = "HOTSWAP RTM" /* sensor string */ -}; -#endif #endif #ifdef MODULE_INA220_VOLTAGE @@ -154,10 +110,8 @@ const SDR_type_01h_t SDR_FMC1_12V = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: Voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -178,7 +132,7 @@ const SDR_type_01h_t SDR_FMC1_12V = { .sensor_min_reading = 0x00, /* Sensor Minimum reading */ .upper_nonrecover_thr = 205, /* Upper non-recoverable Threshold */ .upper_critical_thr = 200, /* Upper critical Threshold */ - .upper_noncritical_thr = 190, /* Upper non critical Threshold */ + .upper_noncritical_thr = 195, /* Upper non critical Threshold */ .lower_nonrecover_thr = 170, /* Lower non-recoverable Threshold */ .lower_critical_thr = 175, /* Lower critical Threshold */ .lower_noncritical_thr = 180, /* Lower non-critical Threshold */ @@ -210,10 +164,8 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -238,8 +190,8 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ .lower_critical_thr = 32, /* Lower critical Threshold */ .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ - .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ + .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ + .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ .reserved2 = 0x00, /* reserved */ .OEM = 0x00, /* OEM reserved */ @@ -266,10 +218,8 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: VOLTAGE*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -321,10 +271,8 @@ const SDR_type_01h_t SDR_FMC2_12V = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: Voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -377,10 +325,8 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -405,8 +351,8 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ .lower_critical_thr = 32, /* Lower critical Threshold */ .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ - .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ + .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ + .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ .reserved2 = 0x00, /* reserved */ .OEM = 0x00, /* OEM reserved */ @@ -434,10 +380,8 @@ const SDR_type_01h_t SDR_FMC2_P3V3 = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: VOLTAGE*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -490,13 +434,11 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ .sensorinit = 0x7F, /* init: event generation + scanning enabled */ - .sensorcap = 0x56, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Voltage*/ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Current */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0A80, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A80, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ @@ -510,17 +452,17 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 190, /* Nominal reading = 12.285V */ - .normal_max = 156, /* Normal maximum - 5A per sensor */ + .nominal_reading = 32, /* Nominal reading = 1A */ + .normal_max = 125, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.5A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -546,37 +488,35 @@ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ .sensorinit = 0x7F, /* init: event generation + scanning enabled */ - .sensorcap = 0x56, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: voltage*/ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0A80, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A80, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ .linearization = 0x00, /* Linearization */ - .M = 32, /* M -> Current LSB*20 */ + .M = 32, /* M */ .M_tol = 0x00, /* M - Tolerance */ .B = 0x00, /* B */ .B_accuracy = 0x00, /* B - Accuracy */ .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 39, /* Nominal reading */ - .normal_max = 47, /* Normal maximum */ - .normal_min = 0, /* Normal minimum */ + .nominal_reading = 39, /* Nominal reading - 1.24A */ + .normal_max = 47, /* Normal maximum - 1.5A*/ + .normal_min = 0, /* Normal minimum - 0A */ .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ .sensor_min_reading = 0x80, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.32A */ + .lower_critical_thr = -10, /* Lower critical Threshold - 0A */ + .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.16A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -603,12 +543,10 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { .entityinstance = 0x00, /* entity instance -> SDR_Init */ .sensorinit = 0x7F, /* init: event generation + scanning enabled */ .sensorcap = 0x56, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: VOLTAGE*/ - .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ + .event_reading_type = 0x01, /* sensor reading */ + .assertion_event_mask = 0x0A80, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A80, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ @@ -622,16 +560,16 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ .nominal_reading = 85, /* Nominal reading */ - .normal_max = 125, /* Normal maximum */ - .normal_min = 30, /* Normal minimum */ + .normal_max = 94, /* Normal maximum - 3A */ + .normal_min = 32, /* Normal minimum - 1A */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 110, /* Upper critical Threshold */ - .upper_noncritical_thr = 95, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold */ - .lower_critical_thr = 10, /* Lower critical Threshold */ - .lower_noncritical_thr = 30, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 1A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -658,12 +596,10 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { .entityinstance = 0x00, /* entity instance -> SDR_Init */ .sensorinit = 0x7F, /* init: event generation + scanning enabled */ .sensorcap = 0x56, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Voltage*/ - .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Current */ + .event_reading_type = 0x01, /* sensor reading */ + .assertion_event_mask = 0x0A80, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A80, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ @@ -677,17 +613,17 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 190, /* Nominal reading = 12.285V */ - .normal_max = 200, /* Normal maximum */ + .nominal_reading = 32, /* Nominal reading = 1A */ + .normal_max = 125, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.5A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -716,10 +652,8 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0A80, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A80, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ @@ -733,17 +667,17 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 39, /* Nominal reading */ - .normal_max = 47, /* Normal maximum */ - .normal_min = 0, /* Normal minimum */ - .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ - .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .nominal_reading = 39, /* Nominal reading - 1.24A */ + .normal_max = 47, /* Normal maximum - 1.5A*/ + .normal_min = 0, /* Normal minimum - 0A */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.32A */ + .lower_critical_thr = -10, /* Lower critical Threshold - 0A */ + .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.16A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -769,13 +703,11 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ .sensorinit = 0x7F, /* init: event generation + scanning enabled */ - .sensorcap = 0x56, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: VOLTAGE*/ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0A80, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A80, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ @@ -789,16 +721,16 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ .nominal_reading = 85, /* Nominal reading */ - .normal_max = 125, /* Normal maximum */ - .normal_min = 30, /* Normal minimum */ + .normal_max = 94, /* Normal maximum - 3A */ + .normal_min = 32, /* Normal minimum - 1A */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 110, /* Upper critical Threshold */ - .upper_noncritical_thr = 95, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold */ - .lower_critical_thr = 10, /* Lower critical Threshold */ - .lower_noncritical_thr = 30, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 1A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -829,10 +761,8 @@ const SDR_type_01h_t SDR_LM75_uC = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -884,10 +814,8 @@ const SDR_type_01h_t SDR_LM75_ADN4604 = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -939,10 +867,8 @@ const SDR_type_01h_t SDR_LM75_DCDC = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -994,10 +920,8 @@ const SDR_type_01h_t SDR_LM75_RAM = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -1051,10 +975,8 @@ const SDR_type_01h_t SDR_MAX6642_FPGA = { .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ .settable_threshold_mask = 0x0, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ @@ -1093,9 +1015,6 @@ void amc_sdr_init( void ) { /* Hotswap Sensor */ sdr_insert_entry( TYPE_02, (void *) &SDR_HOTSWAP_AMC, &vTaskHotSwap_Handle, 0, 0 ); -#ifdef MODULE_RTM - sdr_insert_entry( TYPE_02, (void *) &SDR_HOTSWAP_RTM, &vTaskHotSwap_Handle, 0, 0 ); -#endif /* INA220 sensors */ #ifdef MODULE_INA220_VOLTAGE diff --git a/port/board/afc-timing/sdr_list.c b/port/board/afc-timing/sdr_list.c index 420d2e488..3d7d69cb6 100644 --- a/port/board/afc-timing/sdr_list.c +++ b/port/board/afc-timing/sdr_list.c @@ -69,10 +69,8 @@ const SDR_type_02h_t SDR_HOTSWAP_AMC = { .sensorcap = 0xc1, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_HOT_SWAP, /* sensor type: HOT SWAP*/ .event_reading_type = 0x6f, /* sensor reading*/ - .assertion_event_mask = { 0x00, /* LSB assert event mask: 3 bit value */ - 0x00 }, /* MSB assert event mask */ - .deassertion_event_mask = { 0x00, /* LSB deassert event mask: 3 bit value */ - 0x00 }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0000, /* assertion event mask */ + .deassertion_event_mask = 0x0000, /* deassertion event mask */ .readable_threshold_mask = 0x00, /* LSB: readable Threshold mask: no thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: no thresholds are setable: */ .sensor_units_1 = 0xc0, /* sensor units 1 : Does not return analog reading*/ @@ -109,16 +107,14 @@ const SDR_type_01h_t SDR_FMC1_12V = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: Voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -137,7 +133,7 @@ const SDR_type_01h_t SDR_FMC1_12V = { .sensor_min_reading = 0x00, /* Sensor Minimum reading */ .upper_nonrecover_thr = 205, /* Upper non-recoverable Threshold */ .upper_critical_thr = 200, /* Upper critical Threshold */ - .upper_noncritical_thr = 190, /* Upper non critical Threshold */ + .upper_noncritical_thr = 195, /* Upper non critical Threshold */ .lower_nonrecover_thr = 170, /* Lower non-recoverable Threshold */ .lower_critical_thr = 175, /* Lower critical Threshold */ .lower_noncritical_thr = 180, /* Lower non-critical Threshold */ @@ -152,7 +148,6 @@ const SDR_type_01h_t SDR_FMC1_12V = { /* FMC1 PVADJ */ const SDR_type_01h_t SDR_FMC1_VADJ = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -166,16 +161,14 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -198,8 +191,8 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ .lower_critical_thr = 32, /* Lower critical Threshold */ .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ - .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ + .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ + .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ .reserved2 = 0x00, /* reserved */ .OEM = 0x00, /* OEM reserved */ @@ -209,7 +202,6 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { /* FMC1 P3V3 */ const SDR_type_01h_t SDR_FMC1_P3V3 = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -223,16 +215,14 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: VOLTAGE*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -265,7 +255,6 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { /* FMC2 12V */ const SDR_type_01h_t SDR_FMC2_12V = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -279,16 +268,14 @@ const SDR_type_01h_t SDR_FMC2_12V = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: Voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -322,7 +309,6 @@ const SDR_type_01h_t SDR_FMC2_12V = { /* FMC2 PVADJ */ const SDR_type_01h_t SDR_FMC2_VADJ = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -336,16 +322,14 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -368,8 +352,8 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ .lower_critical_thr = 32, /* Lower critical Threshold */ .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ - .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ - .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ + .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ + .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ .reserved2 = 0x00, /* reserved */ .OEM = 0x00, /* OEM reserved */ @@ -393,16 +377,14 @@ const SDR_type_01h_t SDR_FMC2_P3V3 = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_VOLTAGE, /* sensor type: VOLTAGE*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -452,16 +434,14 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Voltage*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Current */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -473,17 +453,17 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 190, /* Nominal reading = 12.285V */ - .normal_max = 156, /* Normal maximum - 5A per sensor */ + .nominal_reading = 32, /* Nominal reading = 1A */ + .normal_max = 125, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 15, /* Lower non-critical Threshold - 0.5A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -495,7 +475,6 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { /* FMC1 PVADJ Current */ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -509,38 +488,36 @@ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: voltage*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ .linearization = 0x00, /* Linearization */ - .M = 32, /* M -> Current LSB*20 */ + .M = 32, /* M */ .M_tol = 0x00, /* M - Tolerance */ .B = 0x00, /* B */ .B_accuracy = 0x00, /* B - Accuracy */ .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 39, /* Nominal reading */ - .normal_max = 47, /* Normal maximum */ - .normal_min = 0, /* Normal minimum */ + .nominal_reading = 39, /* Nominal reading - 1.24A */ + .normal_max = 47, /* Normal maximum - 1.5A*/ + .normal_min = 0, /* Normal minimum - 0A */ .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ .sensor_min_reading = 0x80, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -10, /* Lower non-recoverable Threshold - -0.32A */ + .lower_critical_thr = 0, /* Lower critical Threshold - 0A */ + .lower_noncritical_thr = 5, /* Lower non-critical Threshold - 0.16A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -552,7 +529,6 @@ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { /* FMC1 P3V3 Current */ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -566,16 +542,14 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: VOLTAGE*/ - .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ + .event_reading_type = 0x01, /* sensor reading */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -587,16 +561,16 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ .nominal_reading = 85, /* Nominal reading */ - .normal_max = 125, /* Normal maximum */ - .normal_min = 30, /* Normal minimum */ + .normal_max = 94, /* Normal maximum - 3A */ + .normal_min = 32, /* Normal minimum - 1A */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 110, /* Upper critical Threshold */ - .upper_noncritical_thr = 95, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold */ - .lower_critical_thr = 10, /* Lower critical Threshold */ - .lower_noncritical_thr = 30, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 32, /* Lower non-critical Threshold - 1A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -608,7 +582,6 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { /* FMC2 12V Current */ const SDR_type_01h_t SDR_FMC2_12V_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -622,16 +595,14 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Voltage*/ - .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: Current */ + .event_reading_type = 0x01, /* sensor reading */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -643,17 +614,17 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 190, /* Nominal reading = 12.285V */ - .normal_max = 200, /* Normal maximum */ + .nominal_reading = 32, /* Nominal reading = 1A */ + .normal_max = 125, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 15, /* Lower non-critical Threshold - 0.5A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -665,7 +636,6 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { /* FMC2 PVADJ Current */ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -679,16 +649,14 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: voltage*/ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -700,17 +668,17 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ - .nominal_reading = 39, /* Nominal reading */ - .normal_max = 47, /* Normal maximum */ - .normal_min = 0, /* Normal minimum */ - .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ - .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 100, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 90, /* Upper critical Threshold */ - .upper_noncritical_thr = 80, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -60, /* Lower non-recoverable Threshold */ - .lower_critical_thr = -50, /* Lower critical Threshold */ - .lower_noncritical_thr = 10, /* Lower non-critical Threshold */ + .nominal_reading = 39, /* Nominal reading - 1.24A */ + .normal_max = 47, /* Normal maximum - 1.5A*/ + .normal_min = 0, /* Normal minimum - 0A */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -10, /* Lower non-recoverable Threshold - -0.32A */ + .lower_critical_thr = 0, /* Lower critical Threshold - 0A */ + .lower_noncritical_thr = 5, /* Lower non-critical Threshold - 0.16A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -722,7 +690,6 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { /* FMC2 P3V3 Current */ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -736,16 +703,14 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ - .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: VOLTAGE*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm */ + .sensortype = SENSOR_TYPE_CURRENT, /* sensor type: CURRENT */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x80, /* sensor units 1 :*/ .sensor_units_2 = 0x05, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -757,16 +722,16 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ .nominal_reading = 85, /* Nominal reading */ - .normal_max = 125, /* Normal maximum */ - .normal_min = 30, /* Normal minimum */ + .normal_max = 94, /* Normal maximum - 3A */ + .normal_min = 32, /* Normal minimum - 1A */ .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold */ - .upper_critical_thr = 110, /* Upper critical Threshold */ - .upper_noncritical_thr = 95, /* Upper non critical Threshold */ - .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold */ - .lower_critical_thr = 10, /* Lower critical Threshold */ - .lower_noncritical_thr = 30, /* Lower non-critical Threshold */ + .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ + .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ + .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ + .lower_nonrecover_thr = -5, /* Lower non-recoverable Threshold - -0.1A */ + .lower_critical_thr = 10, /* Lower critical Threshold - 0.32A */ + .lower_noncritical_thr = 32, /* Lower non-critical Threshold - 1A */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -780,7 +745,6 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { #ifdef MODULE_LM75 /* LM75 SDR List */ const SDR_type_01h_t SDR_LM75_uC = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -794,16 +758,14 @@ const SDR_type_01h_t SDR_LM75_uC = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -836,7 +798,6 @@ const SDR_type_01h_t SDR_LM75_uC = { }; const SDR_type_01h_t SDR_LM75_ADN4604 = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -850,16 +811,14 @@ const SDR_type_01h_t SDR_LM75_ADN4604 = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -892,7 +851,6 @@ const SDR_type_01h_t SDR_LM75_ADN4604 = { }; const SDR_type_01h_t SDR_LM75_DCDC = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -906,16 +864,14 @@ const SDR_type_01h_t SDR_LM75_DCDC = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -948,7 +904,6 @@ const SDR_type_01h_t SDR_LM75_DCDC = { }; const SDR_type_01h_t SDR_LM75_RAM = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -962,16 +917,14 @@ const SDR_type_01h_t SDR_LM75_RAM = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -1006,7 +959,6 @@ const SDR_type_01h_t SDR_LM75_RAM = { #ifdef MODULE_MAX6642 const SDR_type_01h_t SDR_MAX6642_FPGA = { - .hdr.recID_LSB = 0x00, /* Filled by sdr_insert_entry() */ .hdr.recID_MSB = 0x00, .hdr.SDRversion = 0x51, @@ -1020,16 +972,14 @@ const SDR_type_01h_t SDR_MAX6642_FPGA = { /* record body bytes */ .entityID = 0xC1, /* entity id: AMC Module */ .entityinstance = 0x00, /* entity instance -> SDR_Init */ - .sensorinit = 0x7f, /* init: event generation + scanning enabled */ - .sensorcap = 0x68, /* capabilities: auto re-arm,*/ + .sensorinit = 0x7F, /* init: event generation + scanning enabled */ + .sensorcap = 0x56, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x0, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ diff --git a/port/board/rtm-8sfp/sdr_list.c b/port/board/rtm-8sfp/sdr_list.c index e7ab83791..94aad3c6a 100644 --- a/port/board/rtm-8sfp/sdr_list.c +++ b/port/board/rtm-8sfp/sdr_list.c @@ -46,10 +46,8 @@ const SDR_type_02h_t SDR_HOTSWAP_RTM = { .sensorcap = 0xc1, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_HOT_SWAP, /* sensor type: HOT SWAP*/ .event_reading_type = 0x6f, /* sensor reading*/ - .assertion_event_mask = { 0x00, /* LSB assert event mask: 3 bit value */ - 0x00 }, /* MSB assert event mask */ - .deassertion_event_mask = { 0x00, /* LSB deassert event mask: 3 bit value */ - 0x00 }, /* MSB deassert event mask */ + .assertion_event_mask = 0x0000, /* assertion event mask */ + .deassertion_event_mask = 0x0000, /* deassertion event mask */ .readable_threshold_mask = 0x00, /* LSB: readable Threshold mask: no thresholds are readable: */ .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: no thresholds are setable: */ .sensor_units_1 = 0xc0, /* sensor units 1 : Does not return analog reading*/ @@ -88,12 +86,10 @@ const SDR_type_01h_t SDR_LM75_RTM_1 = { .sensorcap = 0x68, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ @@ -144,12 +140,10 @@ const SDR_type_01h_t SDR_LM75_RTM_2 = { .sensorcap = 0x68, /* capabilities: auto re-arm,*/ .sensortype = SENSOR_TYPE_TEMPERATURE, /* sensor type */ .event_reading_type = 0x01, /* sensor reading*/ - .assertion_event_mask = { 0xFF, /* LSB assert event mask: 3 bit value */ - 0x0F }, /* MSB assert event mask */ - .deassertion_event_mask = { 0xFF, /* LSB deassert event mask: 3 bit value */ - 0x0F }, /* MSB deassert event mask */ - .readable_threshold_mask = 0x3F, /* LSB: readabled Threshold mask: all thresholds are readabled: */ - .settable_threshold_mask = 0x3F, /* MSB: setabled Threshold mask: all thresholds are setabled: */ + .assertion_event_mask = 0x7A95, /* assertion event mask (All upper going-high and lower going-low events) */ + .deassertion_event_mask = 0x7A95, /* deassertion event mask (All upper going-high and lower going-low events) */ + .readable_threshold_mask = 0x3F, /* LSB: readable Threshold mask: all thresholds are readable: */ + .settable_threshold_mask = 0x00, /* MSB: setable Threshold mask: none of the thresholds are setable: */ .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x01, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ diff --git a/port/ucontroller/nxp/lpc17xx/lpc17_hpm.c b/port/ucontroller/nxp/lpc17xx/lpc17_hpm.c index 74c560c9f..e7d14b265 100644 --- a/port/ucontroller/nxp/lpc17xx/lpc17_hpm.c +++ b/port/ucontroller/nxp/lpc17xx/lpc17_hpm.c @@ -32,6 +32,7 @@ #include "modules/ipmi.h" #include "boot/boot.h" #include "modules/watchdog.h" +#include "string.h" uint32_t ipmc_page_addr = 0; uint32_t ipmc_image_size = 0; @@ -108,19 +109,18 @@ uint8_t ipmc_hpm_finish_upload( uint32_t image_size ) ipmc_page_addr = 0; } - for(uint16_t i=0; i<(sizeof(ipmc_page)/sizeof(uint32_t)); i++) { - ipmc_page[i] = 0xFFFFFFFF; + if (ipmc_image_size != image_size) { + /* HPM CC: Number of bytes received does not match the size provided in the "Finish firmware upload" request */ + return 0x81; } + /* Copy the last page (we'll change only the last word) */ + memcpy(ipmc_page, (uint32_t *) (UPGRADE_FLASH_END_ADDR-256), sizeof(ipmc_page)); - /* BUG: This will overwrite the last page in the flash */ /* TODO: Write actual firmware ID */ + /* Write bootloader magic word */ ipmc_page[63] = 0x55555555; ipmc_program_page( UPGRADE_FLASH_END_ADDR-IPMC_UPDATE_ADDRESS_OFFSET-256, ipmc_page, sizeof(ipmc_page)); - if (ipmc_image_size != image_size) { - /* HPM CC: Number of bytes received does not match the size provided in the "Finish firmware upload" request */ - return 0x81; - } return IPMI_CC_OK; }