darrylring opened a new pull request, #20892:
URL: https://github.com/apache/nuttx/pull/20892

   ## Summary
   
   OTP flash word accesses require modifying an SBS register bit, but the SBS 
clock is not enabled by NuttX unless Ethernet or EDATA are enabled. This 
ensures the SBS is clocked whenever OTP word access is enabled.
   
   
https://github.com/apache/nuttx/blob/master/arch/arm/src/stm32h5/stm32h5xx_rcc.c#L616
   
   Possibly it would be better to change that check to just `#if 
defined(CONFIG_STM32_SBS)` and add a Kconfig menu item to enable/disable SBS 
support, which is `select`ed by `STM32_ETHMAC`.
   
   ## Impact
   
   Fixes an issue present in the OTP word access feature added in 
https://github.com/apache/nuttx/pull/20434.
   
   ## Testing
   
   OTP word accesses were failing before, but do not fail now!
   
   Testable by inspection, `.config` before:
   
   ```
   #
   # STM32H5 OTP Options
   #
   CONFIG_STM32H5_OTP_WORD=y
   CONFIG_STM32H5_OTP_WRITE=y
   ...
   # CONFIG_STM32_EDATA is not set
   ```
   
   After:
   
   ```
   #
   # STM32H5 OTP Options
   #
   CONFIG_STM32H5_OTP_WORD=y
   CONFIG_STM32H5_OTP_WRITE=y
   ...
   CONFIG_STM32_SBS=y
   # CONFIG_STM32_EDATA is not set
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to