embeded/Cortex-M4 Ti2016. 11. 23. 17:08

원인 불명(?)으로

trim 값이 0x7FFF가 기본값인데

0x0114정도 들어있어서

어느 순간인가 갑자기 1초 더해지는게 아닌 2초가 더해지는 현상을 발견 -_-


결론은.. 이걸 어떻게 구워삶냐 인가..

일단 

  if(HibernateIsActive())

{

HibernateRTCTrimSet(0x7FFF);

}

식으로 되어 있어야 trim이 설정되는거 같은데 끄응... 머리 아프네

어떤 조건에서 설정이 되는지 알수가 없다보니..


+

일단은.. hibernate가 on 되어야 설정이 되는데

그렇다면.. 설정이 안된채로 넘어간적도 있다는 건가? 싶은데.. 머지?


데이터 시트 상으로는, 64초 마다 더하거나 뺸다고

그런 이유로 보고 있으면 갑자기 시간이 2초가 간다거나 하는 식으로 드러난다.

(물론 0x7FFF 보다 적을 경우는 빠르게 가고 0x7FFF < x < 0x10000 일 경우에는 느리게가는 듯?)


+

lm3s1607의 hibernate예제

클럭 초기화가 두번이네.. 일단은 이렇게 해주니 문제없이 rtc가 가동되는 듯..

     //

    // Enable the Hibernation module.

    //

    SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);


    //

    // Per an erratum, sometimes on wake the Hibernation module control

    // register will be cleared when it should not be.  As a workaround a

    // location in the non-volatile data area can be read instead.  This data

    // area is cleared to 0 on reset, so if the first location is non-zero then

    // the Hibernation module is in use.  In this case, re-enable the

    // Hibernation module which will ensure that the control register bits have

    // the proper value.

    //

    HibernateDataGet(&ulHibernateCount, 1);

    if(ulHibernateCount)

    {

        HibernateEnableExpClk(SysCtlClockGet());

        HibernateClockSelect(HIBERNATE_CLOCK_SEL_DIV128);

    }


    //

    // Check to see if Hibernation module is already active, which could mean

    // that the processor is waking from a hibernation.

    //

    if(HibernateIsActive())

    {

        //

        // Read the status bits to see what caused the wake.

        //

        ulStatus = HibernateIntStatus(0);

    }


    //

    // Enable the Hibernation module.  This should always be called, even if

    // the module was already enabled, because this function also initializes

    // some timing parameters.

    //

    HibernateEnableExpClk(SysCtlClockGet());


    //

    // If the wake was not due to button or RTC match, then it was a reset.

    //

    if(!(ulStatus & (HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_RTC_MATCH_0)))

    {

        //

        // Configure the module clock source.

        //

        HibernateClockSelect(HIBERNATE_CLOCK_SEL_DIV128);


        //

        // Finish the wake cause message.

        //

        RIT128x96x4StringDraw("RESET", COL(7), ROW(4), 15);


        //

        // Wait a couple of seconds in case we need to break in with the

        // debugger.

        //

        SysTickWait(3 * 100);


        //

        // Allow time for the crystal to power up.  This line is separated from

        // the above to make it clear this is still needed, even if the above

        // delay is removed.

        //

        SysTickWait(15);

    }


    //


Posted by 구차니
이론 관련/전기 전자2016. 11. 23. 15:33

32.768KHz에서 100PPM 일 경우

하루 8초 라는데..

20PPM 이 일반적이면.. 위의 1/5이니까 하루 1초 정도?


