Skip to content
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

SN32 Init cleanup #411

Merged
merged 2 commits into from
Oct 22, 2024
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
4 changes: 0 additions & 4 deletions os/hal/boards/SN_SN32F240/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
#endif

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

/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
sn32_clock_init();
}

Expand All @@ -62,8 +60,6 @@ void __early_init(void) {
*/
void boardInit(void) {

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

void restart_usb_driver(USBDriver *usbp) {
Expand Down
4 changes: 0 additions & 4 deletions os/hal/boards/SN_SN32F240B/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
#endif

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

/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
sn32_clock_init();
}

Expand All @@ -62,6 +60,4 @@ void __early_init(void) {
*/
void boardInit(void) {

SN_SYS0->EXRSTCTRL_b.RESETDIS = 1; // Disable RESET
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
}
2 changes: 1 addition & 1 deletion os/hal/boards/SN_SN32F260/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ void __early_init(void) {
* @brief Board-specific initialization code.
*/
void boardInit(void) {
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD

}
4 changes: 0 additions & 4 deletions os/hal/boards/SN_SN32F280/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
#endif

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

/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
sn32_clock_init();
}

Expand All @@ -62,6 +60,4 @@ void __early_init(void) {
*/
void boardInit(void) {

SN_SYS0->EXRSTCTRL_b.RESETDIS = 1; // Disable RESET
SN_SYS0->SWDCTRL_b.SWDDIS = 1; // Disable SWD
}
4 changes: 0 additions & 4 deletions os/hal/boards/SN_SN32F290/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,13 @@ const PALConfig pal_default_config = {
#endif

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

/**
* @brief Early initialization code.
* @details This initialization must be performed just after stack setup
* and before any other initialization.
*/
void __early_init(void) {
enter_bootloader_mode_if_requested();
sn32_clock_init();
}

Expand All @@ -62,6 +60,4 @@ void __early_init(void) {
*/
void boardInit(void) {

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