STM32F3 missing RTC support

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

Moderators: RoccoMarco, barthess

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

STM32F3 missing RTC support

Postby Flautz » Sun Jun 02, 2013 9:55 pm

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: 14458
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM32F3 missing RTC support

Postby Giovanni » Mon Jun 03, 2013 7:53 am

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

Postby Flautz » Mon Jun 03, 2013 7:24 pm

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: 14458
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: STM32F3 missing RTC support

Postby Giovanni » Mon Jun 03, 2013 7:44 pm

Hi,

Changed that as well, thanks.

Giovanni


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 9 guests