Skip to content

Commit 6daa08b

Browse files
authored
Merge pull request #411 from dexter93/sn32_init_cleanup
SN32 Init cleanup
2 parents ce62332 + 0f6612e commit 6daa08b

File tree

5 files changed

+1
-17
lines changed

5 files changed

+1
-17
lines changed

os/hal/boards/SN_SN32F240/board.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
4444
#endif
4545

4646
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
47-
extern void enter_bootloader_mode_if_requested(void);
4847

4948
/**
5049
* @brief Early initialization code.
5150
* @details This initialization must be performed just after stack setup
5251
* and before any other initialization.
5352
*/
5453
void __early_init(void) {
55-
enter_bootloader_mode_if_requested();
5654
sn32_clock_init();
5755
}
5856

@@ -62,8 +60,6 @@ void __early_init(void) {
6260
*/
6361
void boardInit(void) {
6462

65-
SN_SYS0->EXRSTCTRL_b.RESETDIS = 1; // Disable RESET
66-
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
6763
}
6864

6965
void restart_usb_driver(USBDriver *usbp) {

os/hal/boards/SN_SN32F240B/board.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
4444
#endif
4545

4646
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
47-
extern void enter_bootloader_mode_if_requested(void);
4847

4948
/**
5049
* @brief Early initialization code.
5150
* @details This initialization must be performed just after stack setup
5251
* and before any other initialization.
5352
*/
5453
void __early_init(void) {
55-
enter_bootloader_mode_if_requested();
5654
sn32_clock_init();
5755
}
5856

@@ -62,6 +60,4 @@ void __early_init(void) {
6260
*/
6361
void boardInit(void) {
6462

65-
SN_SYS0->EXRSTCTRL_b.RESETDIS = 1; // Disable RESET
66-
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
6763
}

os/hal/boards/SN_SN32F260/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ void __early_init(void) {
5656
* @brief Board-specific initialization code.
5757
*/
5858
void boardInit(void) {
59-
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
59+
6060
}

os/hal/boards/SN_SN32F280/board.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
4444
#endif
4545

4646
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
47-
extern void enter_bootloader_mode_if_requested(void);
4847

4948
/**
5049
* @brief Early initialization code.
5150
* @details This initialization must be performed just after stack setup
5251
* and before any other initialization.
5352
*/
5453
void __early_init(void) {
55-
enter_bootloader_mode_if_requested();
5654
sn32_clock_init();
5755
}
5856

@@ -62,6 +60,4 @@ void __early_init(void) {
6260
*/
6361
void boardInit(void) {
6462

65-
SN_SYS0->EXRSTCTRL_b.RESETDIS = 1; // Disable RESET
66-
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
6763
}

os/hal/boards/SN_SN32F290/board.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
4444
#endif
4545

4646
static int flag __attribute__((section(".flag"))) __attribute__((__used__)) = 0xAAAA5555;
47-
extern void enter_bootloader_mode_if_requested(void);
4847

4948
/**
5049
* @brief Early initialization code.
5150
* @details This initialization must be performed just after stack setup
5251
* and before any other initialization.
5352
*/
5453
void __early_init(void) {
55-
enter_bootloader_mode_if_requested();
5654
sn32_clock_init();
5755
}
5856

@@ -62,6 +60,4 @@ void __early_init(void) {
6260
*/
6361
void boardInit(void) {
6462

65-
SN_SYS0->EXRSTCTRL_b.RESETDIS = 1; // Disable RESET
66-
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
6763
}

0 commit comments

Comments
 (0)