Can communication (#9)

* First tries with can

* More implementations

* More registers

* More implementations

* Moved canbus registers into protocol submodule

* CAN finishing work

* Implemented debug utilities

* back/front board compile time defines

* More compile defines

* Fixed disable mosfets stuck

* More improvements

* More refactorings

* Cleanups

* Cleanups

* Updated merged protocol
This commit is contained in:
2021-05-23 17:54:44 +02:00
committed by GitHub
parent a88af55928
commit 0b661709da
6 changed files with 823 additions and 245 deletions

View File

@ -23,33 +23,57 @@
#include "stm32f1xx_hal.h"
#ifdef PETERS_PLATINE
#ifdef GSCHISSENES_HALL
#define LEFT_HALL_U_PIN GPIO_PIN_10
#define LEFT_HALL_V_PIN GPIO_PIN_11
#define LEFT_HALL_W_PIN GPIO_PIN_12
#else
#define LEFT_HALL_U_PIN GPIO_PIN_12
#define LEFT_HALL_V_PIN GPIO_PIN_11
#define LEFT_HALL_W_PIN GPIO_PIN_10
#endif
#define LEFT_HALL_U_PORT GPIOC
#define LEFT_HALL_V_PORT GPIOC
#define LEFT_HALL_W_PORT GPIOC
#ifdef GSCHISSENES_HALL
#define RIGHT_HALL_U_PIN GPIO_PIN_7
#define RIGHT_HALL_V_PIN GPIO_PIN_6
#define RIGHT_HALL_W_PIN GPIO_PIN_5
#else
#define RIGHT_HALL_U_PIN GPIO_PIN_5
#define RIGHT_HALL_V_PIN GPIO_PIN_6
#define RIGHT_HALL_W_PIN GPIO_PIN_7
#endif
#define RIGHT_HALL_U_PORT GPIOB
#define RIGHT_HALL_V_PORT GPIOB
#define RIGHT_HALL_W_PORT GPIOB
#else
#ifdef GSCHISSENES_HALL
#define LEFT_HALL_U_PIN GPIO_PIN_7
#define LEFT_HALL_V_PIN GPIO_PIN_6
#define LEFT_HALL_W_PIN GPIO_PIN_5
#else
#define LEFT_HALL_U_PIN GPIO_PIN_5
#define LEFT_HALL_V_PIN GPIO_PIN_6
#define LEFT_HALL_W_PIN GPIO_PIN_7
#endif
#define LEFT_HALL_U_PORT GPIOB
#define LEFT_HALL_V_PORT GPIOB
#define LEFT_HALL_W_PORT GPIOB
#ifdef GSCHISSENES_HALL
#define RIGHT_HALL_U_PIN GPIO_PIN_12
#define RIGHT_HALL_V_PIN GPIO_PIN_11
#define RIGHT_HALL_W_PIN GPIO_PIN_10
#else
#define RIGHT_HALL_U_PIN GPIO_PIN_10
#define RIGHT_HALL_V_PIN GPIO_PIN_11
#define RIGHT_HALL_W_PIN GPIO_PIN_12
#endif
#define RIGHT_HALL_U_PORT GPIOC
#define RIGHT_HALL_V_PORT GPIOC