embeded/raspberry pi2018. 5. 18. 15:56

SPI 설정이 무한대로 되는건 아니고

250MHz를 분기해서 쓰는데

일단은.. SPI LCD 쓰는데 62M를 설정해주면 통신 속도를 못 버티는지 색이 깨진다.

60보다 낮은건 31.2MHz 인가?

아무튼 40메가로 설정해도 일단은 돌아가는 가네..


SPEED

The driver supports the following speeds:


  cdiv    speed

     2    125.0 MHz

     4     62.5 MHz

     8     31.2 MHz

    16     15.6 MHz

    32      7.8 MHz

    64      3.9 MHz

   128     1953 kHz

   256      976 kHz

   512      488 kHz

  1024      244 kHz

  2048      122 kHz

  4096       61 kHz

  8192     30.5 kHz

 16384     15.2 kHz

 32768     7629 Hz 

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

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=43442&p=347073]

'embeded > raspberry pi' 카테고리의 다른 글

node.js on rpi  (0) 2018.09.11
라즈베리 파이 USB 사운드 카드로 녹음 및 재생하기  (4) 2018.09.10
라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
odroid u3 headless setup중 문제..  (0) 2018.05.14
rpi firmata  (0) 2018.05.11
Posted by 구차니
embeded/raspberry pi2018. 5. 18. 10:01

귀찮으니 img 받아서 그냥 까세요 수준으로 대격변 ㄷㄷ

[링크 : https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)]


귀찮아서.. 스크립트 분석하면 될걸.. 썡으로 뒤지는중


일단 화면 갱신이 꽤나 느린데

/etc $ grep -rni "fbcp" ./

./rc.local:21:fbcp &

