dekutree64

Results 4 issues of dekutree64

Terrible bug in the fast sin/cos added last year, resulting in rough sine waves and a spike from +1 to -1 at pi/2

Thanks to ChrisMicro on the forum for finding this bug in the fast sin/cos added last year https://github.com/simplefoc/Arduino-FOC/pull/285 Forum thread https://community.simplefoc.com/t/simplefoc-sin-calculation/5131 There are two potential solutions: Solution 1 is to...

possible bug

Spotted a probable copy/paste error while reading through https://github.com/simplefoc/Arduino-FOC/tree/master/src/current_sense/hardware_specific/stm32/stm32g4/stm32g4_utils.cpp Line 208, shouldn't that be ADC_EXTERNALTRIG_T8_TRGO? #ifdef TIM8 // if defined timer 8 else if(timer->getHandle()->Instance == TIM8) return ADC_EXTERNALTRIG_T7_TRGO; #endif

possible bug

This bit of code in stm32_mcu.cpp reads off the end of the pinTimers array if there is more than one motor. It doesn't always crash, which made it very difficult...

bug