any body has implemented clock calender.
Clock calendar implementation on RTC(152 posts) (17 voices)
not that I know of. are you working on such a thing? are you using the RTC pins or a separate i2c device or something?
i am using internal RTC of STM32. trying to implement with RTC backup register using STM applicatin note "Clock_calendar implementation on RTC AN2821".
I just got myself an Olimexino (with the 32,768 kHz crystal onboard) and I was planning to write and RTC library to start using the "Maple" board.
Need some help with this?
I haven't ran this through the processor, but apparently you can use time.h to convert the timestamp. :) Yeay :)
I have just finished a libmaple driver for the STM32F1 on board RTC peripheral modeled closely on Marti's new timer.c code (not as clever, but very similar structures). Its 'series F1' only at the moment. My focus is low power, so I needed the RTC to wake up from deep sleep. It just supports the native peripheral, so the 32 bit timer and alarm registers. It would need something to convert to day/date to use it as a calendar (time.h you say?) but it handles all the interrupts/alarm event and stuff. Doesn't use the backup registers. There is an example as well.
It does all three clock sources. HSE/128 could give an accurate time on Maple Mini. The test case uses LSI.
How does one go about contributing source to the Leaf cause?
Tested the time.h yesterday and it works as it would anywhere else.
Haven't picked up on the RTC yet. Too busy at work.
I wouldn't mind testing yours though. I have a board with the 32kHz crystal in it already.
Did you implement the possibility to attach functions on the alarm and seconds interrupts?
Yes. It all works as you would expect...
I would love to have you test it.
Maybe I'll futz with a github repository today with changed files from 0.0.12 libmaple...
I haven't seen an 'official' suggestion for sharing code yet.
patches are always welcome! Sorry for the belated reference: http://leaflabs.com/docs/libmaple/contributing.html#libmaple-contributing
The new stm32 line has an RTC oscillator baked right in, so RTC is definitely on our radar for libmaple.
Bit of a learning curve there, but you have a pull request...
Thanks for the reference. Missed that.
bubulindo you are welcome to clone rodgilchrist/libmaple on github for a copy to test.
poslathian what happens next to the code I submitted? I'm just curious about how to move my local repository forward beyond 0.0.12 as I am very interested in the F4 (and L1 in particular) work in progress. I have projects using both that I'd like to move forward with.
BTW, not sure how to integrate the test program into the IDE examples. I just assumed dropping it into the example directory would do it.
I'm using command line development myself (which I love how LeafLabs has set up, BTW).
In the MapleIDE folder, where all your sketches are stored, create a folder named libraries and put your library there.
I looked around github and didn't find any files regarding the RTC. Can you post a link to them?
Ok. That's interesting about sketches. I was trying to file my example test program in the libmaple source, though, so I just dropped it in libmaple/examples. I think that will work.
On github search for for 'rodgilchrist' which will lead you to my repositories. You want release e23ece8. There is a
download link there.
Github is pretty cool. I haven't used it before.
I'll download it and test it today. Maybe leave it running over night to see if it fails.
I might create a .cpp wrapper to hide most of the stuff and make it "easier" to use.
Good work. I'll post the feedback here.
You must log in to post.