STM32F3 missing RTC support

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
Flautz
Posts: 8
Joined: Sun Jun 02, 2013 9:32 pm
Been thanked: 1 time

STM32F3 missing RTC support

Post by Flautz »

I'm quite new to chibios but I'm starting to love it :-) I'm working with the stm32f3discovery board and started today to use the RTC. The stm32f3 has a rtc, but to get it to work with chibios, the platform.mk must be extended with the following lines:

PLATFORMSRC:
"${CHIBIOS}/os/hal/platforms/STM32/RTCv2/rtc_lld.c"

PLATFORMINC:
"${CHIBIOS}/os/hal/platforms/STM32/RTCv2"

I tested it with the stm32f3discovery. Maybe you want to update this in the official repository.

Best,
Florian
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F3 missing RTC support

Post by Giovanni »

Hi,

Thanks for testing, I'll add those lines.

Edit: Changes committed, thanks.

Giovanni
Flautz
Posts: 8
Joined: Sun Jun 02, 2013 9:32 pm
Been thanked: 1 time

Re: STM32F3 missing RTC support

Post by Flautz »

Now that I'm playing around with it, there is one more thing missing:

If you want to use functions from chrtclib.c, you have to add the defines for STM32F30x (and probably STM32F37X) in chrtclib.c:

before:
#if (defined(STM32F4XX) || defined(STM32F2XX) || defined(STM32L1XX) || \
defined(STM32F1XX) || defined(STM32F10X_MD) || defined(STM32F10X_LD) || \
defined(STM32F10X_HD) || defined(LPC122X) || defined(__DOXYGEN__))
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F3 missing RTC support

Post by Giovanni »

Hi,

Changed that as well, thanks.

Giovanni
Post Reply