Jochen
Posts: 14
Joined: Fri Jul 27, 2012 7:20 pm

Issue number from RISCOS

Tue Dec 04, 2012 7:38 pm

Hello

Does anybody know how to find out what type of Rhaspberry Pi - issue 1 or issue 2 is in use? I find that a lot of my interfacing programs won't work properly with the latest Pis and it would be nice to fix all this automatically from within the programs.

Thanks for any help.

Jochen

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: Issue number from RISCOS

Tue Dec 04, 2012 10:27 pm

If you load the GPIO module you can use the gpiomachine command to identify which revision you have. Be careful though, it's not 100% reliable - it identifies my rev 1 as a rev 2.

Ta,
--
nr.

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: Issue number from RISCOS

Tue Dec 04, 2012 10:29 pm

Ah, I knew I'd done this from within a BASIC program:

Code: Select all

SYS "GPIO_GetBoard" TO a%
PRINT "GPIO_GetBoard returns: ";a%
SYS "GPIO_Info" TO low%,high%,list%

REM get the expansion port pins, 1 byte per pin, &FF terminator
PRINT "expansion port pins available:"
listelem% = 0
WHILE (listelem% <> 255)
  listelem% = ?list%
  PRINT listelem%
  list% = list% + 1
ENDWHILE

REM now get the aux port pins, same format
PRINT "aux port pins available:"
listelem% = 0
WHILE (listelem% <> 255)
  listelem% = ?list%
  PRINT listelem%
  list% = list% + 1
ENDWHILE

END
GPIO_GetBoard should return 11 for rev 1, 12 for rev 2. In my case, it returns 12, but the board is a rev 1.
--
nr.

Jochen
Posts: 14
Joined: Fri Jul 27, 2012 7:20 pm

Re: Issue number from RISCOS

Wed Dec 05, 2012 11:03 am

Thank you very much - I had missed that call.

In my case it works very well, 11 for issue 1 and 12 for issue 2. There are some things with issue 2 that give me trouble though. Particularly GPIO 2 and 3, which used to be 0 and 1. As yet I haven't managed to make them inputs. But I'm working on it.

Jochen

User avatar
Burngate
Posts: 6352
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Issue number from RISCOS

Wed Dec 05, 2012 12:15 pm

nr. wrote: GPIO_GetBoard should return 11 for rev 1, 12 for rev 2. In my case, it returns 12, but the board is a rev 1.
Is that to do with some of the early rev 2 boards being flashed with the wrong revision code - 5 instead of f?
Hasn't Dom put out a firmware update that specifically corrects that by reflashing the SoC?

nr.
Posts: 144
Joined: Wed Oct 03, 2012 8:51 am
Location: The Fens
Contact: Website

Re: Issue number from RISCOS

Wed Dec 05, 2012 12:46 pm

Burngate wrote:Is that to do with some of the early rev 2 boards being flashed with the wrong revision code - 5 instead of f?
Hasn't Dom put out a firmware update that specifically corrects that by reflashing the SoC?
But mine is a rev 1, being incorrectly identified as a rev 2.

Ta,
--
nr.

Return to “RISCOS”