Pages: [1]   Go Down
Author Topic: Regs for timer  (Read 443 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 626
Posts: 34165
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: