stm32f7xx_hal_driver icon indicating copy to clipboard operation
stm32f7xx_hal_driver copied to clipboard

[HAL][NOR] Fix support for 8-bit NOR that uses the AMD command set. C…

Open StephenPTxEng opened this issue 8 months ago • 8 comments

…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.

StephenPTxEng avatar Apr 15 '25 18:04 StephenPTxEng

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.

StephenPTxEng avatar Apr 16 '25 19:04 StephenPTxEng

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 avatar Apr 17 '25 07:04 KRASTM

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

ST-dot-com avatar Jul 29 '25 15:07 ST-dot-com

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 avatar Jul 29 '25 15:07 StephenPTxEng

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?

StephenPTxEng avatar Jul 29 '25 15:07 StephenPTxEng

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,

KRASTM avatar Jul 31 '25 10:07 KRASTM

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).

StephenFromHome avatar Jul 31 '25 15:07 StephenFromHome

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,

KRASTM avatar Aug 01 '25 09:08 KRASTM