HCC serial number is not set in `StarCfg::loadConfig` and it causes sub-nominal configuration of the staves
It looks like we never set StarChips::m_sn
(inherited from StarCfg::m_sn
) in the devel branch. And according to today's tests it is the reason why the devel branch + globalStar MR cannot configure the staves to reach the nominal level of current draw. But the current draw does reach the nominal level, once I patch the devel+globalStar branch with the m_sn
lines from the SR1 branch:
void StarCfg::loadConfig(const json &j) {
...
auto &hcc = j["HCC"];
std::string str_sn="";
if (hcc.contains("serialnumber")) {
str_sn = hcc["serialnumber"];
m_sn = std::stol(str_sn, nullptr, 16);
logger->info("Reading configuration for chip with serial number=0x{:08x}", m_sn);
}
m_hcc.setDefaults(m_hcc_version);
...
}
Not sure how it makes a difference. But it looks like this is the only thing missing in the devel+globalStar branch to make it reach the nominal current draw.
Let's open a merge request?
An image of the current draw issue without this patch applied in the devel+globalStar branch (the very last current drop after the devel+globalStar is due to a flx-init
and loss of alignment on the staves):