经常在运行过程中有这个错误.
MSP430: Trouble Reading Memory Block at 0x23fc on Page 0 of Length 0x2: Could not determine device state 如果发生,在程序第一句就会发生
MSP430: Failed Software Reset: Could not read Enhanced Emulation Module register 在PMM设置后发生
MSP430: Trouble Reading Memory Block at 0x23fc on Page 0 of Length 0x2: No error 不设置PMM的话,直接配置时候会发生
MSP430: Trouble Reading Memory Block at 0xf3ffe on Page 0 of Length 0x95: Invalid parameter(s) 不设置PMM,直接设置也可能发生
配置外部32.768khz rtc时钟,必复位MCU.
TARGET:MSP430F6721
- #include
- /*
- * main.c
- */
- int main(void) {
- WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
-
- PJDIR |= BIT0 | BIT1 | BIT3;
- PJSEL |= BIT0 | BIT1 | BIT3;
- //
- // PMMCTL0_H = PMMPW_H;
- // SVSMHCTL = SVSHE + SVSHRVL0 * PMMCOREV_3 + SVMHE + SVSMHRRL0 * PMMCOREV_3;
- // SVSMLCTL = SVSLE + SVMLE + SVSMLRRL0 * PMMCOREV_3;
- // while ((PMMIFG & SVSMLDLYIFG) == 0);
- // PMMIFG &= ~(SVMLVLRIFG + SVMLIFG);
- // PMMCTL0_L = PMMCOREV0 * PMMCOREV_3;
- // if ((PMMIFG & SVMLIFG))
- // while ((PMMIFG & SVMLVLRIFG) == 0);
- // SVSMLCTL = SVSLE + SVSLRVL0 * PMMCOREV_3 + SVMLE + SVSMLRRL0 * PMMCOREV_3;
- // PMMCTL0_H = 0x00;
- // DCO = 31 MOD = 0
- UCSCTL0_H = 31;
- UCSCTL1_L = DCORSEL_7;
- UCSCTL4 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK;
- UCSCTL5 = DIVA__32 | DIVS__8 | DIVM__1;
- UCSCTL6 &= ~(XT1OFF);
- UCSCTL6 |= XCAP_3;
- //
- // do
- // {
- // UCSCTL7 &= ~(XT2OFFG | XT1LFOFFG | DCOFFG);
- // SFRIFG1 &= ~OFIFG;
- // } while (SFRIFG1 & OFIFG);
- _nop();
- while(1){
- }
- }
复制代码怎么处理
此帖出自
小平头技术问答
一周热门 更多>