src/occ_405/amec/amec_sensors_core.c
// -------------------------------------------------
//  Droop count sum for core and quad
// ------------------------------------------------
Droop count sum for core and quad
Droop count sum for core and quad
void amec_calc_droop_sensors(CoreData * i_core_data_ptr, uint8_t i_core)
{
    uint32_t l_quad_droops = i_core_data_ptr->droop.cache_large_event;
    uint32_t l_core_droops = i_core_data_ptr->droop.core_small_event;
    int l_quad = i_core / 4;
    sensor_t * l_quad_sensor = AMECSENSOR_ARRAY_PTR(VOLTDROOPCNTQ0, l_quad);
    sensor_t * l_core_sensor = AMECSENSOR_ARRAY_PTR(VOLTDROOPCNTC0, i_core);
    sensor_update( l_core_sensor, l_core_droops);
    sensor_update( l_quad_sensor, l_quad_droops);
    if(l_core_droops)
    {
       INCREMENT_ERR_HISTORY(ERRH_CORE_SMALL_DROOP);
    }
    if(l_quad_droops)
    {
       INCREMENT_ERR_HISTORY(ERRH_CACHE_LARGE_DROOP);
    }
}
void amec_calc_droop_sensors ( CoreData * i_core_data_ptr , uint8_t i_core ) { uint32_t l_quad_droops = i_core_data_ptr -> droop . cache_large_event ; uint32_t l_core_droops = i_core_data_ptr -> droop . core_small_event ; int l_quad = i_core / 4 ; sensor_t * l_quad_sensor = AMECSENSOR_ARRAY_PTR ( VOLTDROOPCNTQ0 , l_quad ) ; sensor_t * l_core_sensor = AMECSENSOR_ARRAY_PTR ( VOLTDROOPCNTC0 , i_core ) ; sensor_update ( l_core_sensor , l_core_droops ) ; sensor_update ( l_quad_sensor , l_quad_droops ) ; if ( l_core_droops ) { INCREMENT_ERR_HISTORY ( ERRH_CORE_SMALL_DROOP ) ; } if ( l_quad_droops ) { INCREMENT_ERR_HISTORY ( ERRH_CACHE_LARGE_DROOP ) ; } }
Droop count sum for core and quad
Droop count sum for core and quad
//CoreData only has any new droop events since the last time CoreData was read // Update ERRH counters so it is known voltage droops are happening in call home data