We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When set PLL0 to 832MHz with CPU set to 416MHz, get random RTC value
#include <stdio.h> #include <time.h> #include <unistd.h> #include "rtc.h" #include "entry.h" #include "sysctl.h" void get_date_time(bool alarm) { int year; int month; int day; int hour; int minute; int second; rtc_timer_get(&year, &month, &day, &hour, &minute, &second); if (!alarm) printf("%4d-%02d-%02d %02d:%02d:%02d\n", year, month, day, hour, minute, second); else printf("Alarm at --> %4d-%02d-%02d %02d:%02d:%02d\n", year, month, day, hour, minute, second); } int main(void) { printf("start\r\n"); #define FREQ_PLL0_DEFAULT 832000000UL #define FREQ_PLL1_DEFAULT 400000000UL #define FREQ_PLL2_DEFAULT 45158400UL sysctl_pll_set_freq(SYSCTL_PLL0, FREQ_PLL0_DEFAULT); // sysctl_pll_set_freq(SYSCTL_PLL1, FREQ_PLL1_DEFAULT); // sysctl_pll_set_freq(SYSCTL_PLL2, FREQ_PLL2_DEFAULT); rtc_init(); rtc_timer_set(2019,1, 1,0, 0, 0); while(1) { sleep(1); get_date_time(false); } return 0; }
kd233 or sipeed serial board
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When set PLL0 to 832MHz with CPU set to 416MHz, get random RTC value
Hardware
kd233 or sipeed serial board
The text was updated successfully, but these errors were encountered: