CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches

◆ EPROM_restore_detector_slopes_in_pream()

void EPROM_restore_detector_slopes_in_pream ( uint8_t  scheda_su_scheda_giu,
uint8_t  canale 
)

[fun_EPROM_store_recover_detector_voltage_M24C32_64]

Preamplifier memory contents regarding detector trimmer slopes are restored from mainboard memory. This is a patch: the storing of these data in the preamplifier memoery is unnecessary, but it was done and used from there. So now the content of the preamplifier memory is done also in the mainboard memory at the time of the slopes measurements. These data are restored in the preamplifier memory at startup so that if the preamplifier is changed or swapped the slopes are not lost.

Parameters
[in]scheda_su_scheda_giu: which mmainboard
[in]canale: the channel to where data are copied
Returns
No Parameters
678void EPROM_restore_detector_slopes_in_pream( uint8_t scheda_su_scheda_giu , uint8_t canale){
679 uint8_t dati_da_scrivere[4], iii;
680
681 //Data cells to restore are 6.
682
683 for(iii=0;iii<6;iii++){
684
685 EPROM_lettura_M24C32_64(scheda_su_scheda_giu, I2C_mainboard, Canale_Eprom_mainboard, \
686 ((Memory_mainboard_det_coa_slope_cali_ON_0_OFF_ff_ch0 +6*canale + iii)<<2) , dati_da_scrivere);
687
688 EPROM_scrittura_M24C32_64( scheda_su_scheda_giu, I2C_mainboard, canale, \
689 (Memory_detector_coarse_slope_calibration_ON_0_OFF_ff + iii)<<2 , dati_da_scrivere);
690
691 }
692
693
694}
void EPROM_lettura_M24C32_64(uint8_t scheda_su_scheda_giu_, uint8_t mainboard_postmainboard, uint8_t canale, short indirizzo_memoria, uint8_t *dati_letti)
Read from preamplifier and on-board flashes.
void EPROM_scrittura_M24C32_64(uint8_t scheda_su_scheda_giu, uint8_t mainboard_postmainboard, uint8_t canale, short indirizzo_memoria, uint8_t *dati_da_scrivere)
Wriring the EEPROM.
void EPROM_restore_detector_slopes_in_pream(uint8_t scheda_su_scheda_giu, uint8_t canale)
[fun_EPROM_store_recover_detector_voltage_M24C32_64]
@ Memory_mainboard_det_coa_slope_cali_ON_0_OFF_ff_ch0
slope detector positive trimmer active if zero
@ Memory_detector_coarse_slope_calibration_ON_0_OFF_ff
slope detector positive trimmer active if zero

[fun_EPROM_copy_restore_detector_slopes]

Definition at line 678 of file Memoria_pre_M24CXX.c.

References EPROM_lettura_M24C32_64(), EPROM_scrittura_M24C32_64(), Memory_detector_coarse_slope_calibration_ON_0_OFF_ff, and Memory_mainboard_det_coa_slope_cali_ON_0_OFF_ff_ch0.

Referenced by instr_inizializza_tutto_da_zero_function().