BLACKPILL STM32F411 RTC

For general Flowcode discussion that does not belong in the other sections.
Post Reply
max.tisc
Posts: 132
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 10 times

Flowcode v10 BLACKPILL STM32F411 RTC

Post by max.tisc »

Hi, I wanted to ask if the internal RTC component can read and write to the STM32f411's RTC. That would be great, so I don't have to add any other components to get an RTC.
Thanks.

BenR
Matrix Staff
Posts: 2014
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 529 times
Been thanked: 719 times

Re: BLACKPILL STM32F411 RTC

Post by BenR »

Hello,

Thanks for your question.

I've checked and it looks like the internal RTC should be supported already for that device.

Let us know if you have any problems.

max.tisc
Posts: 132
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 10 times

Flowcode v10 Re: BLACKPILL STM32F411 RTC

Post by max.tisc »

Hi Ben,
I made this simple code to test, but it doesn't work and everything is frozen; the LED isn't even blinking. I think I understand that RTC must be enabled in the configuration, and I didn't see it in the oscillator settings screen. It seems that RTC is disabled by default. I'm attaching a screenshot of the affected part that's enabled.
Thanks
Attachments
Screenshot MOD.png
Screenshot MOD.png (156.13 KiB) Viewed 113 times
RTC_STM32F411_FC10.fcfx
(15.62 KiB) Downloaded 8 times

max.tisc
Posts: 132
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 10 times

Re: BLACKPILL STM32F411 RTC

Post by max.tisc »

Hi leightM
Yes, I remembered the issue and tried to replicate it, but it doesn't work unless I have to reload STARM_CAL_RTC.c. Should it already be up to date with the various updates released subsequently, or not?
Thanks

LeighM
Valued Contributor
Posts: 510
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 88 times
Been thanked: 273 times

Re: BLACKPILL STM32F411 RTC

Post by LeighM »

Hi,
I just done a full update (V10), the CAL file is up to date, and includes the RTC enable code.
I've successfully compiled your test program and it runs fine on my Blackpill, LED flash, no lockup and UART output OK.
I also added a read and output of RTC seconds, which do increment.

Hope that helps.

LeighM
Valued Contributor
Posts: 510
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 88 times
Been thanked: 273 times

Re: BLACKPILL STM32F411 RTC

Post by LeighM »

Update...
Ah, my previous post might not be true..
The Full Update doesn't seem to check all files.
I'm running on the STARM_CAL_RTC.c from the "STM32F QUESTIONS" thread.
Even if I delete it, Flowcode doesn't seem to detect this and update it, so I can't check what's in the Matrix repo.
Ben, is this fixable? :)
Thanks!

LeighM
Valued Contributor
Posts: 510
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 88 times
Been thanked: 273 times

Re: BLACKPILL STM32F411 RTC

Post by LeighM »

but it doesn't work unless I have to reload STARM_CAL_RTC.c
.. does this mean your Flowcode update reverts to the earlier original version?

max.tisc
Posts: 132
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 10 times

Re: BLACKPILL STM32F411 RTC

Post by max.tisc »

Hi,
I reloaded the STARM_CAL_RTC.c file but it didn't work. Did you have to change the project options settings to get it to work?
Thanks

LeighM
Valued Contributor
Posts: 510
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 88 times
Been thanked: 273 times

Re: BLACKPILL STM32F411 RTC

Post by LeighM »

No, I didn't change any settings.
Have you tried a power cycle of the board after the updated build is transferred?

If it still locks up, maybe my working version is due to some previously run code? :?
I think all the C code I've tried/run is posted on that previous post/thread

max.tisc
Posts: 132
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 10 times

Re: BLACKPILL STM32F411 RTC

Post by max.tisc »

tried different configurations, turning it off and on again but it always blocked

Post Reply