Contrib: RCC controls for CRC

Report here problems in any of ChibiOS components or requests for limited changes. It is not meant for support.
User avatar
kimmoli
Posts: 14
Joined: Sat Oct 01, 2016 8:02 pm
Has thanked: 6 times
Been thanked: 7 times
Contact:

Contrib: RCC controls for CRC

Postby kimmoli » Sun Nov 20, 2016 1:02 pm

Using Hardware CRC from Chibios-Contrib needs rcc control functions for CRC peripheral. These are missing from stm32_rcc.

< barthess> kimmoli: there is no place for RCC stuff in contrib. Create topic on forum with patch attached.


Propsed patch will add them:
https://github.com/kimmoli/ChibiOS/comm ... 7d6fcc0951

Code: Select all

diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h b/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h
index 6f3e269..4de320c 100644
--- a/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h
+++ b/os/hal/ports/STM32/STM32F4xx/stm32_rcc.h
@@ -1551,6 +1551,36 @@
 /** @} */

 /**
+ * @name    CRC peripheral specific RCC operations
+ * @{
+ */
+/**
+ * @brief   Enables the CRC peripheral clock.
+ *
+ * @param[in] lp        low power enable flag
+ *
+ * @api
+ */
+#define rccEnableCRC(lp) rccEnableAHB1(RCC_AHB1ENR_CRCEN, lp)
+
+/**
+ * @brief   Disables the CRC peripheral clock.
+ *
+ * @param[in] lp        low power enable flag
+ *
+ * @api
+ */
+#define rccDisableCRC(lp) rccDisableAHB1(RCC_AHB1ENR_CRCEN, lp)
+
+/**
+ * @brief   Resets the CRC peripheral.
+ *
+ * @api
+ */
+#define rccResetCRC() rccResetAHB1(RCC_AHB1RSTR_CRCRST)
+/** @} */
+
+/**
  * @name    FSMC peripherals specific RCC operations
  * @{
  */

User avatar
RoccoMarco
Posts: 478
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 59 times
Been thanked: 42 times
Contact:

Re: Contrib: RCC controls for CRC

Postby RoccoMarco » Sun Nov 20, 2016 5:15 pm

Thanks, I will take a look.
Ciao,
RM

User avatar
RoccoMarco
Posts: 478
Joined: Wed Apr 24, 2013 4:11 pm
Location: Salerno (Italy)
Has thanked: 59 times
Been thanked: 42 times
Contact:

Re: Contrib: RCC controls for CRC

Postby RoccoMarco » Wed Dec 21, 2016 10:10 pm

Bumped
Ciao,
RM

User avatar
kimmoli
Posts: 14
Joined: Sat Oct 01, 2016 8:02 pm
Has thanked: 6 times
Been thanked: 7 times
Contact:

Re: Contrib: RCC controls for CRC

Postby kimmoli » Mon Mar 20, 2017 1:54 pm

bump

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

Re: Contrib: RCC controls for CRC

Postby Giovanni » Mon Mar 20, 2017 3:28 pm

Don't worry, posts in this forum are always considered unless marked "done" :)

Giovanni


Return to “Bug Reports and Small Changes”

Who is online

Users browsing this forum: No registered users and 1 guest