rene-dev / stmbl

AC Servo Driver for STM32F4
GNU General Public License v3.0
842 stars 404 forks source link

24V reset sometimes results in HAL state: CONFIG_LOAD_ERROR #53

Closed shulter closed 7 years ago

shulter commented 7 years ago

Power cycling 24V, then trying to connect again in Servoterm:

Connecting to /dev/cu.usbmodemFD121
connected
HAL state: CONFIG_LOAD_ERROR
disconnected
shulter commented 7 years ago

Might be because of the psi.txt that I loaded before?

psi0.rt_prio = 10
psi0.dc_volt = hv0.dc_volt
psi0.vel = net0.fb_d
psi0.polecount = conf0.polecount
net0.enable = 0
vel1.en = 1
io0.brake = 1
term0.wave0 = psi0.psi
term0.wave1 = psi0.max_psi
term0.gain0 = 500
term0.gain1 = 500
crinq commented 7 years ago

config in flash is only written if you type "save" so psi.txt should not trigger this sounds like a power startup issue, does your board have the electrolyte cap (c48, c34 xor c70) on the 24V rail?

crinq commented 7 years ago

psi side note: this config needs a restart of hal to work, type "stop" and "start" then turn your motor (faster is better) until psi0.max_psi stays constant (the red line), this is your psi

shulter commented 7 years ago

C34, C48? unpopulated.

I always did a stop and start after loading psi.txt.

reflashed with make btburn, same firmware, newstuff branch. Still

Connecting to /dev/cu.usbmodemFD121
connected
HAL state: CONFIG_LOAD_ERROR

but at least no immediate disconnect. I might have altered settings after the psi.txt was loaded and then saved.

list dump shows the psi stuff is still in there:

