Skip to content

Commit

Permalink
[update] update board config
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisue committed Dec 8, 2023
1 parent 7e00b44 commit 68c31cb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions bsp/board/bl616dk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,4 +606,26 @@ static void reboot_cmd(int argc, char **argv)
}
SHELL_CMD_EXPORT_ALIAS(reboot_cmd, reboot, reboot);

#define MFG_CONFIG_REG (0x2000F100)
#define MFG_CONFIG_VAL ("0mfg")

void mfg_config(void)
{
union _reg_t {
uint8_t byte[4];
uint32_t word;
} mfg = {
.byte = MFG_CONFIG_VAL,
};

*(volatile uint32_t*)(MFG_CONFIG_REG) = mfg.word;
}

static void mfg_cmd(int argc, char **argv)
{
mfg_config();
GLB_SW_POR_Reset();
}
SHELL_CMD_EXPORT_ALIAS(mfg_cmd, mfg, mfg);

#endif
4 changes: 2 additions & 2 deletions bsp/board/bl702ldk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ static void console_init()
cfg.stop_bits = UART_STOP_BITS_1;
cfg.parity = UART_PARITY_NONE;
cfg.flow_ctrl = 0;
cfg.tx_fifo_threshold = 15;
cfg.rx_fifo_threshold = 15;
cfg.tx_fifo_threshold = 7;
cfg.rx_fifo_threshold = 0;

uart0 = bflb_device_get_by_name("uart0");

Expand Down

0 comments on commit 68c31cb

Please sign in to comment.