Skip to content

Commit

Permalink
Merge pull request #1048 from newbrain/Issue1047
Browse files Browse the repository at this point in the history
Correct STM32F412xE flash size
  • Loading branch information
flit committed Jan 16, 2021
2 parents b0ab779 + 228c263 commit c9a770e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pyocd/target/builtin/target_STM32F412xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DBGMCU:
class STM32F412xE(CoreSightTarget):

VENDOR = "STMicroelectronics"

MEMORY_MAP = MemoryMap(
FlashRegion( start=0x08000000, length=0x10000, sector_size=0x4000,
page_size=0x1000,
Expand All @@ -73,7 +73,7 @@ class STM32F412xE(CoreSightTarget):
FlashRegion( start=0x08010000, length=0x10000, sector_size=0x10000,
page_size=0x1000,
algo=FLASH_ALGO),
FlashRegion( start=0x08020000, length=0x20000, sector_size=0x20000,
FlashRegion( start=0x08020000, length=0x60000, sector_size=0x20000,
page_size=0x1000,
algo=FLASH_ALGO),
RamRegion( start=0x20000000, length=0x40000)
Expand All @@ -91,7 +91,7 @@ def post_connect_hook(self):
class STM32F412xG(CoreSightTarget):

VENDOR = "STMicroelectronics"

MEMORY_MAP = MemoryMap(
FlashRegion( start=0x08000000, length=0x10000, sector_size=0x4000,
page_size=0x1000,
Expand All @@ -114,4 +114,3 @@ def post_connect_hook(self):
self.write32(DBGMCU.CR, DBGMCU.CR_VALUE)
self.write32(DBGMCU.APB1_FZ, DBGMCU.APB1_FZ_VALUE)
self.write32(DBGMCU.APB2_FZ, DBGMCU.APB2_FZ_VALUE)

0 comments on commit c9a770e

Please sign in to comment.