Closed
Description
Hello @trinamic,
I was examining the tmc4671_doEncoderInitializationMode2 function and I came across the following line of code:
int16_t hall_phi_e_estimated = *hall_phi_e_old + tmc4671_getS16CircleDifference(*hall_phi_e_new, *hall_phi_e_old)/2;
I was curious as to why this equation is not applied to the encoder abn_phi_e_actual. Specifically, I'm wondering why we don't calculate an abn_phi_estimated using a similar formula:
abn_phi_e_estimated = abn_phi_e_old + (abn_phi_e_new - abn_phi_e_old)/2
Then we could set the TMC4671_ABN_DECODER_PHI_E_PHI_M_OFFSET register to hall_phi_e_estimated - abn_phi_e_estimated. Can you please explain why the offset average is only calculated for the hall sensor and not the encoder?
Metadata
Metadata
Assignees
Labels
No labels