New targetPowerCycleDelay target config param, for configuring the AVR8 target power cycle delay (after updating the DWEN fuse bit)

This commit is contained in:
Nav
2022-03-21 13:04:12 +00:00
parent a3b9bb8ca2
commit 7b79f19574
3 changed files with 18 additions and 2 deletions

View File

@@ -143,8 +143,12 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
Logger::debug("Disabling target power");
this->targetPowerManagementInterface->disableTargetPower();
Logger::debug("Holding power off for ~250 ms");
std::this_thread::sleep_for(std::chrono::milliseconds(250));
Logger::debug(
"Holding power off for ~"
+ std::to_string(this->targetConfig->targetPowerCycleDelay.count())
+ " ms"
);
std::this_thread::sleep_for(this->targetConfig->targetPowerCycleDelay);
Logger::debug("Enabling target power");
this->targetPowerManagementInterface->enableTargetPower();