You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/17 14:22:10 UTC

[GitHub] [incubator-nuttx] slorquet commented on a diff in pull request #6287: stm32h7: allow definition of HSI divider in board config

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-unsubscribe@nuttx.apache.org

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