本帖最后由 hongcky 于 2011-11-3 15:41 编辑
找到问题所在了。
用在线调试,运行到下面这段代码。-
- __INLINE__ look::systick_t::systick_t(uintptr_t reload, uint_fast8_t priority)
- {
- vector_t::table[0].attach(this);
- *reinterpret_cast<volatile uint8_t*>(0xe000ed23) = priority;
- volatile uintptr_t* scs = reinterpret_cast<volatile uintptr_t*>(0xe000e000);
- __asm__ __volatile__("" : "+r" (scs));
- scs[5] = reload;
- scs[4] = 7;
- }
SCS[4]地址是0xE000E010,即SYST_CSR=7,第2位为1。
系统节拍使用的时钟为内核时钟

这里选择的时钟不起作用了。
|