summaryrefslogtreecommitdiff
path: root/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'flash.c')
-rw-r--r--flash.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/flash.c b/flash.c
index 8a0926e..6b1f707 100644
--- a/flash.c
+++ b/flash.c
@@ -540,28 +540,25 @@ static void initFlashValues(FlashStruct *mem)
mem->slew_pwl_time[i][j][k][m]=0.0;
mem->slew_pwl_Vc_norm4095[i][j][k][m]=0;
- int temp_int_pw_dly, temp_int_prf;
+ int temp_int, temp_int_burst;
if (m==0) {
/* these values have been determined by experiment */
- temp_int_pw_dly=dac_max;
- temp_int_prf=dac_max;
+ temp_int = temp_int_burst = dac_max;
mem->period_pwl_time[i][j][k][m]=(47e-9*power_of_ten)+41e-9;
mem->pw_pwl_time[i][j][k][m]=(6e-9*power_of_ten)+5e-9;
mem->delay_pwl_time[i][j][k][m]=(6e-9*power_of_ten)+10e-9;
mem->burst_pwl_time[i][j][k][m]=(22e-9*power_of_ten)+25e-9;
} else if (m==1) {
- temp_int_pw_dly=dac_max/2.15;
- temp_int_prf=dac_max/2.15;
+ temp_int = temp_int_burst = dac_max/2.15;
mem->period_pwl_time[i][j][k][m]=(100e-9*power_of_ten)+50e-9;
mem->pw_pwl_time[i][j][k][m]=(14e-9*power_of_ten)+10e-9;
mem->delay_pwl_time[i][j][k][m]=(14e-9*power_of_ten)+30e-9;
mem->burst_pwl_time[i][j][k][m]=(33e-9*power_of_ten)+10e-9;
} else if (m==2) {
- temp_int_pw_dly=dac_max/4.6;
- temp_int_prf=dac_max/4.6;
+ temp_int = temp_int_burst = dac_max/4.6;
mem->period_pwl_time[i][j][k][m]=(230e-9*power_of_ten)+100e-9;
mem->pw_pwl_time[i][j][k][m]=(28e-9*power_of_ten)+20e-9;
@@ -569,13 +566,20 @@ static void initFlashValues(FlashStruct *mem)
mem->burst_pwl_time[i][j][k][m]=(50e-9*power_of_ten)+10e-9;
} else if (m==3) {
- temp_int_pw_dly=dac_min;
- temp_int_prf=dac_min;
+ temp_int = temp_int_burst = dac_min;
mem->period_pwl_time[i][j][k][m]=(470e-9*power_of_ten)+160e-9;
mem->pw_pwl_time[i][j][k][m]=(70e-9*power_of_ten)+40e-9;
mem->delay_pwl_time[i][j][k][m]=(70e-9*power_of_ten)+90e-9;
mem->burst_pwl_time[i][j][k][m]=(110e-9*power_of_ten)+10e-9;
+ } else if (m==4) {
+ temp_int = 0;
+ temp_int_burst = dac_min / 2 ;
+
+ mem->period_pwl_time[i][j][k][m]=0.0;
+ mem->pw_pwl_time[i][j][k][m]=0.0;
+ mem->delay_pwl_time[i][j][k][m]=0.0;
+ mem->burst_pwl_time[i][j][k][m]=(220e-9*power_of_ten)+10e-9;
} else {
temp_int_pw_dly=0;
temp_int_prf=0;
@@ -585,10 +589,10 @@ static void initFlashValues(FlashStruct *mem)
mem->burst_pwl_time[i][j][k][m]=0.0;
}
- mem->pw_pwl_Vc_norm4095[i][j][k][m]=temp_int_pw_dly;
- mem->delay_pwl_Vc_norm4095[i][j][k][m]=temp_int_pw_dly;
- mem->burst_pwl_Vc_norm4095[i][j][k][m]=temp_int_pw_dly;
- mem->period_pwl_Vc_norm4095[i][j][k][m]=temp_int_prf;
+ mem->pw_pwl_Vc_norm4095[i][j][k][m]=temp_int;
+ mem->delay_pwl_Vc_norm4095[i][j][k][m]=temp_int;
+ mem->burst_pwl_Vc_norm4095[i][j][k][m]=temp_int;
+ mem->period_pwl_Vc_norm4095[i][j][k][m]=temp_int_burst;
}
}
power_of_ten*=10.0;