[링크 : http://bigwavek.tistory.com/entry/크리스탈의-PPM-계산법]

[링크 : http://irmus.tistory.com/74]


[링크 : http://www.devicemart.co.kr/2645] 32.768 20ppm


+

도대체 1분에 1초 틀어지면 머가 잘못된걸까..

32768Hz 의 1/60은 546 이고

1/60은 0.016667... 대충 1.6% 오차



+

2016.11.24 추가

RTC PPM 계산기



[링크 : https://www.maximintegrated.com/en/design/tools/calculators/product-design/rtc.cfm]

'이론 관련 > 전기 전자' 카테고리의 다른 글

LVCMOS, LVTTL  (0) 2017.05.24
논리회로 게이트  (0) 2017.04.14
자전거 속도계 센서 - 리드 스위치  (0) 2016.11.23
27MHz에 1Mohm 저항을 왜 달까?  (2) 2016.10.26
Load Capacitor - CL  (0) 2016.10.26
Posted by 구차니
Programming/php2016. 11. 23. 13:38

PDO는 PHP 5.1 부터 탑재

[링크 : http://e2xist.tistory.com/570]

[링크 : http://php.net/manual/en/book.pdo.php]


PHP 5.5 이후 부터는 mysql library 등을 삭제?

[링크 : http://durst.tistory.com/272]


일단 기존의 mysql library이용한 접속 예제..

[링크 : http://ji1000.tistory.com/8]


[링크 : http://www.w3schools.com/php/php_mysql_connect.asp]

'Programming > php' 카테고리의 다른 글

php db connection pool  (0) 2016.12.28
php 로그인 예제 2  (0) 2016.12.27
php template  (0) 2016.11.14
php 버전 및 년도  (0) 2016.10.11
php get / post 변수 그리고 global 변수  (0) 2016.10.11
Posted by 구차니
이론 관련/전기 전자2016. 11. 23. 13:24

센서를 위해 자석을 달아 줄때 예상은 했지만

이런 원리였구나..


[링크 : https://www.devicemart.co.kr/1278073]

[링크 : http://kocoafab.cc/make/view/360]

'이론 관련 > 전기 전자' 카테고리의 다른 글

논리회로 게이트  (0) 2017.04.14
크리스탈 정밀도 - PPM  (0) 2016.11.23
27MHz에 1Mohm 저항을 왜 달까?  (2) 2016.10.26
Load Capacitor - CL  (0) 2016.10.26
NTSC, PAL, CVBS  (0) 2016.05.25
Posted by 구차니

예전에 잠시 반짝 하고 드론에 뭍힌 녀석인데

구조적으로는 헬리콥터 로터를 90도씩 꺽고

로터축도 옆으로뺀 구조라고 하면 되려나?


소음이 적다길래 rpm 관련 정보를 찾다 보니.. 1200 rpm

초당 20회전 * 60초 = 1200rpm 이니가

50msec 마다 한바퀴 회전

상하좌우 4포인트 제어니까 12.5msec 마다 제어를 해주어야 하는 녀석이군..


[링크 : http://www.koreaaero.com/commons/fileDown_prCenter.asp?fileNameIdx=3&fileDir=5]


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

'이론 관련 > 하드웨어 관련' 카테고리의 다른 글

ik - inverse kinematics  (0) 2024.08.27
PCB 동박 두께 oz  (0) 2021.11.22
adc - single ended / differential  (0) 2015.11.17
adc - 시그마델타 / SAR  (0) 2015.11.16
가속도/각속도/기울기 센서  (0) 2015.08.25
Posted by 구차니
프로그램 사용/Blender2016. 11. 22. 21:41

netrender 소스인거 같은데 이런 에러네.. 버전 체크?

def clientConnection(netsettings, report = None, scan = True, timeout = 5):

    address = netsettings.server_address

    port = netsettings.server_port

    use_ssl = netsettings.use_ssl

    

    if address== "[default]":

#            calling operator from python is fucked, scene isn't in context

#            if bpy:

#                bpy.ops.render.netclientscan()

#            else:

        if not scan:

            return None


        address, port = clientScan()

        if address == "":

            return None

    conn = None

    try:

        HTTPConnection = http.client.HTTPSConnection if use_ssl else http.client.HTTPConnection

        if platform.system() == "Darwin":

            with ConnectionContext(timeout):

                conn = HTTPConnection(address, port)

        else:

            conn = HTTPConnection(address, port, timeout = timeout)


        if conn:

            if clientVerifyVersion(conn, timeout):

                return conn

            else:

                conn.close()

                reporting(report, "Incorrect master version", ValueError)

    except BaseException as err:

        if report:

            report({'ERROR'}, str(err))

            return None

        else:

            print(err)

            return None


def clientVerifyVersion(conn, timeout):

    with ConnectionContext(timeout):

        conn.request("GET", "/version")

    response = conn.getresponse()


    if response.status != http.client.OK:

        conn.close()

        return False


    server_version = response.read()


    if server_version != VERSION:

        print("Incorrect server version!")

        print("expected", str(VERSION, encoding='utf8'), "received", str(server_version, encoding='utf8'))

        return False


    return True 

[링크 : https://github.com/WARP-LAB/Blender-Network-Render-Additions/blob/master/netrender/utils.py]


이제야(?) 생각이 나서 콘솔에서 실행에서 에러를 보니.. 크앙..

2.76b랑 2.78이랑은 버전이 다른듯 흑 ㅠㅠ

윈도우 쪽을 버전을 내려야지 머 ㅠㅠ

$ blender

connect failed: No such file or directory

Read new prefs: /home/odroid/.config/blender/2.76/config/userpref.blend

libGL error: unable to load driver: exynos_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: exynos

Incorrect server version!

expected 1.9 received 1.8

Incorrect master version

Incorrect server version!

expected 1.9 received 1.8

Incorrect master version

Info: Master server found


Incorrect server version!

expected 1.9 received 1.8

Error: Incorrect master version 


+

2016.11.23

윈도우쪽 버전을 맞추어도 여전히 incorrect 버전이라고 뜨네..

python쪽 차이일려나? 미지수네...

'프로그램 사용 > Blender' 카테고리의 다른 글

blender physical simulation  (0) 2018.03.19
blender netrender 잠시 된건가..  (0) 2016.11.23
blender netrender 구조  (0) 2016.11.19
블렌더 강좌  (0) 2016.11.18
ubuntu blender addons  (0) 2016.11.17
Posted by 구차니
하드웨어/모터(motor)2016. 11. 22. 19:33

ESC - Electronic Speed Control

BLDC + ESC가 필수라는데

[링크 : http://hyongdoc.tistory.com/31]


암만봐도 4만원 이하의 드론에 저런걸 쓸리는 없어서 찾아보니


ESC없는 드론은 모터를 다른걸 쓴다고 한다.

코어리스 모터는 또 머래..

아무튼 얘가.. 소형 고효율 고출력 모터라서 드론에 쓰이는 듯?

[링크 : https://www.quora.com/Will-the-drone-work-without-a-ESC]

[링크 : http://blog.naver.com/motor_bank/60198299399]

[링크 : http://cafe.daum.net/_c21_/bbs_search_read?grpid=f1jm&fldid=6enW&datanum=4797]


+ 2017.07.10

코어리스 권선?

권선이니까.. 엄밀하게 얘가 브러쉬던 브러쉬리스 던 상관없다는 의미가 되려나?

[링크 : http://www.maxonmotor.co.kr/maxon/view/content/brushless-dc-motors-overview]

'하드웨어 > 모터(motor)' 카테고리의 다른 글

모터부 전원 분리  (0) 2016.12.03
로봇 관절 부품  (0) 2016.11.25
디지털 서보 / 아날로그(표준) 서보?  (0) 2016.03.28
L6470 보드 판매처  (0) 2015.11.06
바이폴라 / 유니폴라 - 전기적 결선 방법  (0) 2015.11.04
Posted by 구차니
프로그램 사용/VLC2016. 11. 22. 09:21

엌 win/pc 버전으로 해서봤더니 나오네? ㅋㅋㅋ


엌ㅋㅋㅋㅋ 멀리서 보면 그럴싸 한데?


'프로그램 사용 > VLC' 카테고리의 다른 글

vlc 간편 녹화  (0) 2022.08.01
http vlc protocol  (0) 2018.11.30
vlc 옵션 -vvv  (0) 2015.09.15
dash with VLC  (0) 2015.09.11
VLC dshow(캡쳐장비) 해상도 설정  (0) 2015.05.23
Posted by 구차니
embeded/odroid2016. 11. 21. 20:58

14.04에서도 안된건... vlc출력 설정 문제였을까?


$ dmesg

[   31.676418] usb 1-3.1: new full-speed USB device number 6 using s5p-ehci

[   31.782909] usb 1-3.1: New USB device found, idVendor=0ac8, idProduct=301b

[   31.782918] usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[   31.782924] usb 1-3.1: Product: PC Camera

[   31.782929] usb 1-3.1: Manufacturer: Vimicro Corp.

[   33.350055] gspca_main: v2.14.0 registered

[   33.352485] gspca_main: gspca_zc3xx-2.14.0 probing 0ac8:301b

[   33.536816] input: gspca_zc3xx as /devices/platform/s5p-ehci/usb1/1-3/1-3.1/input/input4

[   33.537949] usbcore: registered new interface driver gspca_zc3xx 


$ ll /dev/video*

crw-rw----+ 1 root video 81, 16 11월 21 20:53 /dev/video0

crw-rw----+ 1 root video 81,  0  2월 12  2016 /dev/video10

crw-rw----+ 1 root video 81,  1  2월 12  2016 /dev/video11

crw-rw----+ 1 root video 81,  2  2월 12  2016 /dev/video12

crw-rw----+ 1 root video 81,  3  2월 12  2016 /dev/video13

crw-rw----+ 1 root video 81,  4  2월 12  2016 /dev/video14

crw-rw----+ 1 root video 81,  5  2월 12  2016 /dev/video15

crw-rw----+ 1 root video 81,  6  2월 12  2016 /dev/video16

crw-rw----+ 1 root video 81,  7  2월 12  2016 /dev/video17

crw-rw----+ 1 root video 81, 12  2월 12  2016 /dev/video20

crw-rw----+ 1 root video 81, 13  2월 12  2016 /dev/video21

crw-rw----+ 1 root video 81, 14  2월 12  2016 /dev/video8

crw-rw----+ 1 root video 81, 15  2월 12  2016 /dev/video9


$ vlc

VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)

[00023938] core libvlc: 기본 인터페이스로 vlc 실행. vlc 인터페이스 없이 사용하려면 'cvlc' 을 사용하세요.

sudFailed to open VDPAU backend libvdpau_nvidia.so: 동적 오브젝트 파일을 열 수 없습니다: 그런 파일이나 디렉터리가 없습니다

[b5905cb8] xcb_xv vout display error: no available XVideo adaptor

libGL error: unable to load driver: exynos_dri.so

libGL error: driver pointer missing

libGL error: failed to load driver: exynos

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a7509b48] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)

[a2500510] core input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 300 ms) 


사용 가능한 옵션은 다음과 같은데..

아스키 아트 비디오 출력을 하니 아래와 같이 나온다. 

오메 신기해라 ㅋㅋ

X11 비디오 출력으로 하니 정상적으로 잘 나온다.


Posted by 구차니
프로그램 사용/Blender2016. 11. 19. 22:02

Master는 Slave를 관리하기만 하고 자기 스스로는 rendering을 하지 않는 관리용 노드

Slave는 Master의 명령을 받아 rendering하는 노드

Client는 Mater에게 렌더링을 요청하는 노드

The Master Node does no rendering, it just stores the .blend information and sources out the rendering to slaves and keeps track of what 'Chunks' are going where.


The Slave Node (or nodes) are the work horses, doing all the rendering under the control of the master.


The Client Node is the node from which render jobs are sent to the master for distributed rendering by the slaves. This is where you have your project open and are working in Blender. 

[링크 : http://blendingwithforbes.blogspot.kr/2010/03/blender-25-network-render.html]



두대 가지고 하려면은

메인 PC에는

Mater / Slave / Client를 돌리고

보조 PC에다가는

Slave를 돌려야 하는데...

그러면 Blender를 세개나 돌려야 하나.. ㄷㄷㄷ

'프로그램 사용 > Blender' 카테고리의 다른 글

blender netrender 잠시 된건가..  (0) 2016.11.23
blender netrender / incorrect master version  (0) 2016.11.22
블렌더 강좌  (0) 2016.11.18
ubuntu blender addons  (0) 2016.11.17
blender 2.78 network render  (0) 2016.11.16
Posted by 구차니