Skip to content

Commit

Permalink
Merge pull request #46 from g-oikonomou/bugfix/cc2538-ram-size
Browse files Browse the repository at this point in the history
Fix CC2538 RAM size calculation
  • Loading branch information
JelmerT committed Nov 9, 2015
2 parents f1f070d + 6954b14 commit 6185d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cc2538-bsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def __init__(self, command_interface):
self.size = (model[3] & 0x70) * 0x2000 # in bytes
self.bootloader_address = self.flash_start_addr + self.size - ccfg_len

sram = 16 + (((model[2] << 8) | model[3]) & 0x380) >> 5 # in KB
sram = 16 + ((((model[2] << 8) | model[3]) & 0x380) >> 5) # in KB

pg = self.command_interface.cmdMemRead(FLASH_CTRL_DIECFG2)
pg_major = (pg[2] & 0xF0) >> 4
Expand Down

0 comments on commit 6185d8b

Please sign in to comment.