1
Web platform / Re: ds30 Loader Found unknown device
1. press download
2. reset board
Only press check for bootloader if your intention is to only check if a bootloader is present.
Open Source Hardware
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
//------------------------------------------------------------------------------
// Timer 1 interrupt()
// Description: rtc timer
//------------------------------------------------------------------------------
void __attribute__((interrupt, auto_psv)) _T1Interrupt(void)
{
IFS0bits.T1IF = 0; //clear interrupt flag
++parameters.lSeconds;
// Toggle led 1
if ( LD1_O ) {
LD1_O = 0;
} else {
LD1_O = 1;
}
}//T1Interrupt()
//------------------------------------------------------------------------------
// Time_Init()
// Description: setup timers
//------------------------------------------------------------------------------
void __attribute__((section(".text"))) Time_Init()
{
// Timer 1 + 32kHz lp oscillator
__builtin_write_OSCCONL( 0x02 ); //enable low power oscillator
T1CON = 0; //reset control register
TMR1 = 0; //reset timer
T1CONbits.TCS = 1; //use external clock as source
T1CONbits.TCKPS = 3; //set prescale to 1:256
PR1 = 128; //set period register so we get interupt each second (32k / 256 / 128 = 1)
IPC0bits.T1IP = 1; //set interupt priority
IFS0bits.T1IF = 0; //clear interupt flag
IEC0bits.T1IE = 1; //enable interupt
T1CONbits.TON = 1; //turn on timer 1
}//Time_Init
mov.b #0x04, W0
mov.b W0, [WBUFPTR++] ;upper byte
mov.b #(0xff & STARTADDR), W0
mov.b W0, [WBUFPTR++] ;low byte
mov.b #(0xff & (STARTADDR>>8)), W0
mov.b W0, [WBUFPTR++] ;high byte
mov.b #0x00, W0
mov.b W0, [WBUFPTR++] ;upper byte
mov.b #(0xff & (STARTADDR>>16)), W0
mov.b W0, [WBUFPTR++] ;low byte
mov.b #0x00, W0
mov.b W0, [WBUFPTR++] ;high byte
