MSP430REG_NORACE(TBIV);
#endif
+ #if defined(__MSP430_HAS_BC2__) /* basic clock module+ */
+ #define FIRST_STEP 0x1000
+ #else /* orig basic clock module */
+ #define RSEL3 0
+ #define FIRST_STEP 0x800
+ #endif
+
enum
{
DCOX = DCO2 + DCO1 + DCO0,
uint16_t calib;
uint16_t step;
- for (calib = 0, step = 0x1000; step != 0; step >>= 1) {
+ for (calib = 0, step = FIRST_STEP; step != 0; step >>= 1) {
// if the step is not past the target, commit it
if (test_calib_busywait_delta(calib | step) <= TARGET_DCO_DELTA )
calib |= step;