qucho
Posts: 1
Joined: Mon Apr 15, 2013 9:14 pm

BCM2835 ARM Peripherals Manual

Mon Apr 15, 2013 9:20 pm

I tried hard but cudnt understand how to pick stuff from this manual. I am following Alex's lessons (Baking PI). How exactly he picks address and use them in his code ? like GPIO controller example?

BrianW
Posts: 83
Joined: Sun Jul 29, 2012 9:03 pm

Re: BCM2835 ARM Peripherals Manual

Mon Apr 15, 2013 11:43 pm

The addresses in the documentation are given from the point of view of the video co-processor, which has its own MMU that maps the physical addresses of the hardware (0x2000000 onwards) to 0x7e000000.

In simple terms, subtract 0x7e000000 and add 0x20000000. For example, the first GPIO controller address is 0x7e200000 in the document, which is 0x20200000 in physical memory.

XainFaith
Posts: 19
Joined: Thu Apr 11, 2013 5:09 am
Location: Vancouver Island Canada

Re: BCM2835 ARM Peripherals Manual

Tue Apr 16, 2013 2:36 am

Just to add a bit if you have the manual and look at section 1.2.3 it will tell you the following,

Section 1.2.3 of the BCM2835-Arm-peripherals manual
"Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus
addresses for peripherals are set up to map onto the peripheral bus address range starting at
0x7E000000. Thus a peripheral advertised here at bus address 0x7Ennnnnn is available at
physical address 0x20nnnnnn."

what this tells you is that to access the peripherals via a physical address you can simply change the first 2 values of the hex address and the remaining bits will stay as the are shown in the manual.

BriainW has a great answer just wanted to show that it was in the manual.

Also remember that when working with bare metal unless you have the mmu turned on and mappings present you are working with physical address space.

Regards XainFaith

raspPipt
Posts: 8
Joined: Fri Apr 12, 2013 9:48 am

Re: BCM2835 ARM Peripherals Manual

Wed Apr 17, 2013 8:15 am

Hi all,

I'm trying to write a few driver for ARM11, using the Raspberry Pi board. The only document that I found is the "BCM2835 ARM Peripherals Manual", but it is not enough to help me. Could you suggest me other useful documents?

Thanks in advance.

User avatar
joan
Posts: 14748
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: BCM2835 ARM Peripherals Manual

Wed Apr 17, 2013 8:17 am

raspPipt wrote:Hi all,

I'm trying to write a few driver for ARM11, using the Raspberry Pi board. The only document that I found is the "BCM2835 ARM Peripherals Manual", but it is not enough to help me. Could you suggest me other useful documents?

Thanks in advance.
A driver for which operating system and what is it intended to do?

raspPipt
Posts: 8
Joined: Fri Apr 12, 2013 9:48 am

Re: BCM2835 ARM Peripherals Manual

Wed Apr 17, 2013 8:27 am

joan wrote:
raspPipt wrote:Hi all,

I'm trying to write a few driver for ARM11, using the Raspberry Pi board. The only document that I found is the "BCM2835 ARM Peripherals Manual", but it is not enough to help me. Could you suggest me other useful documents?

Thanks in advance.
A driver for which operating system and what is it intended to do?
I would write a few driver for freeRTOS, i.e. an UART driver.

User avatar
joan
Posts: 14748
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: BCM2835 ARM Peripherals Manual

Wed Apr 17, 2013 8:34 am

I'd guess there will be a quite a few bare metal examples of using the UART. They should fill in any documentation gaps.

raspPipt
Posts: 8
Joined: Fri Apr 12, 2013 9:48 am

Re: BCM2835 ARM Peripherals Manual

Wed Apr 17, 2013 9:10 am

Ok, thanks.

dwelch67
Posts: 962
Joined: Sat May 26, 2012 5:32 pm

Re: BCM2835 ARM Peripherals Manual

Thu Apr 18, 2013 5:53 am

raspPipt wrote:Hi all,

I'm trying to write a few driver for ARM11, using the Raspberry Pi board. The only document that I found is the "BCM2835 ARM Peripherals Manual", but it is not enough to help me. Could you suggest me other useful documents?

Thanks in advance.
the raspberry pi wiki page related to hardware

http://elinux.org/RPi_Hardware

Next to the link for the broadcom manual has a link to errata list, which is quite useful, at least for the bugs in the manual.

Other than that go with what joan said and look at the existing bare metal examples. Or ask some more directed questions in this forum, many of the authors of those bare metal examples check in here from time to time, if not someone who is hanging out here might happen to know or can figure it out...

David

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: BCM2835 ARM Peripherals Manual

Thu Apr 18, 2013 5:46 pm

raspPipt wrote:
joan wrote:
raspPipt wrote:Hi all,

I'm trying to write a few driver for ARM11, using the Raspberry Pi board. The only document that I found is the "BCM2835 ARM Peripherals Manual", but it is not enough to help me. Could you suggest me other useful documents?

Thanks in advance.
A driver for which operating system and what is it intended to do?
I would write a few driver for freeRTOS, i.e. an UART driver.
Depending on which UART you're tagreting, you want the peripherals datasheet, and the ARM PL011 documentation

raspPipt
Posts: 8
Joined: Fri Apr 12, 2013 9:48 am

Re: BCM2835 ARM Peripherals Manual

Fri Apr 19, 2013 4:10 pm

Ok, many thanks to all for the response.

Have a good week end!
Bye. ;)

Return to “Bare metal, Assembly language”