-
Notifications
You must be signed in to change notification settings - Fork 7k
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
STM32N6: add CAN support #85554
STM32N6: add CAN support #85554
Conversation
Test result of
|
Test result of
|
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.
Looks good, just one minor suggestion:
@@ -0,0 +1 @@ | |||
CONFIG_TEST_USERSPACE=n |
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.
Does this SoC not support userspace? Or is it just a matter of available MPU regions (if so, take a look at CONFIG_TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION
)?
Either way, I think this would be better to set this from the board files instead of directly in each test for scalability. The CAN tests can't be the only ones affected by this limitation?
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.
The problem lies with the MPU. On N6, the bootROM loads the application from external Flash into the RAM where it is executed. I suppose that, for userspace to work, the region in the RAM where the code lies should be configured as the Flash usually is, but I haven't looked at that for the moment.
I'll move CONFIG_TEST_USERSPACE=n in the board files.
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.
Umm, in fact, I won't move the Kconfig to the board file. It gets overwritten by the prj.conf so the test fails...
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.
Oh. Right. 😞
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 don't have a board, but had a quick pass on the pr.
Looks good, but I think you need to divide the 10K message RAM between the 3 instances.
If so, this should only affect the |
Yeah it is looking somewhat wrong, but aren't stm32h7 using exactly that pattern? Edit: repace downstream link with upstream link. |
6ea543d
to
44eba77
Compare
Device tree modified as per your suggestions. |
You are right; I was confused for a second there. The reason we modify the |
@@ -362,6 +362,39 @@ | |||
}; | |||
}; | |||
|
|||
fdcan1: can@5000a000 { | |||
compatible = "st,stm32h7-fdcan"; |
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.
Perhaps it's time to come up with a new compatible
for this integration of the Bosch M_CAN? If any of you have any insight in what to name this, I am all ears. The "h7" name was chosen since it was the first family (Zephyr-wise) where this integration was supported.
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.
@henrikbrixandersen In Bosch M_CAN user manual on page 5: https://www.bosch-semiconductors.com/media/ip_modules/pdf_2/m_can/mcan_users_manual_v331.pdf register map is defined. Since a device follows this map "bosch,m-can" would be a good choise as you suggest.
@gautierg-st needs a rebase - thx! |
Add FDCAN support to STM32N6 Signed-off-by: Guillaume Gautier <[email protected]>
Enable FDCAN for Nucleo N657x0-Q and STM32N6570 DK boards. Signed-off-by: Guillaume Gautier <[email protected]>
Add CAN test overlays for Nucleo N657x0-Q and STM32N6570 DK boards. Userspace needs to be disabled for the tests to pass. Signed-off-by: Guillaume Gautier <[email protected]>
597ec05
44eba77
to
597ec05
Compare
Rebased to fix conflicts |
Add CAN support for STM32N6. Enable CAN on STM32N6570-DK and Nucleo N657X0, and add CAN test overlays for these two boards.