Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 6887|Reply: 8

[Bare metal] Reading the 64-bit counter

[Copy link]

2

Threads

3

Posts

10

Credits

Novice

Rank: 1

Credits
10
Post time 2018-6-15 19:20:29 | Show all posts |Read mode
Edited by rpidmx512 at 2018-6-15 12:23

Example for how to read the 64-bit counter

  1. .macro FUNC name
  2. .text
  3. .code 32
  4. .global \name
  5. \name:
  6. .endm

  7. FUNC h3_read_cnt64
  8.         mov        r2, #0x1e00
  9.         mov r0, #2
  10.         movt r2, #0x1f0
  11.         str r0, [r2,#0x80]
  12. 1:
  13.         ldr r3, [r2,#0x80]
  14.         tst r3, #2
  15.         bne 1b
  16.         ldrd r0,r1,[r2,#0x84]
  17.         bx lr
Copy the Code

9

Threads

27

Posts

286

Credits

Intermediate member

Rank: 3Rank: 3

Credits
286
Post time 2018-6-30 14:12:12 | Show all posts
dmx512 replied at 2018-6-27 00:58
What is this code used for ?

It's used for reading the 64 bit counter.

I was using the memory mapped register method for a system timer until I realised that just using the coprocessor interface for it was far simpler.
That single line I provided reads the 64 bit counter via the coprocessor interface instead of the memory mapped interface. That's all. It grabs the whole 64 bits at once and puts them into two registers. My example uses a1 and a2, or if you like R0 and R1. Same thing. I believe they cn be any general purpose registers though.


9

Threads

27

Posts

286

Credits

Intermediate member

Rank: 3Rank: 3

Credits
286
Post time 2018-6-23 09:45:36 | Show all posts
Edited by ImmortanJoe at 2018-6-23 09:48

    MRRC   p15, 0, a1, a2, c14

copypasted from my code. a1 is low word. a2 is high word.
e:This is for the H3. It'd probably be similar on other SoCs.

27

Threads

64

Posts

1606

Credits

Gold member

Rank: 6Rank: 6

Credits
1606
Post time 2018-6-27 00:58:46 | Show all posts
  1. MRRC   p15, 0, a1, a2, c14
Copy the Code

What is this code used for ?

9

Threads

27

Posts

286

Credits

Intermediate member

Rank: 3Rank: 3

Credits
286
Post time 2018-7-1 10:51:28 | Show all posts
Edited by ImmortanJoe at 2018-7-1 10:59

Besides the H3 datasheet, the following documents are extremely useful regarding working with the H3:

* ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition
* Cortex -A7 MPCore Technical Reference Manual
* CoreLink GIC-400 Generic Interrupt Controller Technical Reference Manual
* Allwinner DE2.0 Specification
* Enhanced Host Controller Interface Specification for Universal Serial Bus
* i.MX 6Dual/6Quad Applications Processor Reference Manual (for the graphics hardware)
e: Forgot to say before the MPCore TRM is where a lot of useful things are like coprocessor interface information. The H3 core doesn't really seem to have been altered from the A7 MPCore design in any significant way.

27

Threads

64

Posts

1606

Credits

Gold member

Rank: 6Rank: 6

Credits
1606
Post time 2018-7-12 03:18:20 | Show all posts
ImmortanJoe replied at 2018-6-30 07:12
It's used for reading the 64 bit counter.

I was using the memory mapped register method for a sys ...

This is great information. Thank you!
Post time 2021-11-29 01:38:25 | Show all posts

Top Dog Protection Training Url

To the person talking about dog training manchester tn, dog training classes prices orange county, dog training classes london ontario,  I highly suggest this updated K9 training info or dog training school near me, dog training treats all natural, puppy training treats healthy, are dog training collars safe, big bag of dog training treats, and don't forget this updated dog protection training forum and don't forget puppy training near me orange county, stretch dog training wirral, gun dog training bristol, dog training treats recipes orange county, dog trainers near me aggression, as well as this top rated dog trainer details which is also great. Also have a look at this recommended dog protection training details as well as dog training classes coventry, puppy classes near me prices, dog training classes near me prices, dog training bristol tn, what qualifications do i need to be a dog trainer orange county, as well as this new dog protection training forum not to mention dog training courses birmingham orange county, dog training treat pouch with belt, homemade dog training treats recipes vet approved, best online dog training courses orange county, dog obedience school near me prices, alongside all updated K9 training url which is also worth a look. I also recommend this top rated K9 training site on top of dog training courses online australia, dog training collars ebay australia, dog trainers near me that come to your home, dog training treats all natural, how to get a dog to stop pulling while on a leash, alongside all this awesome dog trainer tips on top of dog agility classes north london, dog training bristol ct, dog trainers manchester orange county, puppy training bristol ct, dog training school online, as well as recommended dog trainer blog which is also great. Finally, have a look at this top dog protection training forum for good measure. Check o_obutfasttips and more Top Rated New Site 7afcb2a
Post time 2021-12-19 23:37:53 | Show all posts

Hebat Sbobet Asia Link

Menanggapi pria bertanya tentang slot gacor selain pragmatic, slot pulsa tanpa potongan gacor, judo sloth gaming real name,  Saya sangat menyarankan ini lihat login sbobet url or situs judi bola deposit pulsa 10rb tanpa potongan, situs judi bola terbesar di indonesia, judi slot via pulsa indosat, game slot pragmatic gacor hari ini, slot pakai pulsa 3, bersama semua ini lihat sbobet login domain di atas ini situs slot online paling gacor, situs judi online24jam terpercaya 2020, situs judi bola resmi di indonesia, situs judi slot online terpercaya 2021 via dana, nama nama situs judi slot online deposit pulsa tanpa potongan, dan juga ini baru sbobet asia toko which is also great. Also have a look at this luar biasa blog dan jangan lupa ini link slot gacor terbaru 2021, slot deposit pulsa indosat 5000, daftar situs judi bola resmi dan terpercaya, main slot pakai pulsa tri, situs judi togel slot online terpercaya 2021, di atas ini peringkat tertinggi sbobet88 login domain dan jangan lupa ini situs judi slot deposit pulsa xl 10rb tanpa potongan, link slot gacor hari ini, link slot deposit pulsa indosat tanpa potongan, situs judi slot terbaik dan terpercaya 2021, slot online terbaik sultan play, bersama semua ini membantu login sbobet situs yang juga layak untuk dilihat. Saya juga menyarankan ini peringkat tertinggi login sbobet blog bersama semua ini judi slot online terbaru 2021, situs judi resmi idn, slot deposit pulsa 5000 tanpa potongan bonus 100, situs judi togel resmi dan terpercaya, slot joker123 deposit pulsa 5000 tanpa potongan, di atas ini lihat sbobet situs belum lagi ini situs judi slot online terpercaya 2020 deposit pulsa tanpa potongan, slot pulsa tanpa potongan xl, slot pulsa tanpa potongan, game slot yang lagi gacor hari ini, slot online pulsa m3, dan jangan lupa ini luar biasa judi sbobet domain yang juga hebat. Akhirnya, lihat ini hebat sbobet88 login toko and trik gacor slot pragmatic, agen judi bola terpercaya di indonesia, slot online terbaik 2020,  untuk memastikan ekstra. Lihat lainnya High Rated Lzf Lighting Info 86ea4c5
Post time 4 day(s) ago | Show all posts

Updated MINT Thread Lift Near Me Link

In response to the person talking about pdo threads training london sarasota, cog thread lift side effects sarasota, mini facelift cost sarasota, pdo threads before and after pics sarasota, pdo thread brow lift sarasota, nose thread lift before and after pictures sarasota, best liquid rhinoplasty near me sarasota,  I highly recommend this useful Non surgical Facelift sarasota advice or jawline lift cost sarasota, cheek thread lift price sarasota, cheek fillers lift eyes sarasota, mint threads before and after sarasota, how to use pdo threads sarasota, pdo smooth threads near me sarasota, mint threads uk sarasota, alongside all this cool jawline lift sarasota tips not to mention non surgical thread brow lift sarasota, non surgical jowl lift nz sarasota, mini facelift uk sarasota, cheek fillers lift eyes sarasota, jowl lift cost uk sarasota, how much is a pdo brow lift sarasota, non surgical thread lift uk sarasota, and don't forget this top rated Non surgical Facelift sarasota blog which is also great. Also have a look at this great pdo thread lift eyebrow sarasota tips alongside all forma non surgical facelift near me sarasota, jowl lift cost sarasota, liquid nose job cost near me sarasota, liquid rhinoplasty manchester sarasota, nose thread lift price philippines sarasota, non surgical thread face lift uk sarasota, what is hiko nose lift sarasota, as well as this top MINT Thread Lift Near Me forum alongside all liquid rhinoplasty recovery time sarasota, needleless pdo thread lift review sarasota, mint thread lift aftercare sarasota, is a mini facelift worth it sarasota, what is hiko nose lift sarasota, what is the cost of a thread lift sarasota, pdo thread lift nyc reviews sarasota, and don't forget new mini face lift sarasota tips which is also worth a look. I also suggest this high rated MINT Thread Lift Near Me site on top of best liquid rhinoplasty near me sarasota, mini facelift cost sydney sarasota, pdo thread eyebrow lift near me sarasota, non surgical facelift uk cost sarasota, non surgical neck lift sarasota, how long do nose threads last sarasota, mint threads aftercare sarasota, on top of this cool jawline lift sarasota advice not to mention jawline lift without surgery sarasota, Lifting Threads sarasota, pdo thread lift cost san antonio tx sarasota, lifting threads types sarasota, cheek lift uk price sarasota, aptos thread lift near me sarasota, pdo threads training uk sarasota, alongside all useful Non surgical Facelift sarasota details which is also great. Finally, have a look at this high rated non surgical neck lift sarasota details for good measure. Check more Peringkat Tertinggi Jaya365 Halaman 2a6ce6c
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2022-1-22 08:26 GMT+8 , Processed in 0.039168 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list