Mercurial > lcfOS
diff python/stm32.py @ 138:14e739ed03ab
Added halt stub
author | Windel Bouwman |
---|---|
date | Sat, 26 Jan 2013 10:04:32 +0100 |
parents | 04e45faafd1d |
children | f254b87258e6 |
line wrap: on
line diff
--- a/python/stm32.py Fri Jan 25 23:47:34 2013 +0100 +++ b/python/stm32.py Sat Jan 26 10:04:32 2013 +0100 @@ -1,5 +1,6 @@ import time from devices import Device, registerDevice, STLinkException, Interface +import stlink # F4 specifics: STM32_FLASH_BASE = 0x08000000 @@ -63,6 +64,9 @@ f_id = self.iface.read_debug32(0x1FFF7A22) f_id = f_id >> 16 return f_id * 1024 + @property + def Running(self): + return self.iface.Status == stlink.CORE_RUNNING # flashing commands: def writeFlash(self, address, content): flashsize = self.FlashSize