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

Add support for CAN to SiLabs targets #10468

Merged
merged 3 commits into from May 7, 2019

Conversation

Projects
None yet
6 participants
@petroborys
Copy link
Contributor

commented Apr 24, 2019

Description

Added support for CAN to SiLabs targets

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Release Notes

Tested on the EFM32GG11_STK3701

@ciarmcom ciarmcom requested a review from ARMmbed/mbed-os-maintainers Apr 25, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 25, 2019

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

@stevew817
Copy link
Contributor

left a comment

A minor change request for getting peripheral usage in line & forwards compatible with products that potentially only have one CAN interface. Otherwise, looking good!

I'll open a PR for updating emlib to latest, since the rest of emlib now looks pretty out-of-date.

@@ -136,6 +136,13 @@ typedef enum {
} UARTName;
#endif

#if DEVICE_CAN
typedef enum {
CAN_0 = (int)CAN0_BASE,

This comment has been minimized.

Copy link
@stevew817

stevew817 Apr 25, 2019

Contributor

Please guard each enum entry with the respective base address define, in line with the other definitions in this file

}
}

void CAN0_IRQHandler(void)

This comment has been minimized.

Copy link
@stevew817

stevew817 Apr 25, 2019

Contributor

Please wrap in respective peripheral base definition, as this shouldn't be there if there is no (for example) CAN1.

}

switch ((CANName)obj->instance) {
case CAN_0:

This comment has been minimized.

Copy link
@stevew817

stevew817 Apr 25, 2019

Contributor

Usage of enum values should be wrapped and compiled in/out based on whether the base peripheral is present or not.

CAN_MessageIntClear(obj->instance, 0xFFFFFFFF);

switch ((CANName)obj->instance) {
case CAN_0:

This comment has been minimized.

Copy link
@stevew817

stevew817 Apr 25, 2019

Contributor

Same here, please wrap in presence of the base peripheral

int index = 0;

switch ((CANName)obj->instance) {
case CAN_0:

This comment has been minimized.

Copy link
@stevew817

stevew817 Apr 25, 2019

Contributor

Same here, please wrap in presence of base peripheral


CMU_Clock_TypeDef cmuClock_number;
switch ((CANName)obj->instance) {
case CAN_0:

This comment has been minimized.

Copy link
@stevew817

stevew817 Apr 25, 2019

Contributor

Should be wrapped based on presence of base peripheral

@petroborys

This comment has been minimized.

Copy link
Contributor Author

commented Apr 26, 2019

Thank for your review. I have made all the changes.
In EmLib 5.3.3. do not read message ID (in CAN_ReadMessage).

@0xc0170 0xc0170 added needs: CI and removed needs: review labels Apr 29, 2019

@adbridge

This comment has been minimized.

Copy link
Contributor

commented Apr 29, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 29, 2019

Test run: FAILED

Summary: 2 of 7 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_mbed2-build-IAR

@0xc0170 0xc0170 added needs: work and removed needs: CI labels Apr 30, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

Please review build failures (build artifacts above)

@petroborys

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2019

Please review build failures (build artifacts above)

Thank. Done.

@0xc0170 0xc0170 added needs: CI and removed needs: work labels Apr 30, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

CI started

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 30, 2019

I've noticed the commit messages (1-10) - what do the numbers mean? It would make sense to provide more meaningful commit messages instead.

Either to squash them or rewrite.

@petroborys

This comment has been minimized.

Copy link
Contributor Author

commented Apr 30, 2019

I've noticed the commit messages (1-10) - what do the numbers mean?

Just numeration.

It would make sense to provide more meaningful commit messages instead.

Ok, sure

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 30, 2019

Test run: FAILED

Summary: 1 of 11 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_exporter

@petroborys petroborys force-pushed the petroborys:master branch from bc133a9 to b635c02 May 1, 2019

@petroborys

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

Either to squash them or rewrite.

Done.

@petroborys

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2019

I didn't see any error in the logs.

@0xc0170

This comment has been minimized.

Copy link
Member

commented May 2, 2019

Will restart tests later today

@0xc0170 0xc0170 changed the title Added support for CAN to SiLabs targets Add support for CAN to SiLabs targets May 3, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented May 3, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented May 3, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@adbridge adbridge merged commit bab78c6 into ARMmbed:master May 7, 2019

26 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage Success
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8481 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8448B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.