HUART2 and HUART3 usable now

This commit is contained in:
2021-05-14 20:46:53 +02:00
parent f232660cc0
commit 6ec3740aaf
3 changed files with 239 additions and 172 deletions

View File

@ -6,11 +6,11 @@
#define PWM_FREQ 16000 // PWM frequency in Hz
#endif
#define DEAD_TIME 48 // PWM deadtime
//#ifdef MOTOR_TEST
// #define DELAY_IN_MAIN_LOOP 10
//#else
#ifdef MOTOR_TEST
#define DELAY_IN_MAIN_LOOP 20
#else
#define DELAY_IN_MAIN_LOOP 5
//#endif
#endif
#define TIMEOUT 5 // number of wrong / missing input commands before emergency off
#define A2BIT_CONV 50 // A to bit for current conversion on ADC. Example: 1 A = 50, 2 A = 100, etc