embeded/raspberry pi2016. 5. 23. 11:41

음? mpeg2 decoder?




[링크 : http://www.raspberrypi.com/license-keys/]

    This key will enable a single Raspberry Pi to decode MPEG-2 video in hardware.

    [링크 : http://www.raspberrypi.com/mpeg-2-license-key/]

    This key will enable a single Raspberry Pi to decode VC-1 video in hardware.

    [링크 : http://www.raspberrypi.com/vc-1-license-key/]



H.264 encode


Alongside MPEG-2 support (which you’ll have to pay for), we’re making H.264 encode available for free. The hardware has always been capable of supporting H.264 encode, but we were under the misapprehension that encode required an additional licence fee, so were waiting until the camera board release (which is still coming later in the year) before spending the money to enable it.

MPEG-2 지원과 동시에(지불해야 할 필요가 있는), H.264 인코더는 무료로 사용이 가능하도록 하였습니다. 하드웨어는 항상 h.264 인코드를 지원할 능력을 갖추고 있습니다만, 추가적인 라이센스 요금을 요구한다는 오해가 있었고, 그것을 활성화 하기 위해 돈을 쓰기 전에 (몇 년 후에나 나올) 카메라 보드가 릴리즈 되기 까지 기다렸습니다


During the course of talking to the MPEG LA about the MPEG-2 licence, we discovered that the existing licence fee that is already baked into the cost of the Raspberry Pi actually covers both encode and decode – I tell you, this stuff is arcane – so we’ve enabled the relevant OpenMAX components by default in the latest firmware. It may take a while for someone to produce an encoder application which uses these components, but once they do you should be able to use the Pi as a standalone transcoder.

MPEG LA와의 MPEG-2 라이센스에 대한 회의를 거쳐, 우리는  라즈베리 파이의 비용에 포함되어 있는 이미 존재하는 라이센스 비용은 실제로 인코딩과 디코딩을 모두 포함한다는 내용들을 발견했습니다 -당신에서 말하겠지만, 이것은 매우 불가사의한 사항입니다 - 그래서 우리는 최신 펌웨어에 기본으로 적절한 OpenMAX 콤포넌트를 가능하도록 하였습니다. 이 콤포넌트들을 사용할 엔코더 어플리케이션 누군가가 만드는데 시간이 걸리겠지만, 그들은 당신이 라즈베리 파이를 독립형 트랜스코더로 사용할 수 있수 있도록 할 것입니다. 

[링크 : https://www.raspberrypi.org/blog/new-video-features/]


[링크 : http://elinux.org/RPiconfig#Licensed_Codecs]


[링크 : http://raspberrypi.stackexchange.com/.../why-does-the-raspberry-pi-need-a-mpeg-2-licence]


DVD 재생시 영상을 디코딩 못하므로 MPEG-2 라이센스 필요?

[링크 : http://echo.tistory.com/93]

[링크 : http://echo.tistory.com/92]


vcgencmd codec_enabled MPG2

vcgencmd codec_enabled WVC1

[링크 : http://www.howtogeek.com/.../how-to-add-mpeg-2-and-vc-1-video-codec-...-raspberry-pi/]



mpeg 라이센스 활성화 시 ff-mpeg2video에서 omx-mpeg2로 변화된다고 한다.


[링크 : https://www.youtube.com/watch?v=3zToVK6U7AM]

Posted by 구차니
embeded/raspberry pi2016. 4. 15. 17:34

한줄요약하면..

마스터가 둘이거나, 선이 뒤바뀌었거나?



$ i2cdetect -y 1

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f

00:          03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

10: 10 11 12 13 14 15 16 17 18 19 1a UU 1c 1d 1e 1f

20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f

30: 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f

40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f

50: 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f

60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f

70: 70 71 72 73 74 75 76 77 



Generally this happens because something is pulling SDA (pin 3) low.


The i2cdetect program checks for the existence of a device by sending its address then letting SDA float high. If the device exists it should pull SDA low to signal its presence.


Check your wiring to make sure SDA hasn't been inadvertently connected to ground.


[링크 : http://raspberrypi.stackexchange.com/questions/32719/i2cdetect-shows-every-possible-address]


1. Two masters on the same I2C bus.

2. SDA & SCL swapped.

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=93222]


+ 젠장.. 멀티 마스터였던건가!

Posted by 구차니
embeded/raspberry pi2016. 4. 6. 20:06

안된다는 말이 있어서 따라가보니...

핀 자체가 실장이 안되어 있다고... (GPIO19)



bcm2835 has support for I2C slave. Refer to section 11 of http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf


Unfortunately, GPIO pin 19 (BSC slave CLK) was dropped. http://elinux.org/RPi_BCM2835_GPIOs


So, the built-in I2C slave cannot be used.

[링크 : http://raspberrypi.stackexchange.com/questions/5584/i2c-raspberri-pi-as-a-slave]





[링크 : http://elinux.org/RPi_BCM2835_GPIOs]

Posted by 구차니
embeded/raspberry pi2016. 4. 5. 16:00

음.. FREX 핀은있으나.. 웬지 라즈베리용 카메라에는 FREX를 빼놓지 않았을 기분?



43p



[링크 : http://www.seeedstudio.com/wiki/images/3/3c/Ov5647_full.pdf]

[링크 : http://www.ovt.com/uploads/parts/OV5647.pdf]


어? 120p가 안돼?

Frame rate up to 120 fps

max 90fps. Limitations on frame size for the higher frame rates (VGA only for above 47fps)


그리고.. external / internal sync. 미지원

Support for internal and external frame synchronisation for frame exposure mode

No

[링크 : https://www.raspberrypi.org/documentation/hardware/camera.md]

Posted by 구차니
embeded/raspberry pi2016. 4. 5. 15:25

한마디로 4채널까진 해상도 좀 낮춰서 1Gbps 보다 낮게 설정하면(동시 4채널까진 가능하단건가?)



[링크 : https://github.com/ivmech/ivport/wiki/Capture-Sequence]

[링크 : https://github.com/ivmech/ivport]


[링크 : http://www.arducam.com/multi-camera-adapter-module-raspberry-pi/]

[링크 : http://www.ivmech.com/.../ivport-raspberry-pi-camera-module-multiplexer-p-90]

[링크 :http://www.ivmech.com/.../ivport-dual-raspberry-pi-camera-module-multiplexer-p-104 ]




+

OV5647 can be synched with another sensor using the FREX pin input/output (works also in rolling shutter mode). Needs support in driver though. Guess the FREX pin is not even used in Raspberry Pi Camera design, at least Omnivision reference desing tells not to populate the zero ohm resistor which connect this pin to connector.

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?p=483936]



The Raspberry Pi has a Mobile Industry Processor Interface (MIPI) Camera Serial Interface Type 2 (CSI-2)

MIPI CSI-2 version 1.01 supports up to four data lanes, where each lane has a maximum of 1 Gbps bandwidth, to provide a total bandwidth of 4 Gbps.

[링크 : http://www.petervis.com/Raspberry_PI/Raspberry_Pi_CSI/Raspberry_Pi_CSI_Camera_Interface.html]



음? 카메라 모듈이 기본 2개니까.. 2채널은 동시?


MIPI interface (two lanes) Yes

[링크 : https://www.raspberrypi.org/documentation/hardware/camera.md]



compute module에는 카메라가 두개 꽂히나 보네?

[링크 : https://www.raspberrypi.org/blog/real-time-depth-perception-with-the-compute-module/]

[링크 : http://www.argondesign.com/case-studies/2014/oct/21/stereo-depth-perception-raspberry-pi/]




[링크 : https://www.raspberrypi.org/.../computemodule/RPI-CMIO-V1_2-SCHEMATIC.pdf]


[링크 : https://www.raspberrypi.org/.../raspberrypi/schematics/RPI-3B-V1_2-SCHEMATIC-REDUCED.pdf]

Posted by 구차니
embeded/raspberry pi2016. 3. 25. 09:35

onvif 지원되는 녀석들도 있으려나...

예전 글에 적어 둔거 같은데.. UI도 괜찮은 녀석 이름이 머였지?


[링크 : https://github.com/BreeeZe/rpos]

[링크 : https://github.com/SonsOfTone/RaspberrIP-Camera]

    [링크 : http://www.sonsoftone.com/?page_id=287]

[링크 : ]

Posted by 구차니
embeded/raspberry pi2016. 3. 21. 11:46

음.. 그런데 2b에서는 멀티코어인데 코어활성화 갯수 조절은 없으려나?



1. USB 허브 끄기(근데.. 유선랜도 꺼지려나?)

2. USB 안꼽기

3. HDMI 출력 끄기 (20mA~30mA ?)

4. 다운클럭하기 (/boot/config.txt)


[링크 : http://babaawesam.com/2014/01/24/power-saving-tips-for-raspberry-pi/]

Posted by 구차니
embeded/raspberry pi2016. 3. 20. 17:37


range는 0x20(32)가 기본이고 32bit까지 사용가능(int)

"PWM_RNG1의 값이 32보다 적다면, 처음 PWM_RNG의 첫번째 비트가 잘려진 비트가 전송되어진다. 만약 32를 넘는 경우 초과된 0 비트는 데이터의 끝에서 부터 붙여진다. 기본값은 32이다."

If the value in PWM_RNGi is less than 32, only the first PWM_RNGi bits are sent resulting in a truncation. If it is larger than 32 excess zero bits are padded at the end of data. Default value for this register is 32.


번역하려고 해도 무슨 의미인지 모르겠네 -_-

32 미만은 LSB가 0으로 보내진다는건가? (즉, 짝수로만 셋팅가능?)

그리고 32 이상은 초과된 0비트에 대해서 끝으로 부터 붙는다는건.. 32 이상에 대해서는 32의 배수로만 적용이 가능하거나 승수로만 가능하다는건가? (예를들어 36이라던가 이런식은 설정 불가)




그리고 클럭은... 기본이 100MHz 이지만 다양하게 들어올 수 있다 정도?


음.. range는 그냥 넣고.. 하드웨어적으로 자르고

클럭은.. int로 받지만 실제로는 12비트만 사용이 가능하고(즉,, 0~4095)

기본값 내용이 없는지라..

void pwmSetRange (unsigned int range)

{

  if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO))

  {

    *(pwm + PWM0_RANGE) = range ; delayMicroseconds (10) ;

    *(pwm + PWM1_RANGE) = range ; delayMicroseconds (10) ;

  }

}


void pwmSetClock (int divisor)

{

  uint32_t pwm_control ;

  divisor &= 4095 ;


  if ((wiringPiMode == WPI_MODE_PINS) || (wiringPiMode == WPI_MODE_PHYS) || (wiringPiMode == WPI_MODE_GPIO))

  {

    if (wiringPiDebug)

      printf ("Setting to: %d. Current: 0x%08X\n", divisor, *(clk + PWMCLK_DIV)) ;


    pwm_control = *(pwm + PWM_CONTROL) ;                // preserve PWM_CONTROL


// We need to stop PWM prior to stopping PWM clock in MS mode otherwise BUSY

// stays high.


    *(pwm + PWM_CONTROL) = 0 ;                          // Stop PWM


// Stop PWM clock before changing divisor. The delay after this does need to

// this big (95uS occasionally fails, 100uS OK), it's almost as though the BUSY

// flag is not working properly in balanced mode. Without the delay when DIV is

// adjusted the clock sometimes switches to very slow, once slow further DIV

// adjustments do nothing and it's difficult to get out of this mode.


    *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x01 ;        // Stop PWM Clock

      delayMicroseconds (110) ;                 // prevents clock going sloooow


    while ((*(clk + PWMCLK_CNTL) & 0x80) != 0)  // Wait for clock to be !BUSY

      delayMicroseconds (1) ;


    *(clk + PWMCLK_DIV)  = BCM_PASSWORD | (divisor << 12) ;


    *(clk + PWMCLK_CNTL) = BCM_PASSWORD | 0x11 ;        // Start PWM clock

    *(pwm + PWM_CONTROL) = pwm_control ;                // restore PWM_CONTROL


    if (wiringPiDebug)

      printf ("Set     to: %d. Now    : 0x%08X\n", divisor, *(clk + PWMCLK_DIV)) ;

  }


[링크 : http://www.farnell.com/datasheets/1521578.pdf]

2015/10/16 - [개소리 왈왈/라즈베리 파이(rpi)] - bcm2835 pwm 데이터시트

2015/10/16 - [개소리 왈왈/라즈베리 파이(rpi)] - wiringpi pwm 라이브러리 분석?

2015/10/14 - [개소리 왈왈/라즈베리 파이(rpi)] - 라즈베리 파이 GPIO 유틸 PWM


The Raspberry Pi PWM clock has a base frequency of 19.2 MHz. This frequency, divided by the argument to pwmSetClock(), is the frequency at which the PWM counter is incremented. When the counter reaches a value equal to the specified range, it resets to zero. While the counter is less than the specified duty cycle, the output is high, otherwise the output is low.


This means, if you want to set the PWM to have a specific frequency, you can use the following relationship:


pwmFrequency in Hz = 19.2e6 Hz / pwmClock / pwmRange.


pwmSetClock(1); -> 2.342kHz

pwmSetClock(2); -> 4.81MHz

pwmSetClock(3); -> 3.19MHz

pwmSetClock(4); -> 2.398MHz

pwmSetClock(5); -> 1.919MHz

pwmSetClock(6); -> 1.6MHz

pwmSetClock(7); -> 1.3MHz

pwmSetClock(8); -> 1.2MHz

pwmSetClock(9); -> 1.067MHz

pwmSetClock(10); -> 959kHz

pwmSetClock(11); -> 871kHz

pwmSetClock(20); -> 480kHz

pwmSetClock(200); -> 48kHz

pwmSetClock(500); -> 19kHz

pwmSetClock(1000); -> 9.59kHz

pwmSetClock(2000); -> 4.802kHz

pwmSetClock(4000); -> 2.401kHz

pwmSetClock(5000); -> 10.58kHz

[링크 : http://raspberrypi.stackexchange.com/questions/4906/control-hardware-pwm-frequency]



음.. pwmc에 100 넣으면 1/100 으로 DIV 되서 1Mhz 로 작동해야 하는데.. 위에 실험은 출력이 달라서 그럴려나?

   #define PWMCTL (*(volatile uint32_t *)0x2020c000)

   #define PWMSTA (*(volatile uint32_t *)0x2020c004)

   #define PWMDMAC (*(volatile uint32_t *)0x2020c008)

   #define PWMRNG1 (*(volatile uint32_t *)0x2020c010)

   #define PWMDAT1 (*(volatile uint32_t *)0x2020c014)

   #define PWMFIF1 (*(volatile uint32_t *)0x2020c018)

   #define PWMRNG2 (*(volatile uint32_t *)0x2020c020)

   #define PWMDAT2 (*(volatile uint32_t *)0x2020c024)


   #define CM_PWMCTL (*(volatile uint32_t *)0x201010a0)

   #define CM_PWMDIV (*(volatile uint32_t *)0x201010a4)


[링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=37770]

Posted by 구차니
embeded/raspberry pi2016. 3. 19. 20:39

그냥 pc 스피커 굴러 다니는게 있길래

마침 4핀 짜리고 해서 꽂아서 pwm으로 해보니 소리가 난다 -ㅁ-!?


아무튼.. pwm-ms와 pwm-bal의 출력방식이 다르니 소리가 다르게 난다.


$ gpio mode 1 pwm

$ gpio pwm-ms

$ gpio pwm 1 7


$ gpio pwm-bal 

$ gpio pwm 1 7




+

2016.04.13

미친척 오실로 스코프로 찍어보니..

$ gpio mode 1 pwm

$ gpio pwm 1 512

$ gpio pwmc 10



7  2680 Hz

8  2343 Hz

9  2083 Hz

10 1875 Hz

11 1704 Hz

12 1562 Hz

13 1443 Hz

14 1339 Hz

15 1250 Hz

16 1172 Hz

17 1103 Hz

18 1042 Hz





클럭을 가지고 하기에는 좀 그렇고... 어떻게 해야 하려나?

[링크 : http://thomson.tistory.com/638]

Posted by 구차니
embeded/raspberry pi2016. 3. 15. 10:40

똥강아지와 똥개 감시용(?)으로 대충 만들어 본 녀석

천원짜리 다이소에서 종이박스 사고

굴러다니던 핸드폰 보조배터리 하나로 끝!




대역폭의 문제로 640x480 @ 15fps인데

좀 다르게 셋팅해봐야지..



보조 배터리 2500mA 짜리인데

3시간은 버텨주네(접속시 + 무선) 올

샤오미 10500 쓰면 그럼 15시간?! ㅋㅋ


Posted by 구차니