Raspberry pi: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
Line 133: Line 133:
== List of devices ==
== List of devices ==


* pi the original
'''pi the original'''


<pre>
<pre>
Line 164: Line 164:


</pre>
</pre>
'''PI the inegrated wifi'''

Revision as of 03:09, 23 May 2017

crypto for pi?

googled "cryto offload for raspberry pi" feb 4th 2016:

https://jbdatko.files.wordpress.com/2014/07/cryptomakers_nopause.pdf

https://news.ycombinator.com/item?id=9436284

...
jwr 285 days ago

I think you are entirely missing the point of these Atmel chips.
More generally (and this is not necessarily addressed to you specifically), I find the knee-jerk response of "just use a Raspberry Pi" amusing. I design embedded systems. Raspberry Pi is, at a first approximation, completely useless, for any task you might want to throw at it.
There are many reasons. Power consumption, complexity, failure rate, poor reliability, reliance on SD cards, poor SD card reliability, poor peripherals, poor documentation, I could go on. RPI has two things going for it: 1) the video processing peripherals, 2) publicity/popularity.
Now, when thinking about embedded systems, most of the time I won't even consider things the size of a Pi (or the much, much better BeagleBone Black). They are monsters, enormously complex and power-hungry beasts. What I will consider are MSP430s, STM32s, Kinetis K and L, and similar — so ARM Cortex M0, M0+ and M4 cores, running at about 50MHz, consuming around 60mW of power (about as much as an LED), and taking up about, say, 8mm2 of board space (that includes all necessary passives). These are well documented, have reasonable complexity, and can be programmed carefully to achieve excellent reliability.
These systems also need crypto, and by crypto I don't just mean "accelerated AES". The Atmel security line is not just "accelerators".
In other words, this board is a very interesting prototyping tool, and no, the answer to any problem is not "just use a Raspberry Pi".


Mounting the sd card

under windows host virtual box

.\VBoxManage.exe internalcommands createrawvmdk -filename "C:\data\VirtualBox VMs\head 100\sdc.vmdk" -rawdisk \\.\PhysicalDrive2


links

serial

source: http://elinux.org/RPi_Serial_Connection

  • Speed (baud rate): 115200
  • Bits: 8
  • Parity: None
  • Stop Bits: 1
  • Flow Control: None

Be sure to connect TX RX and Ground

Took me some time to get this to work.

1. when i had the ground not connected I got spurious characters in the boot process.

2. when I didn't have flow control none I could see the boot process clean but could not type anything.

GPIO

pi@raspberrypi:~ $ sudo apt-get install wiringpi
Reading package lists... Done
Building dependency tree
Reading state information... Done
wiringpi is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
pi@raspberrypi:~ $ gpio -v
gpio version: 2.32
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Pi Zero, Revision: 03, Memory: 512MB, Maker: Sony
  * Device tree is enabled.
  * This Raspberry Pi supports user-level GPIO access.
    -> See the man-page for more details
    -> ie. export WIRINGPI_GPIOMEM=1
pi@raspberrypi:~ $ gpio readall
 +-----+-----+---------+------+---+-Pi Zero--+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5V      |     |     |
 |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |
 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI |   IN | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK |   IN | 0 | 23 || 24 | 1 | IN   | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |
 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
 |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
 |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  |
 |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |
 |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |
 |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |
 |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+-Pi Zero--+---+------+---------+-----+-----+
pi@raspberrypi:~ $

i2c stuff

used adafruit wonderful clear funtional guide: https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

Copied a python script from here htu21d.py https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=76688

https://github.com/dalexgray/RaspberryPI_HTU21DF

RTC Setup

did this, it worked:

http://www.raspberrypi-spy.co.uk/2015/05/adding-a-ds3231-real-time-clock-to-the-raspberry-pi/

temp + pressure

I'd like to do this:

BME280 I2C

http://www.raspberrypi-spy.co.uk/2016/07/using-bme280-i2c-temperature-pressure-sensor-in-python/

AWs IOT python style

http://docs.aws.amazon.com/iot/latest/developerguide/iot-device-sdk-c.html

https://github.com/aws/aws-iot-device-sdk-python

List of devices

pi the original

[    0.000000] Linux version 4.4.38+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #938 Thu Dec 15 15:17:54 GMT 2016
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine model: Raspberry Pi Zero Rev 1.3
[    0.000000] Kernel command line:
    dma.dmachans=0x7f35
    bcm2708_fb.fbwidth=656
    bcm2708_fb.fbheight=416
    bcm2708.boardrev=0x900093 bcm2708.serial=0xbcfc0185
    smsc95xx.macaddr=B8:27:EB:FC:01:85
    bcm2708_fb.fbswap=1
    bcm2708.uart_clock=48000000
    bcm2708.disk_led_gpio=47
    vc_mem.mem_base=0x1ec00000
    vc_mem.mem_size=0x20000000
    dwc_otg.lpm_enable=0
    console=ttyAMA0,115200
    console=tty1
    root=/dev/mmcblk0p2
    rootfstype=ext4
    elevator=deadline
    fsck.repair=yes
    rootwait
[    0.000000] Memory: 436516K/458752K available (6063K kernel code, 437K rwdata, 1844K rodata, 376K init, 726K bss, 14044K reserved, 8192K cma-reserved)
...
[    0.665568] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-12-09 15:11

PI the inegrated wifi