-
Notifications
You must be signed in to change notification settings - Fork 3k
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
RZ_A1H: Correct CAN Message ID and recetption rate in extended mode #5050
Conversation
Also a normal Data message is read as Remote when using Extended mode. |
@@ -703,14 +703,14 @@ int can_read(can_t *obj, CAN_Message *msg, int handle) { | |||
/* send/receive FIFO buffer isn't empty */ | |||
dmy_cfsts = CFSTS_TBL[obj->ch][CAN_RECV]; | |||
while ((*dmy_cfsts & 0x01) != 0x01) { | |||
/* get format, frame type and send/receive FIFO buffer ID(b10-0 or b28-11) */ | |||
/* get format, frame type and send/receive FIFO buffer ID(b10-0 or b28-0) */ | |||
dmy_cfid = CFID_TBL[obj->ch][CAN_RECV]; | |||
msg->format = (CANFormat)(*dmy_cfid >> 31); | |||
msg->type = (CANType)(*dmy_cfid >> 30); | |||
if (msg->format == CANStandard) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this causes the problem:
msg->format = (CANFormat)(*dmy_cfid >> 31);
msg->type = (CANType)(*dmy_cfid >> 30);
which should be:
msg->format = (CANFormat)(*dmy_cfid >> 31);
msg->type = (CANType)((*dmy_cfid >> 30) & 0x1);
Should I fix it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your advice. It seems that is right.
I think that there is no problem for your change. cc @0xc0170 |
I appreciate if you reflect your all changes that you mentioned in this thread to can_api.c for RZ_A1H too ? |
You are done. |
@mbedNoobNinja Can you please rebase instead of merge (remove the second merge commit) ? |
3f79459
to
610c8c8
Compare
How about now? |
LGTM |
/morph test |
1 similar comment
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
Notes:
Description
Steps to test or reproduce
Just use the CAN in extended mode and try to receive a message from node which is clocked exactly at 500 kbps.