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 CAN driver support for Renesas RZ/G3S #83778

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

nhutnguyenkc
Copy link
Contributor

@nhutnguyenkc nhutnguyenkc commented Jan 10, 2025

Add CAN driver support for Renesas RZ/G3S.

Since RZ/G3S does not support to calculate perfectly the sample point of 87,5%, so the test update is required.

Need: zephyrproject-rtos/hal_renesas#65

Hieu Nguyen added 4 commits January 10, 2025 14:23
Update commit id for hal_renesas

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Add CAN driver support for Renesas RZ/G3S

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Add CAN nodes to Renesas RZ/G3S devicetree

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Add CAN support for board RZ/G3S-SMARC

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 10, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@64fce2e zephyrproject-rtos/hal_renesas#65 zephyrproject-rtos/hal_renesas#65/files

DNM label due to: 1 project with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_renesas DNM This PR should not be merged (Do Not Merge) labels Jan 10, 2025
@@ -527,7 +527,11 @@ ZTEST_USER(canfd, test_set_timing_data_while_started)
struct can_timing timing = { 0 };
int err;

#ifdef CONFIG_CAN_RENESAS_RZ_CANFD
Copy link
Member

Choose a reason for hiding this comment

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

No SoC/driver/board specific #ifdefs in generic API tests, please. You need to find another solution.

Copy link
Contributor Author

@nhutnguyenkc nhutnguyenkc Jan 14, 2025

Choose a reason for hiding this comment

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

Understood. I have reverted the change. Unfortunately, RZ/G3S cannot calculate the sample point of 87.5% accurately, so the test_set_timing_data_while_started fail. Is it acceptable if we change the err check at line 531 to range check as below (in fact, 25 is enough for us)

zassert_between_inclusive(err, 0, 50, "failed to calculate data timing (err %d)", err);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@henrikbrixandersen , could you please confirm my above solution. Thanks

Add test support for CAN driver of RZ/G3S-SMARC

Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
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.

3 participants