I2C4 undefined stm_rxxh for STM32L4xx Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
lau
Posts: 4
Joined: Tue Sep 25, 2018 3:10 am
Been thanked: 1 time

I2C4 undefined stm_rxxh for STM32L4xx  Topic is solved

Postby lau » Tue Jun 18, 2019 1:38 am

hi Sir,

i am using I2C4 due to DMA clash of I2C2 with my SPI2.

When I switch to I2C4 , the compiler complain that the rccResetI2C4 and rccEnableI2C4 is missing.
I check the library file and found that only I2C1 to I2C3 are defined but not I2C4.

KIndly advise it is intentional of there is specific reason to omit I2C4.

Best Regards
Lau

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

Re: I2C4 undefined stm_rxxh for STM32L4xx

Postby Giovanni » Tue Jun 18, 2019 7:45 am

Moving in "bug reports".

Giovanni

lau
Posts: 4
Joined: Tue Sep 25, 2018 3:10 am
Been thanked: 1 time

Re: I2C4 undefined stm_rxxh for STM32L4xx

Postby lau » Wed Jun 19, 2019 12:54 am

Some update :

I added in the three line of macro in STM32/STM32L4xx/stm32_rcc.h files.
It work fine now. I read the datasheet , it mention that this feature is only availabe in STM32L496xx/4A6xx devices , this may explain why does not appear in the stm32_rcc.h file as it is suppose to be generic , and this feature is only for "specific" series.

in any case , we should update it or protect it with some preprocessor define.

just my 2 cent of thoughts.

/**
* @brief Enables the I2C4 peripheral clock.
*
* @param[in] lp low power enable flag
*
* @api
*/

#define rccEnableI2C4(lp) rccEnableAPB1R2(RCC_APB1ENR2_I2C4EN, lp)

/**
* @brief Disables the I2C4 peripheral clock.
*
* @api
*/
+#define rccDisableI2C4() rccDisableAPB1R1(RCC_APB1ENR2_I2C4EN)

/**
* @brief Resets the I2C4 peripheral.
*
* @api
*/
#define rccResetI2C4() rccResetAPB1R1(RCC_APB1RSTR2_I2C4RST)
/** @} */

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

Re: I2C4 undefined stm_rxxh for STM32L4xx

Postby Giovanni » Sun Jun 30, 2019 8:39 am

Hi,

Fixed as bug #1036.

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests