slorquet commented on code in PR #6287:
URL: https://github.com/apache/incubator-nuttx/pull/6287#discussion_r874882882


##########
arch/arm/src/stm32h7/stm32h7x3xx_rcc.c:
##########
@@ -98,6 +98,12 @@
 #  define USE_PLL3
 #endif
 
+#ifdef STM32_BOARD_USEHSI
+#ifndef STM32_BOARD_HSIDIV
+#error When HSI is used, you have to define STM32_BOARD_HSIDIV in 
board/include/board.h

Review Comment:
   I do not recommend this
   
   default case is not broken, by default the nucleo-h7 boards use HSE 
(external clock provided by stlink) not HSI
   
   The error will only trigger if the user modifies the board.h config to use 
HSI and she does not define this divider.
   
   Having a silent default value will only bring confusion if the user really 
forgot to set the divider.
   
   So I recommend keeping the original code instead. if you cant accept it, I 
will add the default value and change the error to warn.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to