[링크 : https://github.com/tasanakorn/rpi-fbcp]


동영상을 보면 확실히 fbcp를 통해 복사하는거라 그런지 화면 갱신이 느리다. (cpu는 5% 미만이긴 하지만)


그래서 아래처럼 설정하고 다시 찰칵

기분인진 몰라도 확실히 좀 빨라진 기분?


$ cat /boot/config.txt

# For more options and information see

# http://www.raspberrypi.org/documentation/configuration/config-txt.md

# Some settings may impact device functionality. See link above for details


# uncomment if you get no picture on HDMI for a default "safe" mode

#hdmi_safe=1


# uncomment this if your display has a black border of unused pixels visible

# and your display can output without overscan

#disable_overscan=1


# uncomment the following to adjust overscan. Use positive numbers if console

# goes off screen, and negative if there is too much border

#overscan_left=16

#overscan_right=16

#overscan_top=16

#overscan_bottom=16


# uncomment to force a console size. By default it will be display's size minus

# overscan.

#framebuffer_width=1280

#framebuffer_height=720


# uncomment if hdmi display is not detected and composite is being output

#hdmi_force_hotplug=1


# uncomment to force a specific HDMI mode (this will force VGA)

#hdmi_group=1

#hdmi_mode=1


# uncomment to force a HDMI mode rather than DVI. This can make audio work in

# DMT (computer monitor) modes

#hdmi_drive=2


# uncomment to increase signal to HDMI, if you have interference, blanking, or

# no display

#config_hdmi_boost=4


# uncomment for composite PAL

#sdtv_mode=2


#uncomment to overclock the arm. 700 MHz is the default.

#arm_freq=800


# Uncomment some or all of these to enable the optional hardware interfaces

dtparam=i2c_arm=on

#dtparam=i2s=on

dtparam=spi=on

#enable_uart=1

# Uncomment this to enable the lirc-rpi module

#dtoverlay=lirc-rpi


# Additional overlays and parameters are documented /boot/overlays/README


# Enable audio (loads snd_bcm2835)

dtparam=audio=on

dtoverlay=waveshare35a:rotate=270

#dtoverlay=ads7846,cs=1,penirq=17,penirq_pull=2,speed=1000000,keep_vref_on=1,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900

#hdmi_force_hotplug=1

#max_usb_current=1

#hdmi_group=2

#hdmi_mode=1

#hdmi_mode=87

#hdmi_cvt 480 320 60 6 0 0 0

#hdmi_drive=2

#display_rotate=2 


[링크 : https://github.com/swkim01/waveshare-dtoverlays/issues/7]


$ cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf

# This is a minimal sample config file, which can be copied to

# /etc/X11/xorg.conf in order to make the Xorg server pick up

# and load xf86-video-fbturbo driver installed in the system.

#

# When troubleshooting, check /var/log/Xorg.0.log for the debugging

# output and error messages.

#The driver is made by Waveshare&Spotpear

# Run "man fbturbo" to get additional information about the extra

# configuration options for tuning the driver.


Section "Device"

        Identifier      "Allwinner A10/A13 FBDEV"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb0"


        Option          "SwapbuffersWait" "true"

EndSection



Section "Device"

        Identifier      "Waveshare 35a spi"

        Driver          "fbturbo"

        Option          "fbdev" "/dev/fb1"


        Option          "SwapbuffersWait" "true"

EndSection


Section "Monitor"

        Identifier      "primary"

EndSection


Section "Screen"

        Identifier      "primary"

        Device          "Waveshare 35a spi"

        Monitor         "rpi spi"

EndSection 


일단 mame를 깔고

$ sudo apt-get install gnome-video-arcade mame mame-tools

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following additional packages will be installed:

  liblua5.3-0 libsdl2-2.0-0 libsdl2-ttf-2.0-0 mame-data

Suggested packages:

  devhelp mame-doc mame-extra

The following NEW packages will be installed:

  gnome-video-arcade liblua5.3-0 libsdl2-2.0-0 libsdl2-ttf-2.0-0 mame

  mame-data mame-tools

0 upgraded, 7 newly installed, 0 to remove and 49 not upgraded.

Need to get 45.0 MB of archives. 


gnome 어쩌구 말고

mame를 실행하니 CPU는 미쳐 날뛰고(라즈베리 2B인데 오버 해야하나..)


/dev/fb1 덤프해서 보니 RGB565 480x320으로 복원



+

HDMI로 해도 느린건 마찬가지(아니 해상도 높아져서 더 느려진 기분.. 실행이 안되고 뻗는 수준?)

0.78 구버전을 구해서 빌드 해보려니 소스를 못 받는다.. 아놔

Posted by 구차니
embeded/raspberry pi2018. 5. 14. 11:30

0. MAC address 및 호스트 이름 설정

$ sudo vi /etc/smsc95xx_mac_addr


1. 로케일 설정

~$ pptpsetup

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

        LANGUAGE = (unset),

        LC_ALL = (unset),

        LC_PAPER = "en",

        LC_ADDRESS = "en",

        LC_MONETARY = "en",

        LC_NUMERIC = "en",

        LC_TELEPHONE = "en",

        LC_IDENTIFICATION = "en",

        LC_MEASUREMENT = "en",

        LC_TIME = "en",

        LC_NAME = "en",

        LANG = (unset)

    are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

/usr/sbin/pptpsetup: too few arguments.

Try '/usr/sbin/pptpsetup --help' for more information. 


#/etc/environment

LANG="ko_KR.utf8"

LANGUAGE="ko_KR;ko;en_GB;en"

LC_ALL="ko_KR.utf8" 

[링크 : https://forum.ubuntu-kr.org/viewtopic.php?t=18025]



'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 파이 SPI 속도  (0) 2018.05.18
라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
rpi firmata  (0) 2018.05.11
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi 3b PMIC  (0) 2018.04.23
Posted by 구차니
embeded/odroid2018. 5. 14. 09:42

예전에 있던 메모렛 SD 리더로는 잘되더니..

이번에 구매한 정체 불명의 SD 리더로는 eMMC가 안 읽힌다 -_-

USB 2.0 / SDXC 까지 되는 녀석이라는데.. 머가 다른거야?


아무튼.. 아래는 호환성

[링크 : https://forum.odroid.com/viewtopic.php?f=53&t=2725]


여기는 하드커널에서 제작한 USB3.0 eMMC 리더

[링크 : http://www.hardkernel.com/main/products/prdt_info.php?g_code=G152105300286&tab_idx=1

'embeded > odroid' 카테고리의 다른 글

odroid U3 stretch  (0) 2018.09.11
오랫만에 지름!  (2) 2018.09.07
odroid u3 저전력은 안되나..  (0) 2018.04.22
odroid u3 mediawiki 설치해보니..  (0) 2018.04.19
odroid u3 소비전력 재측정  (0) 2018.04.17
Posted by 구차니
embeded/raspberry pi2018. 5. 11. 17:51

비얌 만세.. ㄷㄷ


Arduino에 firmata 펌웨어 올리고

아두이노와 라즈베리는 시리얼을 통해서 통신을 함


[링크 : https://raspberrypi-aa.github.io/session3/firmata.html]

'embeded > raspberry pi' 카테고리의 다른 글

라즈베리 2B + waveshare 35a + MAME 0.182  (0) 2018.05.18
odroid u3 headless setup중 문제..  (0) 2018.05.14
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi 3b PMIC  (0) 2018.04.23
rpi img 생성하기  (0) 2018.04.18
Posted by 구차니
embeded/raspberry pi2018. 5. 9. 09:39

고민을 해보니..

apache + php + mysql + phpmyadmin 돌리는데

2.5W 정도 먹는 상황


비슷하게 설정한 odroid U3가

성능은 훨신 쾌적한데 약간 더 먹는 2.7W 정도?


라즈베리 3B+ 이런거랑 Odroid U3가 비교가 될지 모르겠지만

[링크 : https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/]


간접적으로 XU4(Exynos5422 Cortex™-A15 2Ghz and Cortex™-A7 Octa core CPUs)

Odroid U3(1.7GHz Exynos4412 Prime Cortex-A9 1.7GHz Quad-core processor)

일단 3B랑 3B+이랑 비교하면 클럭만 10% 정도 증가이기에 성능 상승폭은 그리 크지 않을 것으로 보이고

아래 벤치마크만 본다면 3b보다 u3가 나을 것으로 예상된다.

[링크 : http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825]

[링크 : https://magazine.odroid.com/wp-content/uploads/ODROID-Magazine-201401.pdf]


아무튼..

랜도 별도의 USB 포트를 이용하기에 라즈베리 보다 병목도 적을꺼고..

이래저래 소비전력을 따라잡은 상황에서는 라즈베리 2b 빼고 U3로 갈아타는것도 방법일 듯..

'embeded > raspberry pi' 카테고리의 다른 글

odroid u3 headless setup중 문제..  (0) 2018.05.14
rpi firmata  (0) 2018.05.11
rpi 3b PMIC  (0) 2018.04.23
rpi img 생성하기  (0) 2018.04.18
라즈베리 저전력 관련 설정  (0) 2018.04.17
Posted by 구차니
embeded/Cortex-M3 Ti2018. 5. 8. 17:03

부트로더와 어플리케이션을 합치는걸 찾는데

단순하게 SCT 파일 하나 한다고 해서 될게 아닌 듯..

일단 intel hex로 출력하고 SREG_CAT을 이용하여 붙여주어야 할 것으로 보인다.

사용자 명령을 통해 빌드 이후에 합치도록 하는게 핵심?


GENERAL: MERGING TWO APPLICATIONS INTO ONE INTEL HEX FILE

Information in this article applies to:


C51 All Versions

C166 All Versions

C251 All Versions

MDK-ARM any Version 


srec_cat.exe HexFile1.hex -Intel HexFile2.hex -Intel -o MergedHexFile.hex -Intel

[링크 : http://www.keil.com/support/docs/2666.htm]

[링크 : https://sourceforge.net/projects/hex2bin/]

[링크 : http://srecord.sourceforge.net/]

    [링크 : http://www.keil.com/forum/18063/]


IAR은 UI레벨에서 합치는게 있는 듯.. 그래서 더 비싼건가...

[링크 : https://www.iar.com/support/tech-notes/general/creating-a-bootloader-for-cortex-m/]

'embeded > Cortex-M3 Ti' 카테고리의 다른 글

CMSIS for stellaris/TM4C  (0) 2018.02.12
cortex m3 어셈블리 bl, cbz  (0) 2018.01.04
cortex-m3 keil 부트로더  (0) 2017.12.21
keil sct - 링커 스크립트  (0) 2017.12.11
lm3s 부트로더  (0) 2017.11.21
Posted by 구차니
embeded/FPGA - XILINX2018. 5. 4. 08:18

Xilinx 7 series 에도 DONE 이라는 핀이 있어서

설정이 끝나면 HIGH로 설정된다.


[링크 : https://www.xilinx.com/support/documentation/user_guides/ug470_7Series_Config.pdf]

'embeded > FPGA - XILINX' 카테고리의 다른 글

zynq runtime pl fpga update  (0) 2021.03.15
헐...? Xilinx + ARM cortex-m  (0) 2018.10.11
vivado I/O Ports 연결 컨셉  (0) 2018.03.23
vivado device constraint  (0) 2018.03.20
vivado language template  (0) 2018.03.20
Posted by 구차니
embeded/FPGA - ALTERA2018. 5. 4. 08:11

epcs에서 fpga 게이트 설정 읽어들인후

사용이 가능해지는 시점에 핀이 high로 감


[링크 : https://www.altera.com/en_US/pdfs/literature/hb/cfg/cfg_cf51001.pdf]



de0-nano 프로젝트 열어서 보니

핀으로 할당되진 않았지만 FPGA 핀 중에

D - CONF_DONE

F - nCONFIG

S - nSTATUS

등의 핀이 따로 보이긴 한다.


핀 아웃 파일에도 H14에 설정되어 있다.

[링크 : https://www.altera.com/content/dam/altera-www/global/en_US/pdfs/literature/dp/cyclone-iv/ep4ce15.xls]

'embeded > FPGA - ALTERA' 카테고리의 다른 글

엥.. Quartus II Lite Edition... 라이센스?  (0) 2018.05.18
Nios II 컴파일 관련  (0) 2018.05.18
quartus 프로젝트 entry point 설정  (0) 2018.04.17
Device Installer (Quartus Prime 17.1)  (0) 2018.04.17
Quartus 프로젝트 생성  (0) 2018.04.16
Posted by 구차니
embeded/i2c2018. 4. 26. 15:05


[링크 : https://www.i2c-bus.org/]


10bit address

0b11110xxM 0bxxxxxxxx

M은 Read/Write

xx 총 10비트로 7비트에서 확장하여 장치를 더 많이 사용 가능함

RW는 첫 바이트(?)에만 나오므로 두번째 바이트는 기존에 장치 register address로 쓰이던 부분임

0x78~ 0x7B(120~123) 주소로 시작하면 10비트 어드레싱으로 간주하면 된다


7비트 addressing 일 경우

0~127 까지 가능한데 그럼 7비트랑 10비트랑 어떻게 구분해야 하려나?

[링크 : https://www.i2c-bus.org/addressing/10-bit-addressing/]



반복 start 상태는 

ACK 받은 후 STOP으로 진행후 idle로 빠지는게 아니라

ACK 받은 후 START로 진행후 한번더 전송하는 상태이다.

[링크 : https://www.i2c-bus.org/repeated-start-condition/]



---

버스트

[링크 : https://blog.naver.com/specialist0/220645221966]

'embeded > i2c' 카테고리의 다른 글

i2cdump  (0) 2024.12.11
linux i2c 예제  (0) 2022.12.27
i2c mode - tm4c  (0) 2018.04.26
i2c BUS에 pull-up, pull-down  (0) 2018.04.26
i2c bank switching  (0) 2015.09.02
Posted by 구차니