ns delay between gpio polls solves it
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-03-28 21:45:04 +02:00
parent c474d6ed1d
commit d09b53f6df
4 changed files with 21 additions and 30 deletions

View File

@ -34,14 +34,18 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
return DirectTmSinkIF::IS_BUSY;
}
for (size_t idx = 0; idx < size; idx++) {
if (pollPapbBusySignal(3) == returnvalue::OK) {
// This delay is super-important, DO NOT REMOVE!
// Polling the GPIO
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
if (pollPapbBusySignal(2) == returnvalue::OK) {
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
} else {
abortPacketTransfer();
return returnvalue::FAILED;
}
}
if (pollPapbBusySignal(3) == returnvalue::OK) {
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
if (pollPapbBusySignal(2) == returnvalue::OK) {
completePacketTransfer();
} else {
abortPacketTransfer();