Updates to support the Mirtoo internal clocking
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4855 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
f17fd97fd2
commit
d227c86a14
@ -602,7 +602,7 @@ int up_rtc_settime(FAR const struct timespec *tp)
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RTC_ALARM
|
||||
int up_rtc_setalarm(FAR const struct timespec *tp, alarmcb_t callback);
|
||||
int up_rtc_setalarm(FAR const struct timespec *tp, alarmcb_t callback)
|
||||
{
|
||||
struct rtc_regvals_s regvals;
|
||||
irqstate_t flags;
|
||||
|
@ -775,6 +775,25 @@
|
||||
# error "Unknown board POSC mode"
|
||||
#endif
|
||||
|
||||
#undef CONFIG_PIC32MX_FNOSC
|
||||
#if defined(BOARD_FNOSC_FRC)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_FRC
|
||||
#elif defined(BOARD_FNOSC_FRCPLL)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_FRCPLL
|
||||
#elif defined(BOARD_FNOSC_POSC)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_POSC
|
||||
#elif defined(BOARD_FNOSC_POSCPLL)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_POSCPLL
|
||||
#elif defined(BOARD_FNOSC_SOSC)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_SOSC
|
||||
#elif defined(BOARD_FNOSC_LPRC)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_LPRC
|
||||
#elif defined(BOARD_FNOSC_FRCDIV)
|
||||
# define CONFIG_PIC32MX_FNOSC DEVCFG1_FNOSC_FRCDIV
|
||||
#else
|
||||
# error "Unknown board FNOSC selection"
|
||||
#endif
|
||||
|
||||
#undef CONFIG_PIC32MX_FCKSM
|
||||
#if defined(BOARD_POSC_SWITCH)
|
||||
# if defined(BOARD_POSC_FSCM)
|
||||
|
@ -617,7 +617,7 @@ devconfig2:
|
||||
DEVCFG2_UNUSED
|
||||
|
||||
devconfig1:
|
||||
.long DEVCFG1_FNOSC_POSCPLL | CONFIG_PIC32MX_FSOSCEN | \
|
||||
.long CONFIG_PIC32MX_FNOSC | CONFIG_PIC32MX_FSOSCEN | \
|
||||
CONFIG_PIC32MX_IESO | CONFIG_PIC32MX_POSCMOD | \
|
||||
CONFIG_PIC32MX_PBDIV | CONFIG_PIC32MX_FCKSM | \
|
||||
CONFIG_PIC32MX_WDENABLE | DEVCFG1_UNUSED
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
/* Make sure that the selected clock parameters are sane */
|
||||
|
||||
#define CALC_SYSCLOCK (((BOARD_POSC_FREQ / BOARD_PLL_IDIV) * BOARD_PLL_MULT) / BOARD_PLL_ODIV)
|
||||
#define CALC_SYSCLOCK (((BOARD_PLL_INPUT / BOARD_PLL_IDIV) * BOARD_PLL_MULT) / BOARD_PLL_ODIV)
|
||||
#if CALC_SYSCLOCK != BOARD_CPU_CLOCK
|
||||
# error "Bad BOARD_CPU_CLOCK calculcation in board.h"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user