Go to advanced search

by 27troadster
Wed Jan 11, 2017 11:39 pm
Forum: Bare metal, Assembly language
Topic: Working with an MMU
Replies: 7
Views: 2919

Re: Working with an MMU

I agree with dwelch. Have you set up the page tables? If not, the ARM ARM and the ARM 1176 tech manual talk about page tables and how to set them up. One thing I learned was: When entering the base address of the page table into TTRB0 or TTRB1, DO NOT shift the address 14 spaces to the left. The pag...
by 27troadster
Fri Jan 06, 2017 1:06 am
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi - SOLVED

UPDATE: Bottom Line Up Front: With respect to CSUD,neither the address passed to the DMA or the local variables on the stack (some of which use the DMA) are affected by L2 cacheing. It seemes only L1 cacheing affects the DMA and the Local variables on the stack. Problem: When data cacheing is enable...
by 27troadster
Sat Jan 23, 2016 4:25 pm
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi - UNSOLVED

Solved (at least solved good enough to work without errors): Short answer: To use data caching with CSUD we need to two things: (details are included below) 1) Put the entire stack at 0x4nnn nnnn. 2) Put the databuffer at alias 0x4nnn nnnn. Long answer: So I spent several days trying to figure out j...
by 27troadster
Thu Jan 21, 2016 2:55 am
Forum: Bare metal, Assembly language
Topic: Performance issue
Replies: 10
Views: 1984

Re: Performance issue

Here are the details: ... - My MMU maps the memory as section, with the S bit set in the mappings ... I'm pretty sure that having the S-bit set (designating the section of memory as "shared") will turn off level 1 data caching. From ARM1176 tech manual, pg 6-21, paragraph titled"shared normal memor...
by 27troadster
Mon Nov 30, 2015 10:57 pm
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi - UNSOLVED

Update: I’ve tracked the issue down to the call to HcdChannelTransmit. This is the same routine that was the issue before and it’s the only one that I can find that uses the DMA. Previously I thought I had fixed the issue by adding 0x4000.0000 to the address of databuffer and saving the new address ...
by 27troadster
Sun Nov 29, 2015 5:25 am
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi - UNSOLVED

So I thought I had this “SOVLED”, but no, hence the title name change to “UNSOLVED” The above solution works, IF data caching is turned on after the first call to ReadLine in the file “terminal.s” If I enable data caching before this, the computer locks somewhere in the ReadLine function. I found th...
by 27troadster
Wed Nov 25, 2015 12:59 am
Forum: Bare metal, Assembly language
Topic: STICKY: Bare Metal resources
Replies: 26
Views: 108938

Re: Bare Metal resources

Coprocessor register values upon boot to bare metal:

viewtopic.php?f=72&t=126891
by 27troadster
Tue Nov 24, 2015 11:06 pm
Forum: Bare metal, Assembly language
Topic: RPi B+ Coprosser 15 register settings upon start up
Replies: 1
Views: 3133

RPi B+ Coprosser 15 register settings upon start up

In order to know how the arm on the BCM2835 is set up upon booting to a bare metal program, I went through and read all the coprocessor 15 registers and combined that with information from the arm1176 tech manual. I am posting it here for everyone to use. The format of the following is: The mrc inst...
by 27troadster
Tue Nov 24, 2015 10:45 pm
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi

Solved: I added the following to csud-master/source/hcd/dwc/designware20.c void setDatabuffer(u8 buffer){ databuffer = buffer; } Then I made a "databuffer" in main.s, with 0x4000 bytes allocated (because the databuffer in designware20.c pointed to a section of memory that csud calls the "heap" and i...
by 27troadster
Wed Nov 11, 2015 2:40 pm
Forum: Bare metal, Assembly language
Topic: Where to post a bare metal project?
Replies: 1
Views: 641

Where to post a bare metal project?

I would like to start a thread to share a project I'm working on so that it and my "lessons learned" can be useful to others. It is a digital O-scope with frequency spectrum analyzer (which is really just a steping stone to a scratch built CNC machine for grinding automovite camshafts) that I'm writ...
by 27troadster
Wed Nov 04, 2015 10:22 am
Forum: Bare metal, Assembly language
Topic: Dedicating one core to hard realtime tasks
Replies: 26
Views: 11847

Re: Dedicating one core to hard realtime tasks

Joan, Your statement is correct. The set up: For a camshaft grinder, the cam turns at a constant angular velocity*. As the cam turns, the grinding wheel moves in a radial direction in and out to grind the lobe profile. The 7 second angular resolution is for the cam, which will be driven by a regular...
by 27troadster
Mon Nov 02, 2015 7:57 am
Forum: Bare metal, Assembly language
Topic: Dedicating one core to hard realtime tasks
Replies: 26
Views: 11847

Re: Dedicating one core to hard realtime tasks

uhrheber, I know it's been a few months since you posted your question but thought I’d try to help in case you periodically reviewed your posts. I am familiar with B++ Pi, and haven't dealt with Pi2. I am working on building a CNC cam grinding machine from scratch. (There are other ways to do it, to...
by 27troadster
Sat Oct 17, 2015 1:53 pm
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi

thanks rst and Ultibo, So I guess I don't quite understand L2 and the memory map. 1) I assumed since physical memory stopped at 0x4000.0000 that the MMU memory map (ie page table entries) stopped at 0x4000.0000, but am I wrong on that point? 2) Do the memory attributes that I set in the page table g...
by 27troadster
Mon Oct 12, 2015 8:19 am
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Re: Data Cache not working with Baking Pi

Thanks rst! Your post pointed me in the right direction that eventually led me to be able to make it work....mostly… The post you referred to is: “memset performance,” by hldswrth on Mon Feb 24, 2014 5:36 pm. For those interested in doing the same, it's not as straight forward as one might assume, t...
by 27troadster
Fri Oct 02, 2015 8:38 am
Forum: Bare metal, Assembly language
Topic: Data Cache not working with Baking Pi - SOLVED
Replies: 11
Views: 3924

Data Cache not working with Baking Pi - SOLVED

Hi all, I am learning about Assem and RPi, I’ve made significant headway thanks to Alex Chadwick, David Welch and others, thanks for your postings. I’ve read the ASM ref man, 1176 tech man and Broadcom’s manual, and I’m having problems with the following, hopefully someone knows the “trick” or bit o...
by 27troadster
Wed Sep 02, 2015 6:47 am
Forum: Bare metal, Assembly language
Topic: RPi 2B state after boot?
Replies: 8
Views: 1558

Re: RPi 2B state after boot?

turbo, RPi state after boot.... To figure this out, I wrote a small program based on Alex Chadwick's Screen 04 that read and output to the screen all of the registers from Coprocessor 15, then used the 1176 tech man to decipher register numbers. Unfortunately all that info is on a different computer...

Go to advanced search