Skip to content

Fix STM32 CAN reset to not lose context #4932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F0/common_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ struct dac_s {
};
#endif

#if DEVICE_CAN
struct can_s {
CAN_HandleTypeDef CanHandle;
int index;
int hz;
};
#endif

#ifdef __cplusplus
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F1/common_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ struct analogin_s {
uint8_t channel;
};

#if DEVICE_CAN
struct can_s {
CAN_HandleTypeDef CanHandle;
int index;
int hz;
};
#endif

#include "gpio_object.h"

#ifdef __cplusplus
Expand Down
5 changes: 4 additions & 1 deletion targets/TARGET_STM/TARGET_STM32F2/objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@ struct pwmout_s {
uint8_t inverted;
};

#ifdef DEVICE_CAN
struct can_s {
CANName can;
CAN_HandleTypeDef CanHandle;
int index;
int hz;
};
#endif

#define GPIO_IP_WITHOUT_BRR
#include "gpio_object.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

#if defined (DEVICE_CAN)
struct can_s {
CANName can;
int index;
};
#endif

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F3/common_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ struct analogin_s {
uint8_t channel;
};

#if DEVICE_CAN
struct can_s {
CAN_HandleTypeDef CanHandle;
int index;
int hz;
};
#endif

#include "gpio_object.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ struct trng_s {
};

#include "common_objects.h"
struct can_s {
CANName can;
int index;
};

#include "gpio_object.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

#include "common_objects.h"

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F4/common_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ struct dac_s {
};
#endif

#if DEVICE_CAN
struct can_s {
CAN_HandleTypeDef CanHandle;
int index;
int hz;
};
#endif

#ifdef __cplusplus
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
8 changes: 8 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F7/common_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ struct flash_s {
uint32_t dummy;
};

#if DEVICE_CAN
struct can_s {
CAN_HandleTypeDef CanHandle;
int index;
int hz;
};
#endif

#ifdef __cplusplus
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ struct port_s {
__IO uint32_t *reg_out;
};

struct can_s {
CANName can;
int index;
};

struct trng_s {
RNG_HandleTypeDef handle;
};
Expand Down
Loading