This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

f28m35的ADC寄存器配置不进去。



Analog Subsystem的时钟上电就是有的,ACIB Status Register (CCIBSTATUS)的POWER也有,ASYSCLKCNT的值也会变化,但是我用汇编指令给ADC1CTL1写值就写不进去。TI的C例程也可以配置,例程中的InitSysCtrl()使能了ADC,但是反汇编不到怎么设置的,代码跑到了0x0024 0200 – 0x0024 03FF区域TI OTP。

void InitSysCtrl(void)
{

    // *IMPORTANT*
    // The Device_cal function MUST be called
    // for the ADC and oscillators to function according
    // to specification. The clocks to the ADC MUST be enabled before calling
    // this function. See the device data manual and/or the ADC Reference
    // Manual for more information.

    (**InitAnalogSystemClock)(ACLKDIV4);

    EALLOW;
    // Initialize the Analog Sub-System and set the clock divider to divide by 4
    while((**AnalogClockEnable)(AnalogConfig1,ADC1_ENABLE));    // Enable ADC 1
    while((**AnalogClockEnable)(AnalogConfig2,ADC2_ENABLE));    // Enable ADC 2
    (**Device_Cal)();
    while((**AnalogClockDisable)(AnalogConfig1,ADC1_ENABLE));   // Disable ADC1
    while((**AnalogClockDisable)(AnalogConfig2,ADC2_ENABLE));   // Disable ADC2
    EDIS;

    // Initialize the peripheral clocks
    InitPeripheralClocks();
}