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 STM32N6 DMA, SPI and CAN support #84969

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

Conversation

gautierg-st
Copy link
Contributor

This PR adds the support on STM32N6 of the following peripherals:

  • DMA
  • SPI
  • CAN
    It also enables the MPU and add test overlays for the new peripherals.

This is based on top of #84869, so do not merge for now.

erwango and others added 16 commits January 29, 2025 15:41
Implement possibility to specify options for --start and --download
arguments.
These options are implemented as lists to better fit STM32CubeProgrammer
programming model.

This options are required to enable the programming of STM32N6 in USB-DFU
mode, which requires "-d my.bin 0x1 -s noack" arguments list.

Signed-off-by: Erwan Gouriou <[email protected]>
Flashing in BOOT-SERIAL mode with stm32cubeprogrammer doesn't support
using serial number.

Signed-off-by: Erwan Gouriou <[email protected]>
When flashing STM32N6 in USB-DFU mode, as required when running test
automation using twister, it is first required to power-off/power-on the
board to set board ready for USB-DFU (thanks to specific BootROM
configuration).
Provide a script that performs this operation using STM32CubeProgrammer.
This scipt could be provided in twister map.yaml file on 'pre_script'
property of board entry.

Signed-off-by: Erwan Gouriou <[email protected]>
This option should be used to load and run binary using "serial boot"
configuration for boot ROM.

Signed-off-by: Erwan Gouriou <[email protected]>
On STM32N6 based series, there is no flash available and tests
are performed using load and run in RAM.
From twister point of view, we should consider a flash is available
with the same size as RAM.
(We may tune these values later as the RAM will actually be shared
between code and variables).

Signed-off-by: Erwan Gouriou <[email protected]>
Introduce a variant to allow loading and running firmware using
BootROM serial boot configuration.

Signed-off-by: Erwan Gouriou <[email protected]>
Introduce a variant to allow loading and running firmware using
BootROM serial boot configuration.

Signed-off-by: Erwan Gouriou <[email protected]>
Update stm32n6 based boards documentation to reflect addition
of new sb variant and how it could be used for twister tests automation.

Signed-off-by: Erwan Gouriou <[email protected]>
Generate a proper Cmake warning when signing tool isn't available.
This also allows not to fail in Github CI.


Signed-off-by: Erwan Gouriou <[email protected]>
Until MPU support is enabled, disable DCACHE support for
this series of test.

Signed-off-by: Erwan Gouriou <[email protected]>
Twister should only be passed on the serial boot target, so remove the
supported peripherals from the standard yaml file.

Signed-off-by: Guillaume Gautier <[email protected]>
Enable MPU and HW Stack Protection for Nucleo N657x0-Q and STM32N6570 DK
boards.

Signed-off-by: Guillaume Gautier <[email protected]>
Configure the DMA so it works in secure execution mode

Signed-off-by: Guillaume Gautier <[email protected]>
Add GPDMA support to STM32N6

Signed-off-by: Guillaume Gautier <[email protected]>
Update documentation to indicate that DMA is available on Nucleo N657x0-Q
and STM32N6570 DK boards.

Signed-off-by: Guillaume Gautier <[email protected]>
Add DMA loop transfer test overlays for Nucleo N657x0-Q and STM32N6570 DK
boards.

Signed-off-by: Guillaume Gautier <[email protected]>
@gautierg-st gautierg-st added the DNM This PR should not be merged (Do Not Merge) label Jan 31, 2025
@zephyrbot zephyrbot added area: SPI SPI bus area: DMA Direct Memory Access area: UART Universal Asynchronous Receiver-Transmitter area: Twister Twister area: CAN area: West West utility platform: STM32 ST Micro STM32 labels Jan 31, 2025
Copy link
Member

@henrikbrixandersen henrikbrixandersen left a comment

Choose a reason for hiding this comment

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

This PR adds the support on STM32N6 of the following peripherals:

  • DMA
  • SPI
  • CAN
    It also enables the MPU and add test overlays for the new peripherals.

This is based on top of #84869, so do not merge for now.

In the interest of having smaller, easy reviewable PRs, please split this into separate PRs. There's no reason for submitting 24 commits in vastly different areas in one PR like this.

Enable a second UART for Nucleo N657x0-Q and STM32N6570 DK boards.

Signed-off-by: Guillaume Gautier <[email protected]>
Add UART test overlays for Nucleo N657x0-Q and STM32N6570 DK boards.
Remove non serial boot conf file since they are now unnecessary.

Signed-off-by: Guillaume Gautier <[email protected]>
Add SPI support to STM32N6

Signed-off-by: Guillaume Gautier <[email protected]>
Enable SPI for Nucleo N657x0-Q and STM32N6570 DK boards.

Signed-off-by: Guillaume Gautier <[email protected]>
Add SPI loopback test overlays for Nucleo N657x0-Q and STM32N6570 DK
boards.

Signed-off-by: Guillaume Gautier <[email protected]>
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]>
@gautierg-st gautierg-st force-pushed the add_stm32n6_basic_peripherals branch from 09851bf to 44014c1 Compare January 31, 2025 12:43
@gautierg-st
Copy link
Contributor Author

In the interest of having smaller, easy reviewable PRs, please split this into separate PRs. There's no reason for submitting 24 commits in vastly different areas in one PR like this.

Technically 10 of them belong to another PR so that makes "only" 14 :)
But ok, I'll split this PR once the other is merged

@alexanderwachter
Copy link
Member

In the interest of having smaller, easy reviewable PRs, please split this into separate PRs. There's no reason for submitting 24 commits in vastly different areas in one PR like this.

Technically 10 of them belong to another PR so that makes "only" 14 :)

But ok, I'll split this PR once the other is merged

It is not only the number of changes, but also the responsibility. We have different maintainers for each of the drivers. It is easier to see if the maintainer approved if only one subsys is touched in a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: CAN area: DMA Direct Memory Access area: SPI SPI bus area: Twister Twister area: UART Universal Asynchronous Receiver-Transmitter area: West West utility DNM This PR should not be merged (Do Not Merge) platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants