Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown processor for B3? #6

Open
MihaMarkic opened this issue Apr 28, 2017 · 8 comments
Open

Unknown processor for B3? #6

MihaMarkic opened this issue Apr 28, 2017 · 8 comments

Comments

@MihaMarkic
Copy link

There is no processor defined for B3, it will throw when creating I2CDriver.

@spudwebb
Copy link

spudwebb commented May 8, 2017

I have a similar issue, it looks like recent kernels have changed the way the processor is reported. See content of /proc/cpuinfo below. Hardware is BCM2835 instead of BCM2709 in previous versions, so I guess some values should be added to the Processor enum list

pi@raspi:~ $ more /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

processor : 1
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

processor : 2
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

processor : 3
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt
vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

Hardware : BCM2835
Revision : a02082
Serial : 00000000a6e7f141

@MihaMarkic
Copy link
Author

Yeah, for the time being I simply use the same stuff as RPI 2. It works for me though I had to manually build all raspberry nugets I use.

@moelski
Copy link

moelski commented May 30, 2017

Hi !

I think this could be fixed by changing the "ProcessorName" Function:

        public string ProcessorName
        {
            get
            {
                // https://wiki.openwrt.org/toh/raspberry_pi_foundation/raspberry_pi
                switch (Model)
                {
                    case Model.A: return "BCM2708";
                    case Model.APlus: return "BCM2708";
                    case Model.BRev1: return "BCM2708";
                    case Model.BRev2: return "BCM2708";
                    case Model.BPlus: return "BCM2708";
                    case Model.ComputeModule: return "BCM2708";
                    case Model.B2: return "BCM2709";
                    case Model.Zero: return "BCM2708";
                    case Model.B3: return "BCM2709";  // BCM2710
                    default: return "UNKNOWN";
                }
            }
        }

Maybe there should be another addon to add the hardware type BCM2710 for the Pi 3. But it works with 2709, too.

regards Dominik

@Bulinlinbu
Copy link

Bulinlinbu commented May 30, 2017

Fixed adding "Bcm2835" in Processor.cs

@JTrotta
Copy link

JTrotta commented Aug 24, 2017

For CM3 (Compute Model 3) also needed to modify Board.cs:
`private Model LoadModel()
{
var firmware = Firmware;
switch (firmware & 0xFFFF)
{
case 0x2:
case 0x3:
return Model.BRev1;

            case 0x4:
            case 0x5:
            case 0x6:
            case 0xd:
            case 0xe:
            case 0xf:
                return Model.BRev2;

            case 0x7:
            case 0x8:
            case 0x9:
                return Model.A;

            case 0x10:
                return Model.BPlus;

            case 0x11:
                return Model.ComputeModule;

            case 0x12:
                return Model.APlus;

            case 0x1040:
            case 0x1041:
                return Model.B2;

            case 0x0092:
            case 0x0093:
                return Model.Zero;

            case 0x2082:
                return Model.B3;
            
            case 0x20A0:
                return Model.ComputeModule3;`

And
` private ConnectorPinout LoadConnectorPinout()
{
switch (Model)
{
case Model.BRev1:
return ConnectorPinout.Rev1;

            case Model.BRev2:
            case Model.A:
                return ConnectorPinout.Rev2;

            case Model.BPlus:
            case Model.ComputeModule:
            case Model.APlus:
            case Model.B2:
            case Model.Zero:
            case Model.B3:
            case Model.ComputeModule3:
                return ConnectorPinout.Plus;

            default:
                return ConnectorPinout.Unknown;
        }
    }`

@bellum128
Copy link

Will the nuget packages be updated with a fix for this issue?

@DWalton4
Copy link

Can anyone suggest an alternative package that works on recent vintage Pi's?

@bfsmithATL
Copy link

Hey DWalton4, check out this repo:
https://github.com/JTrotta/RaspberrySharp

Maintained nicely and this guy will likely have/create an update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants