9 years, 8 months ago.

HAL

Hi, is this module setup for a HAL?
It seems like it is setup for a LPC and is going to take a complete rework to make it compatible with a KL25z simple 32bit RTC?
thanks

Question relating to:

Allows easy usage of the LPC1768 RTC interrupts alarm, interrupt, RTC, time

1 Answer

9 years, 8 months ago.

Hey,

You are correct. This library was made back when there was only the LPC1768 and LPC11u24, and the last one doesn't have an RTC. So there wasn't a reason to have code which could be easily ported to other targets (you see that often in older libraries, there simply was no need). I haved looked a bit into it a while ago, but my conclusion was that the KL25z was too different interrupt wise to make it useful to try to port it.

I believe there is someone elses library for the KL25, but I never looked into it, but you can try if you can search for it, and maybe it is useful for you.

Accepted Answer

Thanks ... so I'm going through the learning curve, and I guess my comment would be it would be nice for some of these thoughts to be documented rather than having to rediscover the issues. I would add them myself, but doesn't seem that capacity is enabled in these sections on the wiki.

if I want to bring in
mbed\libraries\mbed\hal\rtc_api.h
rtc_api.c
into my application, can I do it

thanks

posted by neil hancock 21 Aug 2014

You are correct, however then we get back to that when it was made there were no other devices with RTC. So there was no need to mention it, and I never changed it afterwards. Will do now though.

mbed rtc_api files are automatically included, they are also automatically called if you use C time functions.

(I just added in the description, but I see it was already mentioned in the wiki).

posted by Erik - 21 Aug 2014