foo0.bar <= foo0.bar = 0.000000
adc0.rt_calc_time <= adc0.rt_calc_time = 0.000000
adc0.frt_calc_time <= adc0.frt_calc_time = 0.000000
adc0.rt_prio <= adc0.rt_prio = -1.000000
adc0.frt_prio <= adc0.frt_prio = -1.000000
adc0.sin <= adc0.sin = 0.000000
adc0.cos <= adc0.cos = 0.000000
adc0.sin3 <= adc0.sin3 = 0.000000
adc0.cos3 <= adc0.cos3 = 0.000000
adc0.quad <= adc0.quad = 0.000000
adc0.res_en <= adc0.res_en = 0.000000
adc0.sin_gain <= conf0.sin_gain = 1.000000
adc0.cos_gain <= conf0.cos_gain = 1.000000
adc0.sin_offset <= conf0.sin_offset = 0.000000
adc0.cos_offset <= conf0.cos_offset = 0.000000
res0.rt_calc_time <= res0.rt_calc_time = 0.000000
res0.frt_calc_time <= res0.frt_calc_time = 0.000000
res0.rt_prio <= res0.rt_prio = -1.000000
res0.frt_prio <= res0.frt_prio = -1.000000
res0.pos <= res0.pos = 0.000000
res0.amp <= res0.amp = 0.000000
res0.quad <= res0.quad = 0.000000
res0.poles <= res0.poles = 1.000000
res0.sin <= res0.sin = 0.000000
res0.cos <= res0.cos = 0.000000
res0.enable <= res0.enable = 0.000000
res0.error <= res0.error = 0.000000
enc_fb0.rt_calc_time <= enc_fb0.rt_calc_time = 0.000000
enc_fb0.frt_calc_time <= enc_fb0.frt_calc_time = 0.000000
enc_fb0.rt_prio <= enc_fb0.rt_prio = -1.000000
enc_fb0.frt_prio <= enc_fb0.frt_prio = -1.000000
enc_fb0.res <= enc_fb0.res = 2048.000000
enc_fb0.ires <= enc_fb0.ires = 1024.000000
enc_fb0.pos <= enc_fb0.pos = 0.000000
enc_fb0.index <= enc_fb0.index = 0.000000
enc_fb0.a <= enc_fb0.a = 0.000000
enc_fb0.b <= enc_fb0.b = 0.000000
enc_fb0.ipos <= enc_fb0.ipos = 0.000000
enc_fb0.sin <= enc_fb0.sin = 0.000000
enc_fb0.cos <= enc_fb0.cos = 0.000000
enc_fb0.quad <= enc_fb0.quad = 0.000000
enc_fb0.oquad <= enc_fb0.oquad = 0.000000
enc_fb0.oquadoff <= enc_fb0.oquadoff = 0.000000
enc_fb0.qdiff <= enc_fb0.qdiff = 0.000000
enc_fb0.error <= enc_fb0.error = 0.000000
enc_fb0.amp <= enc_fb0.amp = 0.000000
enc_fb0.s <= enc_fb0.s = 0.000000
enc_fb0.c <= enc_fb0.c = 0.000000
encm0.rt_calc_time <= encm0.rt_calc_time = 0.000000
encm0.frt_calc_time <= encm0.frt_calc_time = 0.000000
encm0.rt_prio <= encm0.rt_prio = -1.000000
encm0.frt_prio <= encm0.frt_prio = -1.000000
encm0.pos <= encm0.pos = 0.000000
encm0.error <= encm0.error = 0.000000
hyper0.rt_calc_time <= hyper0.rt_calc_time = 0.000000
hyper0.frt_calc_time <= hyper0.frt_calc_time = 0.000000
hyper0.rt_prio <= hyper0.rt_prio = -1.000000
hyper0.frt_prio <= hyper0.frt_prio = -1.000000
hyper0.pos <= hyper0.pos = 0.000000
hyper0.error <= hyper0.error = 0.000000
hyper0.status <= hyper0.status = -1.000000
hyper0.read_status <= hyper0.read_status = 0.000000
sserial0.rt_calc_time <= sserial0.rt_calc_time = 0.000000
sserial0.frt_calc_time <= sserial0.frt_calc_time = 0.000000
sserial0.rt_prio <= sserial0.rt_prio = -1.000000
sserial0.frt_prio <= sserial0.frt_prio = -1.000000
sserial0.dump_pd_vals <= sserial0.dump_pd_vals = 0.000000
sserial0.error <= sserial0.error = 0.000000
sserial0.crc_error <= sserial0.crc_error = 0.000000
sserial0.connected <= sserial0.connected = 0.000000
sserial0.timeout <= sserial0.timeout = 100.000000
sserial0.pos_cmd <= sserial0.pos_cmd = 0.000000
sserial0.pos_cmd_d <= sserial0.pos_cmd_d = 0.000000
sserial0.pos_fb <= sserial0.pos_fb = 0.000000
sserial0.in0 <= sserial0.in0 = 0.000000
sserial0.in1 <= sserial0.in1 = 0.000000
sserial0.in2 <= sserial0.in2 = 0.000000
sserial0.in3 <= sserial0.in3 = 0.000000
sserial0.fault <= sserial0.fault = 0.000000
sserial0.out0 <= sserial0.out0 = 0.000000
sserial0.out1 <= sserial0.out1 = 0.000000
sserial0.out2 <= sserial0.out2 = 0.000000
sserial0.out3 <= sserial0.out3 = 0.000000
sserial0.enable <= sserial0.enable = 0.000000
sim0.rt_calc_time <= sim0.rt_calc_time = 0.000000
sim0.frt_calc_time <= sim0.frt_calc_time = 0.000000
sim0.rt_prio <= sim0.rt_prio = 15.000000
sim0.frt_prio <= sim0.frt_prio = -1.000000
sim0.amp <= sim0.amp = 3.100000
sim0.freq <= sim0.freq = 1.000000
sim0.sin <= sim0.sin = 0.000000
sim0.msin <= sim0.msin = 0.000000
sim0.sin2 <= sim0.sin2 = 0.000000
sim0.msin2 <= sim0.msin2 = 0.000000
sim0.sin3 <= sim0.sin3 = 0.000000
sim0.msin3 <= sim0.msin3 = 0.000000
sim0.square <= sim0.square = 0.000000
sim0.vel <= sim0.vel = 0.000000
sim0.res <= conf0.cmd_res = 2000.000000
sim0.offset <= sim0.offset = 0.000000
enc_cmd0.rt_calc_time <= enc_cmd0.rt_calc_time = 0.000000
enc_cmd0.frt_calc_time <= enc_cmd0.frt_calc_time = 0.000000
enc_cmd0.rt_prio <= enc_cmd0.rt_prio = -1.000000
enc_cmd0.frt_prio <= enc_cmd0.frt_prio = -1.000000
enc_cmd0.res <= enc_cmd0.res = 2048.000000
enc_cmd0.pos <= enc_cmd0.pos = 0.000000
enc_cmd0.index <= enc_cmd0.index = 0.000000
enc_cmd0.a <= enc_cmd0.a = 0.000000
enc_cmd0.b <= enc_cmd0.b = 0.000000
en0.rt_calc_time <= en0.rt_calc_time = 0.000000
en0.frt_calc_time <= en0.frt_calc_time = 0.000000
en0.rt_prio <= en0.rt_prio = -1.000000
en0.frt_prio <= en0.frt_prio = -1.000000
en0.en <= en0.en = 0.000000
en0.txen <= en0.txen = 0.000000
stp0.rt_calc_time <= stp0.rt_calc_time = 0.000000
stp0.frt_calc_time <= stp0.frt_calc_time = 0.000000
stp0.rt_prio <= stp0.rt_prio = 6.000000
stp0.frt_prio <= stp0.frt_prio = -1.000000
stp0.target <= stp0.target = 0.000000
stp0.pos <= stp0.pos = 0.000000
stp0.pos_in <= stp0.pos_in = 0.000000
stp0.pos_out <= stp0.pos_out = 0.000000
stp0.vel_in <= stp0.vel_in = 0.000000
stp0.vel_out <= stp0.vel_out = 0.000000
stp0.acc_out <= stp0.acc_out = 0.000000
stp0.max_vel <= conf0.max_vel = 104.719757
stp0.max_acc <= conf0.max_acc = 10471.975586
stp0.dtg <= stp0.dtg = 0.000000
rev0.rt_calc_time <= rev0.rt_calc_time = 0.000000
rev0.frt_calc_time <= rev0.frt_calc_time = 0.000000
rev0.rt_prio <= rev0.rt_prio = 4.000000
rev0.frt_prio <= rev0.frt_prio = -1.000000
rev0.in <= rev0.in = 0.000000
rev0.out <= rev0.out = 0.000000
rev0.rev <= conf0.cmd_rev = 0.000000
rev1.rt_calc_time <= rev1.rt_calc_time = 0.000000
rev1.frt_calc_time <= rev1.frt_calc_time = 0.000000
rev1.rt_prio <= rev1.rt_prio = 4.000000
rev1.frt_prio <= rev1.frt_prio = -1.000000
rev1.in <= rev1.in = 0.000000
rev1.out <= rev1.out = 0.000000
rev1.rev <= conf0.fb_rev = 0.000000
vel0.rt_calc_time <= vel0.rt_calc_time = 0.000000
vel0.frt_calc_time <= vel0.frt_calc_time = 0.000000
vel0.rt_prio <= vel0.rt_prio = 5.000000
vel0.frt_prio <= vel0.frt_prio = -1.000000
vel0.pos_in <= rev0.out = 0.000000
vel0.pos_out <= vel0.pos_out = 0.000000
vel0.vel <= vel0.vel = 0.000000
vel0.acc <= vel0.acc = 0.000000
vel0.w <= vel0.w = 500.000000
vel0.d <= vel0.d = 0.900000
vel0.g <= vel0.g = 1.000000
vel0.h <= vel0.h = 1.000000
vel0.j <= vel0.j = 0.000010
vel0.lp <= vel0.lp = 100.000000
vel0.torque <= vel0.torque = 0.000000
vel0.vel_ff <= vel0.vel_ff = 0.000000
vel0.en <= fault0.enable_pid = 0.000000
vel0.pos_error <= vel0.pos_error = 0.000000
vel1.rt_calc_time <= vel1.rt_calc_time = 0.000000
vel1.frt_calc_time <= vel1.frt_calc_time = 0.000000
vel1.rt_prio <= vel1.rt_prio = 5.000000
vel1.frt_prio <= vel1.frt_prio = -1.000000
vel1.pos_in <= rev1.out = 0.000000
vel1.pos_out <= vel1.pos_out = 0.000000
vel1.vel <= vel1.vel = 0.000000
vel1.acc <= vel1.acc = 0.000000
vel1.w <= vel1.w = 1000.000000
vel1.d <= vel1.d = 0.900000
vel1.g <= vel1.g = 1.000000
vel1.h <= vel1.h = 1.000000
vel1.j <= conf0.j = 0.000026
vel1.lp <= vel1.lp = 100.000000
vel1.torque <= pmsm0.torque = 0.000000
vel1.vel_ff <= vel1.vel_ff = 0.000000
vel1.en <= fault0.enable_pid = 0.000000
vel1.pos_error <= vel1.pos_error = 0.000000
pderiv0.rt_calc_time <= pderiv0.rt_calc_time = 0.000000
pderiv0.frt_calc_time <= pderiv0.frt_calc_time = 0.000000
pderiv0.rt_prio <= pderiv0.rt_prio = -1.000000
pderiv0.frt_prio <= pderiv0.frt_prio = -1.000000
pderiv0.pos_in <= pderiv0.pos_in = 0.000000
pderiv0.vel <= pderiv0.vel = 0.000000
pderiv0.min_diff <= pderiv0.min_diff = 0.015000
pderiv0.diff_time <= pderiv0.diff_time = 0.000000
pderiv0.diff_pos <= pderiv0.diff_pos = 0.000000
pderiv1.rt_calc_time <= pderiv1.rt_calc_time = 0.000000
pderiv1.frt_calc_time <= pderiv1.frt_calc_time = 0.000000
pderiv1.rt_prio <= pderiv1.rt_prio = -1.000000
pderiv1.frt_prio <= pderiv1.frt_prio = -1.000000
pderiv1.pos_in <= pderiv1.pos_in = 0.000000
pderiv1.vel <= pderiv1.vel = 0.000000
pderiv1.min_diff <= pderiv1.min_diff = 0.015000
pderiv1.diff_time <= pderiv1.diff_time = 0.000000
pderiv1.diff_pos <= pderiv1.diff_pos = 0.000000
vel_int0.rt_calc_time <= vel_int0.rt_calc_time = 0.000000
vel_int0.frt_calc_time <= vel_int0.frt_calc_time = 0.000000
vel_int0.rt_prio <= vel_int0.rt_prio = -1.000000
vel_int0.frt_prio <= vel_int0.frt_prio = -1.000000
vel_int0.pos_in <= vel_int0.pos_in = 0.000000
vel_int0.pos_out <= vel_int0.pos_out = 0.000000
vel_int0.vel_in <= vel_int0.vel_in = 0.000000
vel_int0.vel_out <= vel_int0.vel_out = 0.000000
vel_int0.wd <= vel_int0.wd = 0.002000
vel_int0.error <= vel_int0.error = 0.000000
cauto0.rt_calc_time <= cauto0.rt_calc_time = 0.000000
cauto0.frt_calc_time <= cauto0.frt_calc_time = 0.000000
cauto0.rt_prio <= cauto0.rt_prio = 7.000000
cauto0.frt_prio <= cauto0.frt_prio = -1.000000
cauto0.i_q <= cauto0.i_q = 0.000000
cauto0.i_d <= cauto0.i_d = 0.000000
cauto0.pos <= cauto0.pos = 0.000000
cauto0.start <= fault0.phase_start = 0.000000
cauto0.ready <= cauto0.ready = 0.000000
cauto0.mag_offset <= conf0.fb_offset = 0.000000
cauto0.start_offset <= fault0.start_offset = 0.000000
cauto0.mo <= cauto0.mo = 0.000000
cauto0.moffset <= cauto0.moffset = 0.000000
cauto0.fb_in <= vel1.pos_out = 0.000000
cauto0.fb_out <= cauto0.fb_out = 0.000000
cauto0.cur <= conf0.phase_cur = 1.000000
cauto0.time <= conf0.phase_time = 0.500000
ypid0.rt_calc_time <= ypid0.rt_calc_time = 0.000000
ypid0.frt_calc_time <= ypid0.frt_calc_time = 0.000000
ypid0.rt_prio <= ypid0.rt_prio = -1.000000
ypid0.frt_prio <= ypid0.frt_prio = -1.000000
ypid0.pos_ext_cmd <= ypid0.pos_ext_cmd = 0.000000
ypid0.pos_fb <= ypid0.pos_fb = 0.000000
ypid0.pos_error <= ypid0.pos_error = 0.000000
ypid0.vel_ext_cmd <= ypid0.vel_ext_cmd = 0.000000
ypid0.vel_fb <= ypid0.vel_fb = 0.000000
ypid0.vel_cmd <= ypid0.vel_cmd = 0.000000
ypid0.vel_error <= ypid0.vel_error = 0.000000
ypid0.vel_min <= ypid0.vel_min = 0.300000
ypid0.enable <= ypid0.enable = 0.000000
ypid0.out <= ypid0.out = 0.000000
ypid0.pos_p <= ypid0.pos_p = 10.000000
ypid0.vel_p <= ypid0.vel_p = 0.500000
ypid0.vel_i <= ypid0.vel_i = 0.050000
ypid0.vel_ff <= ypid0.vel_ff = 1.000000
ypid0.max_vel <= ypid0.max_vel = 0.000000
ypid0.max_acc <= ypid0.max_acc = 0.000000
ypid0.max_out <= ypid0.max_out = 0.000000
ypid0.vel_sat <= ypid0.vel_sat = 0.000000
ypid0.out_sat <= ypid0.out_sat = 0.000000
ypid0.saturated <= ypid0.saturated = 0.000000
pid0.rt_calc_time <= pid0.rt_calc_time = 0.000000
pid0.frt_calc_time <= pid0.frt_calc_time = 0.000000
pid0.rt_prio <= pid0.rt_prio = 8.000000
pid0.frt_prio <= pid0.frt_prio = -1.000000
pid0.pos_ext_cmd <= net0.cmd = 0.000000
pid0.pos_fb <= net0.fb = 0.000000
pid0.pos_error <= pid0.pos_error = 0.000000
pid0.vel_ext_cmd <= net0.cmd_d = 0.000000
pid0.vel_fb <= net0.fb_d = 0.000000
pid0.vel_cmd <= pid0.vel_cmd = 0.000000
pid0.vel_error <= pid0.vel_error = 0.000000
pid0.vel_min <= pid0.vel_min = 0.000000
pid0.acc_ext_cmd <= pid0.acc_ext_cmd = 0.000000
pid0.acc_cmd <= pid0.acc_cmd = 0.000000
pid0.torque_ext_cmd <= pid0.torque_ext_cmd = 0.000000
pid0.torque_cmd <= pid0.torque_cmd = 0.000000
pid0.torque_cor_cmd <= pid0.torque_cor_cmd = 0.000000
pid0.friction <= pid0.friction = 0.000000
pid0.damping <= pid0.damping = 0.000000
pid0.load <= pid0.load = 0.000000
pid0.enable <= fault0.enable_pid = 0.000000
pid0.pos_en <= pid0.pos_en = 1.000000
pid0.vel_en <= pid0.vel_en = 1.000000
pid0.acc_en <= pid0.acc_en = 1.000000
pid0.p <= conf0.p = 0.990000
pid0.pos_p <= conf0.pos_p = 100.000000
pid0.pos_lp <= pid0.pos_lp = 4000.000000
pid0.vel_p <= conf0.vel_p = 1.000000
pid0.vel_lp <= pid0.vel_lp = 4000.000000
pid0.vel_ff <= pid0.vel_ff = 1.000000
pid0.acc_p <= conf0.acc_p = 0.300000
pid0.acc_lp <= pid0.acc_lp = 4000.000000
pid0.acc_pi <= conf0.acc_pi = 50.000000
pid0.acc_ff <= pid0.acc_ff = 1.000000
pid0.torque_ff <= pid0.torque_ff = 1.000000
pid0.friction_ff <= pid0.friction_ff = 0.900000
pid0.damping_ff <= pid0.damping_ff = 0.900000
pid0.load_ff <= pid0.load_ff = 0.900000
pid0.j <= conf0.j = 0.000026
pid0.max_vel <= pid0.max_vel = 0.000000
pid0.max_torque <= pid0.max_torque = 0.000000
pid0.min_torque <= pid0.min_torque = 0.000000
pid0.max_usr_vel <= conf0.max_vel = 104.719757
pid0.max_usr_acc <= conf0.max_acc = 10471.975586
pid0.max_usr_torque <= conf0.max_force = 1.000000
pid0.vel_sat <= pid0.vel_sat = 0.000000
pid0.acc_sat <= pid0.acc_sat = 0.000000
pid0.torque_sat <= pid0.torque_sat = 0.000000
pid0.saturated <= pid0.saturated = 0.000000
t2c0.rt_calc_time <= t2c0.rt_calc_time = 0.000000
t2c0.frt_calc_time <= t2c0.frt_calc_time = 0.000000
t2c0.rt_prio <= t2c0.rt_prio = -1.000000
t2c0.frt_prio <= t2c0.frt_prio = -1.000000
t2c0.psi <= t2c0.psi = 0.010000
t2c0.polecount <= t2c0.polecount = 1.000000
t2c0.torque <= pid0.torque_cor_cmd = 0.000000
t2c0.cur <= t2c0.cur = 0.000000
curpid0.rt_calc_time <= curpid0.rt_calc_time = 0.000000
curpid0.frt_calc_time <= curpid0.frt_calc_time = 0.000000
curpid0.rt_prio <= curpid0.rt_prio = -1.000000
curpid0.frt_prio <= curpid0.frt_prio = -1.000000
curpid0.id_cmd <= curpid0.id_cmd = 0.000000
curpid0.iq_cmd <= curpid0.iq_cmd = 0.000000
curpid0.id_fb <= curpid0.id_fb = 0.000000
curpid0.iq_fb <= curpid0.iq_fb = 0.000000
curpid0.indd_fb <= curpid0.indd_fb = 0.000000
curpid0.indq_fb <= curpid0.indq_fb = 0.000000
curpid0.ud <= curpid0.ud = 0.000000
curpid0.uq <= curpid0.uq = 0.000000
curpid0.ac_volt <= curpid0.ac_volt = 0.000000
curpid0.dc_volt <= curpid0.dc_volt = 0.000000
curpid0.max_cur <= fault0.cur = 0.000000
curpid0.rd <= curpid0.rd = 0.000000
curpid0.rq <= curpid0.rq = 0.000000
curpid0.ld <= curpid0.ld = 0.000000
curpid0.lq <= curpid0.lq = 0.000000
curpid0.ff <= curpid0.ff = 0.000000
curpid0.kp <= curpid0.kp = 0.000000
curpid0.ki <= curpid0.ki = 0.000000
curpid0.kind <= curpid0.kind = 0.000000
curpid0.id_error <= curpid0.id_error = 0.000000
curpid0.iq_error <= curpid0.iq_error = 0.000000
curpid0.res <= curpid0.res = 2400.000000
curpid0.volt_res <= curpid0.volt_res = 0.000000
pmsm0.rt_calc_time <= pmsm0.rt_calc_time = 0.000000
pmsm0.frt_calc_time <= pmsm0.frt_calc_time = 0.000000
pmsm0.rt_prio <= pmsm0.rt_prio = -1.000000
pmsm0.frt_prio <= pmsm0.frt_prio = -1.000000
pmsm0.psi <= pmsm0.psi = 0.010000
pmsm0.r <= pmsm0.r = 1.000000
pmsm0.ld <= pmsm0.ld = 0.001000
pmsm0.lq <= pmsm0.lq = 0.001000
pmsm0.polecount <= pmsm0.polecount = 1.000000
pmsm0.vel <= pmsm0.vel = 0.000000
pmsm0.ud <= pmsm0.ud = 0.000000
pmsm0.uq <= pmsm0.uq = 0.000000
pmsm0.indd <= pmsm0.indd = 0.000000
pmsm0.indq <= pmsm0.indq = 0.000000
pmsm0.id <= pmsm0.id = 0.000000
pmsm0.iq <= pmsm0.iq = 0.000000
pmsm0.psi_d <= pmsm0.psi_d = 0.000000
pmsm0.psi_q <= pmsm0.psi_q = 0.000000
pmsm0.torque <= pmsm0.torque = 0.000000
pmsm0.drop_q <= pmsm0.drop_q = 0.000000
pmsm0.drop_d <= pmsm0.drop_d = 0.000000
pmsm0.drop_v <= pmsm0.drop_v = 0.700000
pmsm0.drop_exp <= pmsm0.drop_exp = 0.040000
pmsm_limits0.rt_calc_time <= pmsm_limits0.rt_calc_time = 0.000000
pmsm_limits0.frt_calc_time <= pmsm_limits0.frt_calc_time = 0.000000
pmsm_limits0.rt_prio <= pmsm_limits0.rt_prio = -1.000000
pmsm_limits0.frt_prio <= pmsm_limits0.frt_prio = -1.000000
pmsm_limits0.psi <= pmsm_limits0.psi = 0.010000
pmsm_limits0.r <= pmsm_limits0.r = 1.000000
pmsm_limits0.ld <= pmsm_limits0.ld = 0.001000
pmsm_limits0.lq <= pmsm_limits0.lq = 0.001000
pmsm_limits0.polecount <= pmsm_limits0.polecount = 1.000000
pmsm_limits0.ac_volt <= pmsm_limits0.ac_volt = 0.000000
pmsm_limits0.next_max_cur <= pmsm_limits0.next_max_cur = 0.000000
pmsm_limits0.next_max_torque <= pmsm_limits0.next_max_torque = 0.000000
pmsm_limits0.next_min_cur <= pmsm_limits0.next_min_cur = 0.000000
pmsm_limits0.next_min_torque <= pmsm_limits0.next_min_torque = 0.000000
pmsm_limits0.max_cur <= pmsm_limits0.max_cur = 0.000000
pmsm_limits0.max_torque <= pmsm_limits0.max_torque = 0.000000
pmsm_limits0.min_cur <= pmsm_limits0.min_cur = 0.000000
pmsm_limits0.min_torque <= pmsm_limits0.min_torque = 0.000000
pmsm_limits0.abs_max_cur <= pmsm_limits0.abs_max_cur = 0.000000
pmsm_limits0.abs_max_torque <= pmsm_limits0.abs_max_torque = 0.000000
pmsm_limits0.abs_max_vel <= pmsm_limits0.abs_max_vel = 0.000000
pmsm_limits0.iq <= pmsm_limits0.iq = 0.000000
pmsm_limits0.indq <= pmsm_limits0.indq = 0.000000
idq0.rt_calc_time <= idq0.rt_calc_time = 0.000000
idq0.frt_calc_time <= idq0.frt_calc_time = 0.000000
idq0.rt_prio <= idq0.rt_prio = -1.000000
idq0.frt_prio <= idq0.frt_prio = -1.000000
idq0.d <= idq0.d = 0.000000
idq0.q <= idq0.q = 0.000000
idq0.pos <= cauto0.pos = 0.000000
idq0.polecount <= idq0.polecount = 1.000000
idq0.a <= idq0.a = 0.000000
idq0.b <= idq0.b = 0.000000
dq0.rt_calc_time <= dq0.rt_calc_time = 0.000000
dq0.frt_calc_time <= dq0.frt_calc_time = 0.000000
dq0.rt_prio <= dq0.rt_prio = -1.000000
dq0.frt_prio <= dq0.frt_prio = -1.000000
dq0.u <= dq0.u = 0.000000
dq0.v <= dq0.v = 0.000000
dq0.w <= dq0.w = 0.000000
dq0.pos <= dq0.pos = 0.000000
dq0.polecount <= dq0.polecount = 1.000000
dq0.a <= dq0.a = 0.000000
dq0.b <= dq0.b = 0.000000
dq0.c <= dq0.c = 0.000000
dq0.d <= dq0.d = 0.000000
dq0.q <= dq0.q = 0.000000
hv0.rt_calc_time <= hv0.rt_calc_time = 0.000000
hv0.frt_calc_time <= hv0.frt_calc_time = 0.000000
hv0.rt_prio <= hv0.rt_prio = 14.000000
hv0.frt_prio <= hv0.frt_prio = -1.000000
hv0.a <= hv0.a = 0.000000
hv0.b <= hv0.b = 0.000000
hv0.mode <= hv0.mode = 0.000000
hv0.enable <= fault0.enable_out = 0.000000
hv0.error <= hv0.error = 0.000000
hv0.over_cur <= hv0.over_cur = 0.000000
hv0.over_temp <= hv0.over_temp = 0.000000
hv0.hv_fault <= hv0.hv_fault = 0.000000
hv0.dc_cur <= hv0.dc_cur = 0.000000
hv0.dc_volt <= hv0.dc_volt = 0.000000
hv0.pwm_volt <= hv0.pwm_volt = 0.000000
hv0.hv_temp <= hv0.hv_temp = 0.000000
hv0.power <= hv0.power = 0.000000
hv0.dc_cur_sim <= hv0.dc_cur_sim = 0.000000
hv0.ac_cur_sim <= hv0.ac_cur_sim = 0.000000
hv0.iq <= hv0.iq = 0.000000
hv0.rev <= conf0.out_rev = 0.000000
fault0.rt_calc_time <= fault0.rt_calc_time = 0.000000
fault0.frt_calc_time <= fault0.frt_calc_time = 0.000000
fault0.rt_prio <= fault0.rt_prio = 3.000000
fault0.frt_prio <= fault0.frt_prio = -1.000000
fault0.max_dc_cur <= conf0.max_dc_cur = 1.000000
fault0.max_ac_cur <= conf0.max_ac_cur = 2.000000
fault0.max_dc_volt <= conf0.max_dc_volt = 370.000000
fault0.max_hv_temp <= conf0.max_hv_temp = 90.000000
fault0.max_core_temp <= conf0.max_core_temp = 55.000000
fault0.max_motor_temp <= conf0.max_motor_temp = 100.000000
fault0.max_pos_error <= conf0.max_pos_error = 1.570796
fault0.max_sat <= conf0.max_sat = 0.200000
fault0.high_dc_volt <= conf0.high_dc_volt = 350.000000
fault0.high_hv_temp <= conf0.high_hv_temp = 70.000000
fault0.high_motor_temp <= conf0.high_motor_temp = 80.000000
fault0.low_dc_volt <= conf0.low_dc_volt = 12.000000
fault0.fan_hv_temp <= conf0.fan_hv_temp = 60.000000
fault0.fan_core_temp <= conf0.fan_core_temp = 450.000000
fault0.fan_motor_temp <= conf0.fan_motor_temp = 60.000000
fault0.enable <= net0.enable = 1.000000
fault0.reset <= fault0.reset = 0.000000
fault0.phase_on_start <= conf0.autophase = 1.000000
fault0.phase_start <= fault0.phase_start = 0.000000
fault0.phase_ready <= cauto0.ready = 0.000000
fault0.start_offset <= fault0.start_offset = 0.000000
fault0.hv_temp <= hv0.hv_temp = 0.000000
fault0.core_temp0 <= net0.core_temp0 = 0.000000
fault0.core_temp1 <= net0.core_temp1 = 0.000000
fault0.motor_temp <= net0.motor_temp = 0.000000
fault0.dc_volt <= hv0.dc_volt = 0.000000
fault0.dc_cur <= hv0.dc_cur = 0.000000
fault0.ac_cur <= fault0.ac_cur = 0.000000
fault0.pos_error <= pid0.pos_error = 0.000000
fault0.fb_ready <= fault0.fb_ready = 0.000000
fault0.fb_error <= net0.fb_error = 0.000000
fault0.cmd_ready <= fault0.cmd_ready = 1.000000
fault0.cmd_error <= fault0.cmd_error = 0.000000
fault0.hv_no_comms <= hv0.error = 0.000000
fault0.hv_error <= hv0.hv_fault = 0.000000
fault0.sat <= pid0.saturated = 0.000000
fault0.cmd <= net0.cmd = 0.000000
fault0.fb <= rev1.out = 0.000000
fault0.cur <= fault0.cur = 0.000000
fault0.brake_resistor <= fault0.brake_resistor = 0.000000
fault0.brake <= fault0.brake = 0.000000
fault0.brake_release <= fault0.brake_release = 0.000000
fault0.hv_fan <= fault0.hv_fan = 0.000000
fault0.core_fan <= fault0.core_fan = 0.000000
fault0.motor_fan <= fault0.motor_fan = 0.000000
fault0.fan <= fault0.fan = 0.000000
fault0.enable_out <= fault0.enable_out = 0.000000
fault0.enable_pid <= fault0.enable_pid = 0.000000
fault0.fault <= fault0.fault = 0.000000
fault0.fault_not <= fault0.fault_not = 1.000000
fault0.scale <= fault0.scale = 1.000000
fault0.led_green <= fault0.led_green = 0.000000
fault0.led_red <= fault0.led_red = 0.000000
fault0.state <= fault0.state = 0.000000
term0.rt_calc_time <= term0.rt_calc_time = 0.000000
term0.frt_calc_time <= term0.frt_calc_time = 0.000000
term0.rt_prio <= term0.rt_prio = 15.000000
term0.frt_prio <= term0.frt_prio = -1.000000
term0.wave0 <= net0.cmd = 0.000000
term0.gain0 <= term0.gain0 = 20.000000
term0.offset0 <= term0.offset0 = 0.000000
term0.wave1 <= net0.fb = 0.000000
term0.gain1 <= term0.gain1 = 20.000000
term0.offset1 <= term0.offset1 = 0.000000
term0.wave2 <= net0.cmd_d = 0.000000
term0.gain2 <= term0.gain2 = 1.000000
term0.offset2 <= term0.offset2 = 0.000000
term0.wave3 <= net0.fb_d = 0.000000
term0.gain3 <= term0.gain3 = 1.000000
term0.offset3 <= term0.offset3 = 0.000000
term0.wave4 <= term0.wave4 = 0.000000
term0.gain4 <= term0.gain4 = 10.000000
term0.offset4 <= term0.offset4 = 0.000000
term0.wave5 <= term0.wave5 = 0.000000
term0.gain5 <= term0.gain5 = 10.000000
term0.offset5 <= term0.offset5 = 0.000000
term0.wave6 <= term0.wave6 = 0.000000
term0.gain6 <= term0.gain6 = 10.000000
term0.offset6 <= term0.offset6 = 0.000000
term0.wave7 <= term0.wave7 = 0.000000
term0.gain7 <= term0.gain7 = 10.000000
term0.offset7 <= term0.offset7 = 0.000000
term0.send_step <= term0.send_step = 10.000000
term0.buf_use <= term0.buf_use = 0.000000
term0.fault <= fault0.state = 0.000000
term0.con <= term0.con = 0.000000
term0.jogvel <= term0.jogvel = 10.000000
term0.jogpos <= term0.jogpos = 0.000000
term0.jogging <= term0.jogging = 0.000000
term0.tim2_rv <= term0.tim2_rv = 420.000000
io0.rt_calc_time <= io0.rt_calc_time = 0.000000
io0.frt_calc_time <= io0.frt_calc_time = 0.000000
io0.rt_prio <= io0.rt_prio = -1.000000
io0.frt_prio <= io0.frt_prio = -1.000000
io0.fan <= fault0.hv_fan = 0.000000
io0.red <= fault0.led_red = 0.000000
io0.green <= fault0.led_green = 0.000000
io0.brake <= fault0.brake = 0.000000
uf0.rt_calc_time <= uf0.rt_calc_time = 0.000000
uf0.frt_calc_time <= uf0.frt_calc_time = 0.000000
uf0.rt_prio <= uf0.rt_prio = -1.000000
uf0.frt_prio <= uf0.frt_prio = -1.000000
uf0.freq <= uf0.freq = 0.000000
uf0.freq_out <= uf0.freq_out = 0.000000
uf0.fn <= uf0.fn = 1000.000000
uf0.un <= uf0.un = 180.000000
uf0.lp <= uf0.lp = 0.500000
uf0.max_freq <= uf0.max_freq = 1000.000000
uf0.max_volt <= uf0.max_volt = 254.520004
uf0.vel_fb <= uf0.vel_fb = 0.000000
uf0.p <= uf0.p = 2.000000
uf0.i <= uf0.i = 10.000000
uf0.max_slip <= uf0.max_slip = 0.150000
uf0.scale <= uf0.scale = 1.000000
uf0.slip <= uf0.slip = 0.000000
uf0.dcbrake <= uf0.dcbrake = 0.200000
uf0.pos <= uf0.pos = 0.000000
uf0.volt <= uf0.volt = 0.000000
freq_fb0.rt_calc_time <= freq_fb0.rt_calc_time = 0.000000
freq_fb0.frt_calc_time <= freq_fb0.frt_calc_time = 0.000000
freq_fb0.rt_prio <= freq_fb0.rt_prio = -1.000000
freq_fb0.frt_prio <= freq_fb0.frt_prio = -1.000000
freq_fb0.vel <= freq_fb0.vel = 0.000000
freq_fb0.a <= freq_fb0.a = 0.000000
freq_fb0.res <= freq_fb0.res = 6.000000
freq_fb0.t <= freq_fb0.t = 0.025000
freq_fb0.lp <= freq_fb0.lp = 0.500000
psi0.rt_calc_time <= psi0.rt_calc_time = 0.000000
psi0.frt_calc_time <= psi0.frt_calc_time = 0.000000
psi0.rt_prio <= psi0.rt_prio = -1.000000
psi0.frt_prio <= psi0.frt_prio = -1.000000
psi0.vel <= psi0.vel = 0.000000
psi0.dc_volt <= psi0.dc_volt = 0.000000
psi0.polecount <= psi0.polecount = 1.000000
psi0.drop <= psi0.drop = 0.800000
psi0.psi <= psi0.psi = 0.000000
psi0.max_psi <= psi0.max_psi = 0.000000
var0.rt_calc_time <= var0.rt_calc_time = 0.000000
var0.frt_calc_time <= var0.frt_calc_time = 0.000000
var0.rt_prio <= var0.rt_prio = -1.000000
var0.frt_prio <= var0.frt_prio = -1.000000
var0.x <= var0.x = 0.000000
var0.freq <= var0.freq = 0.100000
var0.en <= var0.en = 1.000000
var0.var <= var0.var = 0.000000
var0.sigma <= var0.sigma = 0.000000
var0.max <= var0.max = 0.000000
var0.min <= var0.min = 0.000000
var0.mu <= var0.mu = 0.000000
net0.enable <= net0.enable = 1.000000
net0.cmd <= vel0.pos_out = 0.000000
net0.fb <= cauto0.fb_out = 0.000000
net0.fb_error <= net0.fb_error = 0.000000
net0.cmd_d <= vel0.vel = 0.000000
net0.fb_d <= vel1.vel = 0.000000
net0.core_temp0 <= net0.core_temp0 = 0.000000
net0.core_temp1 <= net0.core_temp1 = 0.000000
net0.motor_temp <= net0.motor_temp = 0.000000
net0.rt_calc_time <= net0.rt_calc_time = 0.000000
net0.frt_calc_time <= net0.frt_calc_time = 0.000000
net0.nrt_calc_time <= net0.nrt_calc_time = 0.000004
net0.rt_period <= net0.rt_period = 0.000000
net0.frt_period <= net0.frt_period = 0.000000
net0.nrt_period <= net0.nrt_period = 0.000000
conf0.r <= conf0.r = 1.000000
conf0.l <= conf0.l = 0.010000
conf0.j <= conf0.j = 0.000026
conf0.psi <= conf0.psi = 0.050000
conf0.polecount <= conf0.polecount = 4.000000
conf0.mot_type <= conf0.mot_type = 0.000000
conf0.out_rev <= conf0.out_rev = 0.000000
conf0.high_motor_temp <= conf0.high_motor_temp = 80.000000
conf0.max_motor_temp <= conf0.max_motor_temp = 100.000000
conf0.phase_time <= conf0.phase_time = 0.500000
conf0.phase_cur <= conf0.phase_cur = 1.000000
conf0.max_vel <= conf0.max_vel = 104.719757
conf0.max_acc <= conf0.max_acc = 10471.975586
conf0.max_force <= conf0.max_force = 1.000000
conf0.max_dc_cur <= conf0.max_dc_cur = 1.000000
conf0.max_ac_cur <= conf0.max_ac_cur = 2.000000
conf0.fb_type <= conf0.fb_type = 2.000000
conf0.fb_polecount <= conf0.fb_polecount = 1.000000
conf0.fb_offset <= conf0.fb_offset = 0.000000
conf0.fb_rev <= conf0.fb_rev = 0.000000
conf0.fb_res <= conf0.fb_res = 1000.000000
conf0.autophase <= conf0.autophase = 1.000000
conf0.cmd_type <= conf0.cmd_type = 1.000000
conf0.cmd_unit <= conf0.cmd_unit = 0.000000
conf0.cmd_rev <= conf0.cmd_rev = 0.000000
conf0.cmd_res <= conf0.cmd_res = 2000.000000
conf0.en_condition <= conf0.en_condition = 0.000000
conf0.error_out <= conf0.error_out = 0.000000
conf0.pos_static <= conf0.pos_static = 0.000000
conf0.sin_offset <= conf0.sin_offset = 0.000000
conf0.cos_offset <= conf0.cos_offset = 0.000000
conf0.sin_gain <= conf0.sin_gain = 1.000000
conf0.cos_gain <= conf0.cos_gain = 1.000000
conf0.max_dc_volt <= conf0.max_dc_volt = 370.000000
conf0.max_hv_temp <= conf0.max_hv_temp = 90.000000
conf0.max_core_temp <= conf0.max_core_temp = 55.000000
conf0.max_pos_error <= conf0.max_pos_error = 1.570796
conf0.high_dc_volt <= conf0.high_dc_volt = 350.000000
conf0.low_dc_volt <= conf0.low_dc_volt = 12.000000
conf0.high_hv_temp <= conf0.high_hv_temp = 70.000000
conf0.fan_hv_temp <= conf0.fan_hv_temp = 60.000000
conf0.fan_core_temp <= conf0.fan_core_temp = 450.000000
conf0.fan_motor_temp <= conf0.fan_motor_temp = 60.000000
conf0.p <= conf0.p = 0.990000
conf0.pos_p <= conf0.pos_p = 100.000000
conf0.vel_p <= conf0.vel_p = 1.000000
conf0.acc_p <= conf0.acc_p = 0.300000
conf0.acc_pi <= conf0.acc_pi = 50.000000
conf0.cur_p <= conf0.cur_p = 0.000000
conf0.cur_i <= conf0.cur_i = 0.000000
conf0.cur_ff <= conf0.cur_ff = 1.000000
conf0.cur_ind <= conf0.cur_ind = 0.000000
conf0.max_sat <= conf0.max_sat = 0.200000
crinq commented 7 years ago

