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

imxrt-flash/imxrt117x: enable second flash memory & bug fixes #330

Merged
merged 1 commit into from
May 14, 2024

Conversation

ziemleszcz
Copy link
Contributor

  • probe second flash memory on port B1
  • set FLEXSPI2 clock to 132 MHz
  • initial flash size fix
  • flexspi_getAddressByPort() fix
  • change FLEXSPI1 SS0 pin on port B1 to SD_B1_4 (SD_B2_05 is already used for DQS on port A1)
  • fix _imxrt_setIOmux() parameters (mode and sion were switched)
  • code style changes

JIRA: NIL-570

Description

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: (imxrt1176).

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@ziemleszcz ziemleszcz self-assigned this May 13, 2024
Copy link

github-actions bot commented May 13, 2024

Unit Test Results

7 460 tests   6 745 ✅  39m 3s ⏱️
  420 suites    715 💤
    1 files        0 ❌

Results for commit 9f4a26a.

♻️ This comment has been updated with latest results.

@ziemleszcz ziemleszcz marked this pull request as ready for review May 13, 2024 11:57
#endif

#ifndef FLEXSPI2_PORT_MASK
#define FLEXSPI2_PORT_MASK flexspi_slBusA1
Copy link
Contributor

Choose a reason for hiding this comment

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

On imxrt-105x there is only single FlexSPI instance. Add appropriate precompiler #error in case if someone defines more than one instance.

@@ -247,20 +249,20 @@

/* FLASH */

#define FLASH_NO (FLASH_FLEXSPI1_MOUNTED + FLASH_FLEXSPI2_MOUNTED)
#define FLASH_NO FLEXSPI_COUNT
Copy link
Contributor

Choose a reason for hiding this comment

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

Previously FLASH_FLEXSPI1_MOUNTED and FLASH_FLEXSPI2_MOUNTED were used to determine which instances are used in a project. On non-standard/custom boards it is possible to have only FLASH_FLEXSPI2_MOUNTED instance and no FLASH_FLEXSPI1_MOUNTED, so if FLEXSPI_COUNT=1 is set, you then always start with FLEXSPI1 and not FLEXSPI2. Previous idea was more flexible from my point of view.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that it would be nice to have this feature however I don't think it was ever there. FLASH_*_MOUNTED defines were used only to set FLASH_NO. There was never support for using FLEXSPI2 memories only.

 - flash memories are configurable through board_config.h (defaults are set for EVK boards)
 - set FLEXSPI2 clock to 132 MHz
 - initial flash size fix
 - flexspi_getAddressByPort() fix
 - change FLEXSPI1 SS0 pin on port B1 to SD_B1_4 (SD_B2_05 is already used for DQS on port A1)
 - fix _imxrt_setIOmux() parameters (mode and sion were switched)
 - code style changes

JIRA: NIL-570
@ziemleszcz ziemleszcz merged commit f5c0137 into master May 14, 2024
30 checks passed
@ziemleszcz ziemleszcz deleted the ziemleszcz/NIL-570 branch May 14, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants