hal_lld for F413 change to enable select of PLLI2S for CK48

Report here problems in any of ChibiOS components. This forum is NOT for support.
User avatar
FXCoder
Posts: 173
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 63 times
Been thanked: 51 times

hal_lld for F413 change to enable select of PLLI2S for CK48

Postby FXCoder » Mon Jan 07, 2019 12:02 pm

Hi,
#1 Different naming of select for STM32_CK48MSEL_PLLI2S in F413 .h file versus common .h file causes compile fail.
Suggested change #define STM32_CK48MSEL_PLLALT STM32_CK48MSEL_PLLI2S for case where PLLI2S is activated.

#2 F413 does not have PLLI2SP which results in a compile error in .c for hal.
Suggested change #define STM32_PLLI2SP 0 in F413 lld .h file.

--
Bob

Code: Select all

Index: hal_lld_type2.h
===================================================================
--- hal_lld_type2.h   (revision 12537)
+++ hal_lld_type2.h   (working copy)
@@ -1077,6 +1077,7 @@
  * @brief   PLLI2S activation flag.
  */
 #define STM32_ACTIVATE_PLLI2S       TRUE
+#define STM32_CK48MSEL_PLLALT       STM32_CK48MSEL_PLLI2S
 #else
 #define STM32_ACTIVATE_PLLI2S       FALSE
 #endif
@@ -1170,6 +1171,12 @@
 #define STM32_PLLI2S_R_CLKOUT       (STM32_PLLI2SVCO / STM32_PLLI2SR_VALUE)
 
 /**
+ * @brief   PLLI2SP enable bit.
+ * @note    Always 0, there is no PLLI2SP.
+ */
+#define STM32_PLLI2SP               0
+
+/**
  * @brief   PLLSAI activation flag.
  * @note    Always FALSE, there is no PLLSAI.
  */


User avatar
Giovanni
Site Admin
Posts: 11831
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 522 times
Been thanked: 433 times
Contact:

Re: hal_lld for F413 change to enable select of PLLI2S for CK48

Postby Giovanni » Fri Jan 11, 2019 12:07 pm

Hi,

Wouldn't be better to make both files use the same name for consistency? (ALT, I suppose)

Giovanni

User avatar
FXCoder
Posts: 173
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 63 times
Been thanked: 51 times

Re: hal_lld for F413 change to enable select of PLLI2S for CK48

Postby FXCoder » Fri Jan 11, 2019 2:14 pm

Hi,
Using STM32_CK48MSEL_PLLI2S in mcuconf.h makes it quite clear as to which PLL is being selected.
However, STM32_CK48MSEL_PLLALT is more generalised and I've no problem with going that direction.

--
Bob


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest