Hello,
Does anyone have experience with the bootstrap loader (BSL) feature of MSP430 processors made by TI?
I'm having trouble entering the BSL from software written in C. According to application note SLAA089D page 16, the following sequence of instructions will enter the BSL:
mov #00h,&CCTL0 bic.b #02h, &P1SEL bic.b #04h, &P2SEL, bic.b #32h, &IE1 mov.b #00h, &BCSCTL2 mov #00h, SR br &0C00h
I am trying to enter from C, but the device doesn't seem to enter the BSL. In particular, the line P1.1 (BSL TX) stays Hi-Z. My code looks like this, and as far as I can tell, its equivalent.
void EnterBootStrapLoader(void) { voidFcn BSL = (voidFcn) 0x0c00;
// Cautionary action -- make all pins Hi-Z P1DIR = 0; P1SEL = 0; P2DIR = 0; P2SEL = 0; P3DIR = 0; P3SEL = 0; P4DIR = 0; P4SEL = 0; P5DIR = 0; P5SEL = 0; P6DIR = 0; P6SEL = 0;
// Cautionary Action -- Turn off all the interrupts that my app was using // Turn off TimerB, UART, ADC TBCTL=0; ME1 &= ~(UTXE0 | URXE0); IE1 &= ~(UTXIE0 | URXIE0); ADC12CTL0 = 0; ADC12IE = 0;
// from TI Application Note SLAA089D CCTL0 = 0; P1SEL &= ~(0x02); P2SEL &= ~(0x04); IE1 &= ~(0x32); BCSCTL2 = 0; __bic_SR_register(0xff);
// never returns BSL(); }
Additionally, when I try to use a debugger (rowley crossstudio), it looks like the program counter is bouncing around all over the place, from low addresses ( < 0x0100 ), to around (0x1500), to my software's initialization routine.
Any hints?
Thanks, Nick Johnson