I am new to Chibios. Stumbled across it accidentally and was able to compile version 2.4.3 without errors, and successfully.
ran the demo under demos/ARMCM3-STM32F100-DISCOVERY. very impressive.
To implement clock calender functions, I currently use these ST following header functions along with the relevant source code with success.
#include "stm32f10x_bkp.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_rtc.h"
#include "stm32f10x_pwr.h"
Unfortunately the Chibios RTC demo does not show an example of using the function rtcSetTime(&RTCD1, ×pec);
Simply passing the relevant parameters clearly is not enough.
I hard-coded the time and date and programed chip as follows:- year, month, date, hour, minutes, seconds, [ 2012, 6, 8, 20, 38, 0 ] = 0x4FD262A8
Code Snippet
Code: Select all
timespec.tv_sec = 0x4FD262A8; // Hardcode time and date for testing purposes
rtcSetTime(&RTCD1, ×pec); // Program Stm32 Clock
with the above code the date is set correctly but the clock is set at zero's and does not run.
Hope I have explained my requirements clearly.
If further information is required please do not hesitate to ask.
Any help appreciated
Regards