Go to advanced search

by PlutoniumBob
Tue Mar 24, 2015 3:19 pm
Forum: Bare metal, Assembly language
Topic: Flushing UART Tx and Rx FIFO
Replies: 5
Views: 2917

Re: Flushing UART Tx and Rx FIFO

Awesome... Viva-La Bare-Metal... :lol:
by PlutoniumBob
Tue Mar 24, 2015 12:46 pm
Forum: Bare metal, Assembly language
Topic: Flushing UART Tx and Rx FIFO
Replies: 5
Views: 2917

Re: Flushing UART Tx and Rx FIFO

Hi Adam, in my stuff I usually expose a whole bunch of functions getc(), putc(), puts(), and flush() (even been known to do printf() from time to time). I call flush() when the app needs it rather than intrinsically when I call puts(), this allows me to do several puts()'es and then a flush(). e.g. ...
by PlutoniumBob
Mon Mar 23, 2015 9:39 pm
Forum: Bare metal, Assembly language
Topic: Flushing UART Tx and Rx FIFO
Replies: 5
Views: 2917

Re: Flushing UART Tx and Rx FIFO

Hi Adam, I also had problems with flushing the UART's internal pipe (although I was using the mini UART at the time). Try spinning on the BUSY bit of the FR register and see if that gets you where you want to go. Regards Bill inline void flush() { while ( ((volatile uint32_t)readRegister(UartRegiste...
by PlutoniumBob
Thu Mar 05, 2015 10:45 pm
Forum: Bare metal, Assembly language
Topic: RPi2 software reset/halt
Replies: 6
Views: 1468

Re: RPi2 software reset/halt

I also hooked a push-button up to the dev-reset jumper (P2) for those situations where you are totally hosed. It worked like a charm but that isn't what the OP asked for. Bill (assuming the RPi2 does support dev-reset) (yup there it is: marked up as 'run' on the board, but sadly missing from the RPi...
by PlutoniumBob
Tue Mar 03, 2015 12:46 pm
Forum: Bare metal, Assembly language
Topic: RPi2 software reset/halt
Replies: 6
Views: 1468

Re: RPi2 software reset/halt

Hi V,

I had a stab at this one a while ago:
http://www.raspberrypi.org/forums/viewt ... 72&t=53862

(watch the i/o addresses if your on a Pi2)

Regards
Bill
by PlutoniumBob
Fri Feb 06, 2015 9:35 pm
Forum: Bare metal, Assembly language
Topic: Trying Bare Metal on Raspberry Pi 2
Replies: 98
Views: 35259

Re: Trying Bare Metal on Raspberry Pi 2

4) yes. So we loose the top 16M page, no probs, I can see how keeping everything in the same 1G memory frame would be a good idea and it's still over 1,000,000,000 bytes... Hmmm, 16M, you do realize that is over 8000 Arduino Due's. (ATmega328's) :D And we can build two versions of our stuff and put...
by PlutoniumBob
Fri Feb 06, 2015 3:02 am
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 30190

Re: BCM 2836 and the RPi 2 ?

urm, as my interests mainly lie in 'bare-metal' programming (and my development work is done in a debian VM with a cross compiler and a serial link upload gizmo) this 'device tree' stuff isn't going to work for me so like the rest of us 'bare-metal' nerds I am going to have to use a #define for the...
by PlutoniumBob
Thu Feb 05, 2015 1:24 pm
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 30190

Re: BCM 2836 and the RPi 2 ?

I'm not sure there even is a 2836 document yet. As above, the 2835 one should cover almost everything - the only real difference in the chips is the change to quad-a7's, and the base address change, everything else is the same. See here for getting the base address https://github.com/raspberrypi/us...
by PlutoniumBob
Thu Feb 05, 2015 11:40 am
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 30190

Re: BCM 2836 and the RPi 2 ?

I'm not sure there even is a 2836 document yet. As above, the 2835 one should cover almost everything - the only real difference in the chips is the change to quad-a7's, and the base address change, everything else is the same. See here for getting the base address https://github.com/raspberrypi/us...
by PlutoniumBob
Wed Feb 04, 2015 11:14 pm
Forum: Bare metal, Assembly language
Topic: BCM 2836 and the RPi 2 ?
Replies: 95
Views: 30190

Re: BCM 2836 and the RPi 2 ?

The peripheral base address has changed - that can be recovered programatically, but otherwise all should be the same. How would you do this ? I didn't know this address could be found programatically. Best, V. More to the point what is the source of your documentation, how/when do we mere mortals ...
by PlutoniumBob
Sun Nov 23, 2014 2:52 pm
Forum: Bare metal, Assembly language
Topic: hardware environment
Replies: 14
Views: 2553

Re: hardware environment

It is not much more than that. You have to setup a small data structure of some words, poll a status register to be ready for write, write the structure address to a register, poll a register for the response status and read the response from a register. Than you can get the wanted values from the ...
by PlutoniumBob
Sun Nov 23, 2014 12:08 pm
Forum: Bare metal, Assembly language
Topic: hardware environment
Replies: 14
Views: 2553

Re: hardware environment

Hmmm yes, ATAGS, Mailbox...

I had considered those prior to my post...

I was looking for something a bit more more 'low-level' (i.e. peek a register and check a few bits to detect a B+)
that I can use prior to setting up the MMU, stacks and interrupts.

Nice One
Bob
by PlutoniumBob
Sat Nov 22, 2014 9:41 pm
Forum: Bare metal, Assembly language
Topic: hardware environment
Replies: 14
Views: 2553

hardware environment

Hi,

In a bare metal environment is there any ‘simple’ way that we can detect the hardware configuration (i.e. A, B, B+, 256M, 512M etc) on the ARM at startup (preferably in assembler).

Regards
Bob

EDIT: apologies in advance if this has been asked / answered before
by PlutoniumBob
Fri Aug 30, 2013 8:42 pm
Forum: Bare metal, Assembly language
Topic: Bare Metal Reboot
Replies: 4
Views: 2874

Re: Bare Metal Reboot

Hi all, based on the info pointed to by cp (above) I put together the following code snippet:- void rebootSystem() { const int PM_RSTC = 0x2010001c; const int PM_WDOG = 0x20100024; const int PM_PASSWORD = 0x5a000000; const int PM_RSTC_WRCFG_FULL_RESET = 0x00000020; PUT32(PM_WDOG, PM_PASSWORD | 1); /...
by PlutoniumBob
Thu Aug 29, 2013 12:09 pm
Forum: Bare metal, Assembly language
Topic: Bare Metal Reboot
Replies: 4
Views: 2874

Re: Bare Metal Reboot

Nice one Clark, that sounds workable,
I'll give it a go tonight and report back...
by PlutoniumBob
Mon Aug 26, 2013 8:34 am
Forum: Bare metal, Assembly language
Topic: Bare Metal Reboot
Replies: 4
Views: 2874

Bare Metal Reboot

Hi all, does anyone know how to make the PI reboot from bare metal assembler (in CODE). Not just reset the ARM CPU... Reset/Reboot the whole thing. I am doing BM-ASM-DEV via serial and I am using the reset header (P6) on my rev2 board but it would be great if I could cause my program to reboot the P...

Go to advanced search