try mounting c48, c34 xor c70 value is not critical

shulter commented 7 years ago

Power cycled. Magically working again:

Connecting to /dev/cu.usbmodemFD121 connected conf0.j = 0.000026

shulter commented 7 years ago

Btw. 24V in rush current is limited to 200mA at the lab power supply to not fry anything accidentally. HV side is connected to a second PSU (off right now)

crinq commented 7 years ago

CONFIG_LOAD_ERROR can also happen if you switch branches, as we sometimes change config stuff if so write a new config with "save" to fix this

shulter commented 7 years ago

ok good to know. Is it normal that the F4 is quite hot? The board pulls 140mA with a 5V encoder, 90mA without. The 7812 is close to frying pan mode, might change it to a small DCDC module.

crinq commented 7 years ago

7812 should have normal temp if no fan or 12V FB is connected f4 reaches 50-60°C at normal ambiente temperature

shulter commented 7 years ago

Ok good to know. 7812 is slightly too hot to touch.

crinq commented 7 years ago

side note: there is no esd protection on the io and swd headers on stmbl version <= 3.3 esd can fry gpio pins, wich results in higher current consumption 140mA - 160mA is normal (depending on the batch and used periphery)

shulter commented 7 years ago

Power cycling results in a fully working state if the encoder is not connected when the 24V is enabled. It's fine to connect it after the F4 is awake. A slow rise time for 24V might be a problem for the F4.

crinq commented 7 years ago

try with a higher current limit and/or some caps on the 24v rail in v4.0 FB voltage is disabled on startup

rene-dev commented 7 years ago

CONFIG_LOAD_ERROR means the config flash section could not be read, or has an incorrect format. This happens occasionally, but I have no idea why, and what actually happens. Could be debugged by giving more details in the error message.

rene-dev commented 7 years ago

Try typing load when this happens. It might already give you a more detailed error message

rene-dev commented 7 years ago

EE_ReadVariable returns 1: the variable was not found on reading address 0 https://github.com/rene-dev/stmbl/blob/master/src/eeprom.c#L266