Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug not sending all pending messages #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions CANopenNode_STM32/CO_driver_STM32.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,12 +634,10 @@ HAL_FDCAN_TxBufferCompleteCallback(FDCAN_HandleTypeDef* hfdcan, uint32_t BufferI
CANModule_local->CANtxCount--;
CANModule_local->bufferInhibitFlag = buffer->syncFlag;
}
else
break; // if we could not send the message, break out of the loop (the tx buffers are full)
}
}
/* Clear counter if no more messages */
if (i == 0U) {
CANModule_local->CANtxCount = 0U;
}
CO_UNLOCK_CAN_SEND(CANModule_local);
}
}
Expand Down Expand Up @@ -696,12 +694,10 @@ CO_CANinterrupt_TX(CO_CANmodule_t* CANmodule, uint32_t MailboxNumber) {
CANmodule->CANtxCount--;
CANmodule->bufferInhibitFlag = buffer->syncFlag;
}
else
break; // if we could not send the message, break out of the loop (the tx buffers are full)
}
}
/* Clear counter if no more messages */
if (i == 0U) {
CANmodule->CANtxCount = 0U;
}
CO_UNLOCK_CAN_SEND(CANmodule);
}
}
Expand Down