Go to advanced search

by colinh
Thu Jan 09, 2014 11:09 am
Forum: Bare metal, Assembly language
Topic: JTAG using P2 header
Replies: 4
Views: 1920

JTAG using P2 header

I've read dwelch's pages on getting JTAG working using the P1 pins. But that requires special bootloaders etc to get the IO pins configured correctly. Since P2 seems to connect directly to the JTAG lines, I thought I'd rather use those. I've soldered in a post connector. Now I have a question though...
by colinh
Thu Jan 09, 2014 11:04 am
Forum: Bare metal, Assembly language
Topic: Getting MMU configured (so that D-cache works)
Replies: 7
Views: 3645

Getting MMU configured (so that D-cache works)

Sooo, I'm trying to get the L1 data-cache enabled, which requires the MMU to be running. I've looked at various examples of setting up MMU for ARM1176JZF-S on the web. Including dwelch's. And it's refusing to work :cry: My table is filled, TTBR0 has the address, caches are invalidated and cleaned, u...
by colinh
Thu Jan 09, 2014 10:52 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

OK, the problem is at least clear that I don't have data-cacheing turned on.

And that's because I don't have the VMSA MMU set up, ie. the pagetable configured properly.

I'll start another thread with a better title...
by colinh
Thu Jan 09, 2014 10:50 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

Hmmm. I haven't got as far as DMA (or VFP) yet ...

Regarding MMU and caches, all I found was that he enables I and D caches (or thinks he does? :mrgreen: ) in e.g. VFP/Fractal/Julia/kernel.asm

- but I don't see him activating the MMU there. Then I-cache works, but D-cache doesn't...
by colinh
Tue Jan 07, 2014 9:20 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

Ah, thanks. I'm not running Linux - but I'll have to start looking at the source code sooner or later 8-)

colin
by colinh
Tue Jan 07, 2014 9:03 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

I wasn't sure about enabling the MMU. There is mention of main memory needing to be cachable - an MMU attribute. I didn't see whether memory is considered cachable if the MMU is off (*) ... I'll try it - but then I need to configure the MMU, I guess. Regarding TCM, MRC p15,0,r11,c0,c0,2 // returns T...
by colinh
Tue Jan 07, 2014 5:04 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

... a few minutes later, read all(*) the TRM ... :geek: and enabled caches (but not TCM and MMU) with MRC p15,0,r0,c1,c0,0 // read Control Register configuration orr r0, #1<<2 // C bit: enable lvl 1 D-cache orr r0, #1<<11 // I bit: enable lvl 1 I cache orr r0, #1<<12 // Z bit: enable flow (branch) p...
by colinh
Mon Jan 06, 2014 11:53 pm
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

Ok, reading dwelch's reply to a MMU question below, I guess I don't have any caching turned on, as such. I thought I did, because of the config.txt option: disable_l2cache disable ARM access to GPU's L2 cache. Needs corresponding L2 disabled kernel. Default 0 and The Raspberry Pi config.txt file is ...
by colinh
Mon Jan 06, 2014 11:42 pm
Forum: Beginners
Topic: Overclocking issues
Replies: 1
Views: 487

Re: Overclocking issues

Hmm, I'm having "issues" myself with bare metal (no linux). Still researching...

colin
by colinh
Mon Jan 06, 2014 11:37 pm
Forum: Media centres
Topic: Overclock for Openelec
Replies: 2
Views: 1714

Re: Overclock for Openelec

Normally the thing is to simply try it out:

a) increasing the clock speeds gradually, until things start to go wrong, ie. some test program crashes.
b) Then increase the voltage until things work again.
c) go back to a) and repeat until the temperature starts getting too high.


colin
by colinh
Mon Jan 06, 2014 12:10 pm
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Re: Memory access too slow?

Argh! I'm getting more and more confused :( I tried deliberately mis-aligning both from and to locations by 1 byte. Then I got an *improvement* to delta T = 0x17B7 ie. 6071 µs --> 0.973 µs / char --> 263 Mbyte/s Now re-aligning, mis-aligning, overclocking or not all makes no difference!!! *sigh* Tim...
by colinh
Mon Jan 06, 2014 10:33 am
Forum: Bare metal, Assembly language
Topic: Memory access too slow?
Replies: 11
Views: 3052

Memory access too slow?

Hi, I'm trying to do some copying within the framebuffer memory. I started originally from Alex's Baking Pi, so I have 8x16 chars with 16bpp. My *test* code :roll: doesn't check its inputs... .global blit_row_2 // copies 1 row (16 lines) of screen buffer from one memloc (m0) to another (m1) blit_row...
by colinh
Mon Jan 06, 2014 9:36 am
Forum: Bare metal, Assembly language
Topic: Alignment configuration
Replies: 5
Views: 1862

Re: Alignment configuration

See also https://github.com/simonjhall/copies-and-fills if you haven't already.

colin
by colinh
Sun Dec 22, 2013 8:14 pm
Forum: Bare metal, Assembly language
Topic: System Timer Interrupts? (Or using interrupts at all)
Replies: 12
Views: 17622

Re: System Timer Interrupts? (Or using interrupts at all)

Sidetracking my own thread... Microcontroller, microprocessor, SOC, cores, architectures -- the documentation often seems problematic in one way or another. Either things are not documented, or it comes in 1000 page multi-volume tomes. My worst experience was trying to go through the Texas Instrumen...
by colinh
Sun Dec 22, 2013 1:49 pm
Forum: Bare metal, Assembly language
Topic: Port xv6 to Raspberry Pi: status update
Replies: 9
Views: 5344

Re: Port xv6 to Raspberry Pi: status update

Nice. 5 days from first post to "The porting is semi-complete" :-)

I'll be taking a look at the IRQ stuff too...
by colinh
Sun Dec 22, 2013 1:42 pm
Forum: Bare metal, Assembly language
Topic: Pete Cockerell's ARM Assembly Language Programming Book
Replies: 5
Views: 3563

Pete Cockerell's ARM Assembly Language Programming Book

This excellent book is a wonderful introduction to ARM assembler. It deals with the ancient ARM2 processor (as used in the original Acorn Archimedes computer - back when ARM was Acorn RISC machine :-) ) but almost all of it is still relevant. Pete has kindly made it available for free at http://www....
by colinh
Sun Dec 22, 2013 1:33 pm
Forum: Bare metal, Assembly language
Topic: System Timer Interrupts? (Or using interrupts at all)
Replies: 12
Views: 17622

System Timer Interrupts? (Or using interrupts at all)

Hi there. Section 12 (System Timer) of SoC-Peripherals.pdf states that: "<blah, blah> output compare register <blah, blah> free running counter values. When the two values match, the system timer peripheral generates a signal to indicate a match for the appropriate channel. The match signal is then ...
by colinh
Tue Dec 10, 2013 7:54 am
Forum: Advanced users
Topic: raspberry pi ECM for cars?
Replies: 15
Views: 14012

Re: raspberry pi ECM for cars?

And there was me thinking he needed electronic countermeasures for his car ... :shock:

Go to advanced search