demo: reset TDC core at startup

parent 460cec86
...@@ -284,8 +284,8 @@ int main(int i, char **c) ...@@ -284,8 +284,8 @@ int main(int i, char **c)
/* Display a banner as soon as possible to show that the system is alive */ /* Display a banner as soon as possible to show that the system is alive */
putsnonl(banner); putsnonl(banner);
crcsw(); crcsw();
tdc_reset();
while(1) { while(1) {
putsnonl("\e[1mTDC>\e[0m "); putsnonl("\e[1mTDC>\e[0m ");
......
...@@ -25,6 +25,11 @@ ...@@ -25,6 +25,11 @@
static volatile struct TDC_WB *tdc = (void *)0xa0000000; static volatile struct TDC_WB *tdc = (void *)0xa0000000;
void tdc_reset()
{
tdc->CS = TDC_CS_RST;
}
void rofreq() void rofreq()
{ {
int val; int val;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#ifndef __TDC_H #ifndef __TDC_H
#define __TDC_H #define __TDC_H
void tdc_reset();
void rofreq(); void rofreq();
void calinfo(); void calinfo();
void mraw(); void mraw();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment