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

feat(CMSIS): CFSIO-4121 Call PeripheralInit #1360

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

Conversation

emmet-horgan
Copy link

Description

The motivation behind this PR is tool allow configuration tools to generate a PeripheralInit function which will automatically be called before main so that the user does not have to call it directly in their application.

This PR adds a weakly defined function PeripheralInit for each SoC which is called in SystemInit after Board_Init to initialize the peripherals

The call to PeripheralInit is intentionally after Board_Init so that the user defined peripheral initialization is not overwritten. I would also question whether or not PinInit should be called after Board_Init also ?

Checklist Before Requesting Review

  • PR Title follows correct guidelines.
  • Description of changes and all other relevant information.

This commit adds a weakly defined function `PeripheralInit` for each SoC
which is called in `SystemInit` after `Board_Init` to initialize the
peripherals. This function is particular useful for tools which can
generate the `PeripheralInit` function based on a user's configuration
in a tool. The call to `PeripheralInit` is intentionally after
`Board_Init` so that the user defined peripheral initialization is not
overwritten.
@github-actions github-actions bot added MAX32520 Related to the MAX32520 (ES17) MAX32570 Related to the MAX32570 (ME13) MAX32650 Related to the MAX32650 (ME10) MAX32655 Related to the MAX32655 (ME17) MAX32660 Related to the MAX32660 (ME11) MAX32665 Related to the MAX32665 (ME14) MAX32670 Related to the MAX32670 (ME15) MAX32672 Related to the MAX32672 (ME21) MAX32675 Related to the MAX32675 (ME16) MAX32680 Related to the MAX32680 (ME20) MAX32690 Related to the MAX32690 (ME18) MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87) MAX32662 Related to the MAX32662 (ME12) MAX32572 Related to the MAX32572 (ME55) MAX32657 Related to the MAX32655 (ME30) labels Mar 5, 2025
@perkinsmg
Copy link
Contributor

We're going to need the same thing in the RISC-V variants of SystemInit - e.g. ./Libraries/CMSIS/Device/Maxim/MAX32690/Source/system_riscv_max32690.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32520 Related to the MAX32520 (ES17) MAX32570 Related to the MAX32570 (ME13) MAX32572 Related to the MAX32572 (ME55) MAX32650 Related to the MAX32650 (ME10) MAX32655 Related to the MAX32655 (ME17) MAX32657 Related to the MAX32655 (ME30) MAX32660 Related to the MAX32660 (ME11) MAX32662 Related to the MAX32662 (ME12) MAX32665 Related to the MAX32665 (ME14) MAX32670 Related to the MAX32670 (ME15) MAX32672 Related to the MAX32672 (ME21) MAX32675 Related to the MAX32675 (ME16) MAX32680 Related to the MAX32680 (ME20) MAX32690 Related to the MAX32690 (ME18) MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants