Thread 中讨论的其他部件:、 MSP-EXP430FR5969
我计划在1.8V 时使用 MSP430FR5969。 我已将电路设置为从2V 开始、并根据需要降至1.8V。 为了实现这一目标、我需要通过编程方式(使用 driverlib)执行什么操作?
我尝试使用 PMM_disableSVSH(),然后将其放入 lpm2,但这似乎不起作用。 该程序只能运行几秒钟、然后停止。
代码片段:
#define P1 GPIO_PORT_P2、GPIO_PIN2
#define P2 GPIO_PORT_P1、GPIO_PIN5
void main (void)
{
WDT_A_HOLD (WDT_A_base);
GPIO_setAsOutputPin (P1);
GPIO_setAsOutputPin (P2);
GPIO_setPeripheralModuleFunctionInputPin (GPIO_PORT_PJ、GPIO_PIN4 + GPIO_PIN5、GPIO_PRIMARY_MODULE_Function);
GPIO_setOutputHighOnPin (P2);
PMM_disableSVSH ();
PMM_unlockLPM5 ();
cs_setExternalClockSource (32768、0);//将外部时钟频率设置为32.768 KHz
CS_TurnOnLFXT (CS_LFXT_DRIVE_0);//启动 XT1,无超时
CS_initClockSignal (CS_ACLK、CS_LFXTCLK_select、CS_clock_divider);//设置 ACLK=LFXT
//以 ACLK 为源的连续模式中的启动定时器
Timer_A_clearTimerInterrupt (timer_A1_base);
Timer_A_initContinuousModeParam ={0};
param.clockSource = TIMER_A_CLOCKSOURCE_ACLK;
param.clockSourceDivider = TIMER_A_CLOCKSOURCE_divider;
param.timerInterruptEnable_TAIE = TIMER_A_TAIE_INTERRUPT_ENABLE;
param.timerClear = timer_a_do _clear;
param.startTimer = false;
Timer_A_initContinuousMode (timer_A1_base、¶m);
Timer_A_startCounter (timer_A1_base、timer_A_Continuous_mode);
low_power_mode_2 ();
}
#if defined (__TI_Compiler_version__)|| Defined (__IAR_systems_ICC__)
#pragma vector=Timer1_A1_vector
_interrupt
#Elif defined (_GNU_)
__attribute__((interrupt (Timer1_A1_vector))
#endif
空 Timer1_A1_ISR (空)
{
switch (__even_in_range (TA1IV、14)){
情况0:中断;//无中断
情况2:中断;//CCR1未使用
情况4:中断;//CCR2未使用
情况6:中断;//CCR3未使用
案例8:中断;未使用//CCR4
情况10:中断;未使用//CCR5
情况12:中断;//CCR6未使用
案例14:
GPIO_toggleOutputOnPin (P1);
中断;
默认值:break;
}
}