fix nvic and clock setting