Go Down

Topic: Regs for timer (Read 501 times) previous topic - next topic

Cocobio

I tried to find any info before i making this post....
I didnt found any of it.

I'm trying to access to the RTT_VR that is mension in the datasheet.

I want to be able to read the value of the timer at a surtain point.

PS: English is not my native language, so... sorry if i couldnt explain my self in a better way.

Grumpy_Mike

Most of the register addresses are pre defined constants, just use them to read and write to.

Cocobio

maybe im not accessing to them properly, i cant use TC_CV, it said that was not declare in this scope

Grumpy_Mike

Look at the data sheet. Is is called that exactly?

Grumpy_Mike

If you look at the data sheet you will see there is no register called TC_CV, there is however a TC_CV0, TC_CV1 and TC_CV2.
It also tells you the address, each register occupies four bytes:-
Quote
37.7.13 Name:
Address: Access:
TC Counter Value Register
TC_CVx [x=0..2]
0x40080010 (0)[0], 0x40080050 (0)[1], 0x40080090 (0)[2], 0x40084010 (1)[0], 0x40084050 (1)[1], 0x40084090 (1)[2], 0x40088010 (2)[0], 0x40088050 (2)[1], 0x40088090 (2)[2]
Read-only •   CV: Counter Value
CV contains the counter value in real time.

Go Up