- //Info is missing, guess at a good value.
- switch(*((int*)0xff0)){
- default:
- case 0x6ff2: //f26f, the MSP430F2618
- BCSCTL1 = 0x8f; //CALBC1_16MHZ at 0x10f9
- DCOCTL = 0x7f; //CALDCO_16MHZ at 0x10f8
- break;
- }
+ /*
+ Info is missing, guess at a good value.
+
+ A list of correct calibrations in included as dco_calib.c,
+ generated by script.
+ */
+ DCOCTL = 0x00; //clear DCO
+
+ BCSCTL1 = dco_calibrations[2*choice[0]+1];
+ DCOCTL = dco_calibrations[2*choice[0]];
+ choice[0]++;
+ choice[0]%=dco_calibrations_count;