Repository navigation
[components][ospi] Add OctaFlash Support #11912
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
Open
CliffLL
wants to merge
6
commits into
RT-Thread:master
Choose a base branch
from
CliffLL:octaflash-driver
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,550
−1,302
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2254410
[drivers][ospi] Add OctaFlash support
CliffLL 7f9ae87
[bsp][stm32] Add generic OSPI low-level driver
CliffLL 8eb72ec
[bsp][stm32l4r9-eval] Add OctaFlash support and fix linker/heap config
CliffLL a7bfebb
[drivers][ospi] Fix review comments for OctaFlash support
CliffLL aa37cb0
[drivers][ospi] Add OPI erase command support and fix WRSR
CliffLL 687609f
[drivers][spi] Format SFUD source files with clang-format
CliffLL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
bsp/stm32/libraries/HAL_Drivers/drivers/config/l4/ospi_config.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /* | ||
| * Copyright (c) 2006-2026, RT-Thread Development Team | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Change Logs: | ||
| * Date Author Notes | ||
| * 2026-08-17 CliffLL first version | ||
| */ | ||
|
|
||
| #ifndef __OSPI_CONFIG_H__ | ||
| #define __OSPI_CONFIG_H__ | ||
|
|
||
| #include <rtthread.h> | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| #ifdef BSP_USING_OSPI | ||
| #ifndef OSPI_INSTANCE | ||
| #define OSPI_INSTANCE OCTOSPI1 | ||
| #endif | ||
|
|
||
| #ifndef OSPI_MEMORY_TYPE | ||
| #define OSPI_MEMORY_TYPE HAL_OSPI_MEMTYPE_MACRONIX | ||
| #endif | ||
|
|
||
| #ifndef OSPI_CLK_PORT | ||
| #define OSPI_CLK_PORT 1U | ||
| #endif | ||
|
|
||
| #ifndef OSPI_DQS_PORT | ||
| #define OSPI_DQS_PORT 1U | ||
| #endif | ||
|
|
||
| #ifndef OSPI_NCS_PORT | ||
| #define OSPI_NCS_PORT 1U | ||
| #endif | ||
|
|
||
| #ifndef OSPI_IO_LOW_PORT | ||
| #define OSPI_IO_LOW_PORT HAL_OSPIM_IOPORT_1_LOW | ||
| #endif | ||
|
|
||
| #ifndef OSPI_IO_HIGH_PORT | ||
| #define OSPI_IO_HIGH_PORT HAL_OSPIM_IOPORT_1_HIGH | ||
| #endif | ||
|
|
||
| #ifndef OSPI_BUS_CONFIG | ||
| #define OSPI_BUS_CONFIG \ | ||
| { \ | ||
| .Instance = OSPI_INSTANCE, \ | ||
| .Init.FifoThreshold = 4, \ | ||
| .Init.SampleShifting = HAL_OSPI_SAMPLE_SHIFTING_NONE, \ | ||
| .Init.ChipSelectHighTime = 2, \ | ||
| .Init.DualQuad = HAL_OSPI_DUALQUAD_DISABLE, \ | ||
| .Init.FreeRunningClock = HAL_OSPI_FREERUNCLK_DISABLE, \ | ||
| .Init.ChipSelectBoundary = 0, \ | ||
| .Init.MemoryType = OSPI_MEMORY_TYPE, \ | ||
| } | ||
| #endif /* OSPI_BUS_CONFIG */ | ||
| #endif /* BSP_USING_OSPI */ | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif /* __OSPI_CONFIG_H__ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.