Skip to content

Conversation

@StephenPTxEng
Copy link

…hanges should be backwards compatible.
In reference to this issue, #14
TThe previous version of the HAL_NOR did not accurately handle 16-bit and 8-bit NOR devices. There were many instances of typecasting to a 16-bit pointer which, when used with 8-bit addressing, results in Misalligned Memory Access faults.
Additionally, the NOR_ADDR_SHIFT already handles the address shifting; There does not need to be 2 different address values for 8-bit vs 16-bit.
I also turned the NOR_WRITE into a wrapper for a function pointer; This ensures backwards compatibility, while ensuring the correct NOR_WRITE is used in all circumstances.

Do note: I was unable to find any Coding Standard for contributing, so i attempted to follow existing code.
Additionally, there are still potential issues in HAL_NOR that I could not adequately address without rewriting; HAL_NOR_ReadCFI, anything in the NOR_INTEL_SHARP_EXT_COMMAND_SET.

Finally, I am not overly happy with exposing the extern WriteNORFunc NORWriteFunction; /* Function Pointer to active NOR_Write*/. I'd much rather have that function pointer be private to the HAL_NOR .c file. But to support backwards compatibility with projects that use NOR_WRITE, it has to be exposed.

IMPORTANT INFORMATION

Contributor License Agreement (CLA)

  • The Pull Request feature will be considered by STMicroelectronics after the signature of a Contributor License Agreement (CLA) by the submitter.
  • If you did not sign such agreement, please follow the steps mentioned in the CONTRIBUTING.md file.

@ALABSTM ALABSTM added hal HAL-LL driver-related issue or pull-request. enhancement New feature or request nor external NOR flash memory controller labels Apr 16, 2025
@ALABSTM ALABSTM added the fmc Flexible Memory Controller label Apr 16, 2025
@ALABSTM ALABSTM linked an issue Apr 16, 2025 that may be closed by this pull request
@StephenPTxEng
Copy link
Author

Please note that I do not have a 16-bit NOR chip to test.
THese changes SHOULD be compatible with all 16-bit NOR chips, in both x8 and x16 mode.

@KRASTM
Copy link
Contributor

KRASTM commented Apr 17, 2025

Hello @StephenPPEng,

We already linked this Pull Request to the issue #14, and I will keep you informed of our team's decision.

With regards,

@KRASTM KRASTM moved this from To do to Analyzed in stm32cube-mcu-hal-dashboard Apr 17, 2025
@ST-dot-com
Copy link

This pull request has been refused, the Contribution License Agreement must be signed.

@ST-dot-com ST-dot-com closed this Jul 29, 2025
@github-project-automation github-project-automation bot moved this from Analyzed to Done in stm32cube-mcu-hal-dashboard Jul 29, 2025
@StephenPTxEng
Copy link
Author

Why was the pull request automatically closed?
I had previously signed a contributor agreement... I am guessing because my username changed?
Why does the bot instanly close the pull request?

@StephenPTxEng
Copy link
Author

Ugh. I didn't intend to merge master into my PR. I didn't realize it would re-authorize.
@KRASTM what do i need to do to restart this PR?

@KRASTM
Copy link
Contributor

KRASTM commented Jul 31, 2025

Hello @StephenPTxEng,

We have reported the issue internally and I will keep you updated. Just to be clear, did you only change your username?

With regards,

@StephenFromHome
Copy link

StephenFromHome commented Jul 31, 2025

Originally, yes. I had changed my username from StephenPPEng to StephenPTxEng. Then I accidentally tried to push an update to this PR that merged master into my branch (I didn't realize what i was doing). This caused the system to check for a CLA (which apparently got invalidated when i changed my username) which failed and closed this issue.
Then, My company created org-managed accounts on a different Org, but that org doesn't support contributing to public repos. so i transferred the forked repo to my personal account (this one).

@KRASTM KRASTM reopened this Aug 1, 2025
@KRASTM
Copy link
Contributor

KRASTM commented Aug 1, 2025

Hello @StephenPTxEng,

We have reopened the PR and was successfully passed the CLA by the username StephenPTxEng. Try again and we will see what happens. Otherwise use your personal account, sign the CLA and push the commit.

Withe regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fmc Flexible Memory Controller hal HAL-LL driver-related issue or pull-request. nor external NOR flash memory controller

Projects

Development

Successfully merging this pull request may close these issues.

8-Bit NOR devices cause hard fault on Hal_Nor_Init

5 participants