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

add support for STM32F412 #538

Merged
merged 1 commit into from
Jan 2, 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
1 change: 1 addition & 0 deletions include/stlink/chipid.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ enum stlink_stm32_chipids {
STLINK_CHIPID_STM32_F334 = 0x438,
STLINK_CHIPID_STM32_F3_SMALL = 0x439,
STLINK_CHIPID_STM32_F0 = 0x440,
STLINK_CHIPID_STM32_F412 = 0x441,
STLINK_CHIPID_STM32_F09X = 0x442,
STLINK_CHIPID_STM32_F0_SMALL = 0x444,
STLINK_CHIPID_STM32_F04 = 0x445,
Expand Down
14 changes: 13 additions & 1 deletion src/chipid.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,19 @@ static const struct stlink_chipid_params devices[] = {
.bootrom_base = 0x1fffec00, // "System memory" starting address from Table 2
.bootrom_size = 0xC00 // "System memory" byte size in hex from Table 2
},
{
{
// RM0402 document was used to find these parameters
// Table 4.
.chip_id = STLINK_CHIPID_STM32_F412,
.description = "F4 device",
.flash_type = STLINK_FLASH_TYPE_F4,
.flash_size_reg = 0x1FFF7A22, // "Flash size data register" (pg1135)
.flash_pagesize = 0x4000, // Table 5. Flash module organization ?
.sram_size = 0x40000, // "SRAM" byte size in hex from Table 4
.bootrom_base = 0x1FFF0000, // "System memory" starting address from Table 4
.bootrom_size = 0x7800 // "System memory" byte size in hex from Table 4
},
{
.chip_id = STLINK_CHIPID_STM32_F09X,
.description = "F09X device",
.flash_type = STLINK_FLASH_TYPE_F0,
Expand Down
1 change: 1 addition & 0 deletions src/flash_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ int stlink_flash_loader_write_to_sram(stlink_t *sl, stm32_addr_t* addr, size_t*
sl->chip_id == STLINK_CHIPID_STM32_F4_DSI ||
sl->chip_id == STLINK_CHIPID_STM32_F410 ||
sl->chip_id == STLINK_CHIPID_STM32_F411RE ||
sl->chip_id == STLINK_CHIPID_STM32_F412 ||
sl->chip_id == STLINK_CHIPID_STM32_F446
) {
if( sl->version.stlink_v == 1 ) {
Expand Down