大家好:
ADC Init是这样的:
CLK_PCKENR2 | = 0x08;
ADC_CSR = 0x05; // CH0〜CH5
ADC_CR1 = 0x22; // f / 4,CONT转换
ADC_CR2 = 0x08; // ALIGN right,扫描模式
// ADC_CR3 = 0x80; //启用数据buff
ADC_TDRL = 0xff; //禁用ch0~ch7的smitt
ADC_CSR | = 0x20; //启用eoc int,
ADC_CR1 | = 0x01; //开始转换
但使用stlink的模拟无法进入adc1中断处理程序,为什么?有人可以帮助我,我正在使用stvd4.12和cosmic 16k verstion,谢谢!
克里斯
以上来自于谷歌翻译
以下为原文
Hello,Everyone:
The ADC Init is like this:
CLK_PCKENR2 |=0x08;
ADC_CSR = 0x05; //ch0~ch5
ADC_CR1 = 0x22; //f/4,CONT convertion
ADC_CR2 = 0x08; //ALIGN right,scan mode
//ADC_CR3 = 0x80; //enable data buff
ADC_TDRL = 0xff; //disable the smitt of ch0~ch7
ADC_CSR |= 0x20; //enable eoc int,
ADC_CR1 |=0x01; //start convertion
but the simulation using stlink can not enter into adc1 Interrupt handler,why? Can someone here help me, I'm using stvd4.12 and cosmic 16k verstion,thanks!
chris
大家好:
ADC Init是这样的:
CLK_PCKENR2 | = 0x08;
ADC_CSR = 0x05; // CH0〜CH5
ADC_CR1 = 0x22; // f / 4,CONT转换
ADC_CR2 = 0x08; // ALIGN right,扫描模式
// ADC_CR3 = 0x80; //启用数据buff
ADC_TDRL = 0xff; //禁用ch0~ch7的smitt
ADC_CSR | = 0x20; //启用eoc int,
ADC_CR1 | = 0x01; //开始转换
但使用stlink的模拟无法进入adc1中断处理程序,为什么?有人可以帮助我,我正在使用stvd4.12和cosmic 16k verstion,谢谢!
克里斯
以上来自于谷歌翻译
以下为原文
Hello,Everyone:
The ADC Init is like this:
CLK_PCKENR2 |=0x08;
ADC_CSR = 0x05; //ch0~ch5
ADC_CR1 = 0x22; //f/4,CONT convertion
ADC_CR2 = 0x08; //ALIGN right,scan mode
//ADC_CR3 = 0x80; //enable data buff
ADC_TDRL = 0xff; //disable the smitt of ch0~ch7
ADC_CSR |= 0x20; //enable eoc int,
ADC_CR1 |=0x01; //start convertion
but the simulation using stlink can not enter into adc1 Interrupt handler,why? Can someone here help me, I'm using stvd4.12 and cosmic 16k verstion,thanks!
chris
举报