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

Fix issue #13023, CAN constructor ignores passed speed. #13114

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

FabianInostroza
Copy link

Summary of changes

Fixes #13023.

Uses the passed speed to the constructor.

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom requested a review from a team June 14, 2020 07:00
@ciarmcom
Copy link
Member

@FabianInostroza, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why it is not the same patch as #12113 ?

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 15, 2020

It took me a while to realize this is for 5.15 and

Why it is not the same patch as #12113 ?

is for master. thus the code difference. @FabianInostroza would it be better to backport 12113 to 5.15 rather? I would say yes as proposed.

@jeromecoutant
Copy link
Collaborator

@FabianInostroza would it be better to backport 12113 to 5.15 rather? I would say yes as proposed.

Hi @FabianInostroza
Did you succeed ?

@FabianInostroza
Copy link
Author

Hi, Sorry for the delay. I've made the changes.

But I think that the peripheral should not be configured to a default speed and active (Normal) mode by just instantiating it. If the correct speed is set latter in the application this could cause issues because the device would send error frames.
Also I managed to crash mbed by powering the board while connected to a bad can bus network. There was just one active node that spammed the network with one message and that didn't provide the necessary 11 consecutive recessive bits to initialize the peripheral and can_frequency() in can_api.c just error() on that condition. It would be better if it returned an error code to inform the application.

@FabianInostroza would it be better to backport 12113 to 5.15 rather? I would say yes as proposed.

Hi @FabianInostroza
Did you succeed ?

@adbridge
Copy link
Contributor

CI started

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 22, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jul 22, 2020

Test run: SUCCESS

Summary: 10 of 10 test jobs passed
Build number : 1
Build artifacts

@adbridge adbridge merged commit 7f57671 into ARMmbed:mbed-os-5.15 Jul 27, 2020
@adbridge
Copy link
Contributor

Approved by @andypowers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants