m12 low power

This commit is contained in:
Mariano Alvira 2012-10-26 10:49:28 -04:00
parent d12df2eed3
commit 92856d8831
3 changed files with 13 additions and 0 deletions

View File

@ -49,6 +49,7 @@
#define FTUNE 3
#define vreg_init buck_init
#define board_init m12_init
#include <std_conf.h>
#endif

View File

@ -58,3 +58,14 @@ void buck_init(void) {
while(CRM->STATUSbits.VREG_1P8V_RDY == 0) { continue; }
}
void m12_init(void) {
/* configure pullups for low power */
GPIO->FUNC_SEL.GPIO_63 = 3;
GPIO->PAD_PU_SEL.GPIO_63 = 0;
GPIO->FUNC_SEL.SS = 3;
GPIO->PAD_PU_SEL.SS = 1;
GPIO->FUNC_SEL.VREF2H = 3;
GPIO->PAD_PU_SEL.VREF2H = 1;
GPIO->FUNC_SEL.U1RTS = 3;
GPIO->PAD_PU_SEL.U1RTS = 1;
}

View File

@ -42,6 +42,7 @@
void default_vreg_init(void);
void buck_init(void);
void m12_init(void);
void uart1_init(uint16_t inc, uint16_t mod, uint8_t samp);
void uart2_init(uint16_t inc, uint16_t mod, uint8_t samp);