在线时间5 小时
UID120898
ST金币0
蝴蝶豆0
注册时间2007-6-24
初级会员
- 最后登录
- 2018-11-28
|
楼主 |
发表于 2012-11-21 18:31:20
|
显示全部楼层
a0a.1 0b0c
RE:进入RAM运行时遇到问题,两天了没找到原因
实验发现可能和eeprom有关,
void main(void)
{
u8 SaveScaler=0;
while(1)
{
PWR->CSR2 = 0x2;
sim();
/* To configure GPIO for reduce current. */
// GPIO_LowPower_Config();
/* To prepare to start counter */
// GPIO_HIGH(CTN_GPIO_PORT,CTN_CNTEN_GPIO_PIN);
/* To configure Low Power */
LPR_init();
/* CLK configuration -------------------------------------------*/
CLK_Config();
/* GPIO configuration -------------------------------------------*/
GPIO_Config();
// Key_Inti();
/* TIM1 configuration -------------------------------------------*/
// TIM1_Config();
/* Enable ADC clock */
CLK_PeripheralClockConfig(CLK_Peripheral_ADC1, ENABLE);
DAC_Config();
DAC_DualSoftwareTriggerCmd(ENABLE);
DAC_SetChannel1Data(DAC_Align_8b_R, 200);//0
DAC_SetChannel1Data(DAC_Align_8b_R, 140);//1
DAC_SetChannel1Data(DAC_Align_8b_R, 120);//2
DAC_SetChannel1Data(DAC_Align_8b_R, 100);//3
DAC_SetChannel1Data(DAC_Align_8b_R, 80);//4
DAC_SetChannel1Data(DAC_Align_8b_R, 60);//5
DAC_SetChannel1Data(DAC_Align_8b_R, 200);//0
/* Initializes ADC */
MCU_mV=(u16)Vdd_appli();
if(MCU_mV>2600)
VccLow=FALSE;
if(Supply_mV |
|