aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py')
-rw-r--r--mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py b/mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py
index c1e756124..7ad61c655 100644
--- a/mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py
+++ b/mpm/python/usrp_mpm/chips/max10_cpld_flash_ctrl.py
@@ -203,6 +203,14 @@ class Max10CpldFlashCtrl():
if not self.check_reconfig_engine_status():
return False
+ self.log.debug('Checking if update is necessary...')
+ if self.verify_flash_memory(raw_data):
+ self.log.info('CPLD already programmed with specified image, not reprogramming.')
+ return True
+
+ if not self.check_reconfig_engine_status():
+ return False
+
self.log.debug('Erasing CPLD flash memory...')
if not (self.erase_flash_memory()
and self.check_reconfig_engine_status()):