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

   Fixup RCC code for STM32H7S3L8 boards (stm32h7s8-dk and nucleo-h7s3l8):
    - DIVR fields are not documented in RM0477 (they are reserved)
    - Reserved bits in RCC registers must be kept at reset value
    - Compile-time compute derived frequencies from sources
    - Only set PLL DIV[P,Q,S,T] fields (and enable dividers) if defined
    - Compile-time compute PLL[1-3]RGE fields from PLL refx_ck
    - Provide macros to convert from prescalers to CPRE, BMPRE, PPRE fields
    - Compile-time validate PLL divisors and bus clock prescalers
   
   ## Summary
   
   Cleanup STM32H7RS RCC code to derive register field values for 
divisors/prescalers from their values and compute frequencies for the various 
clocks from sources and divisor/prescalers. Clock setup for stm32h7rs now only 
requires:
   - defining PLL source
   - define clock source frequencies
   - define PLL source
   - define DIVM/DIVN as well as (optionally) define DIVP, DIVQ, DIVS, DIVT 
divisors for each PLL
   - define  CPRE and BMPRE cpu and bus prescalers
   
   Frequencies for all RCC clocks are computed at compile time from above 
information.
   
   ## Impact
   
   User experience: No adaptation required. This fix should make it easier to 
configure clocks for stm32h7rs boards.
   Build: No impact.
   Hardware: Affects stm32h7s3l8 based-boards (nucleo-h7s3l8 and stm32h7s8-dk).
   Documentation: No impact.
   Security: No impact.
   Compatibility: Backward compatible
   
   ## Testing
   
   Build Host:
   
   - OS: Ubuntu 24.04.4 LTS
   - Compiler: arm-none-eabi-gcc 13.2.1
   
   Target:
   
   - Architecture: ARM (STM32H7S3L8)
   - Board: STM32H7S8-DK and NUCLEO_H7S3L8
   - Configuration: Default jumbo-xip and boot-xip for both boards
   - Ran ostest to successful completion
   
   Build/booted each configuration (both with HSI and HSE as PLL), ran ostest 
to completion.
   
   From stm32h7s8-dk console:
   
   ```
   Bootloader 13.1.0 95305908f8-dirty Nov  2 2026 19:36:30 arm stm32h7s8-dk
   telnetd [6:100]
   
   NuttShell (NSH) NuttX-13.1.0
   nsh> uname -a
   NuttX  13.1.0 95305908f8-dirty Nov  2 2026 19:36:36 arm stm32h7s8-dk
   nsh>
   ```
   
   From nucleo-h7s3l8 console:
   
   ```
   NuttShell (NSH) NuttX-13.1.0
   nsh> uname -a
   NuttX  13.1.0 95305908f8-dirty Nov  2 2026 19:36:50 arm nucleo-h7s3l8
   nsh>
   ```
   
   
   


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