'2021/06/10'에 해당되는 글 3건

  1. 2021.06.10 cm4 rtc pcf85063a
  2. 2021.06.10 wake on patern matching
  3. 2021.06.10 tensorflow lite yolov4
embeded/raspberry pi2021. 6. 10. 20:34

/boot/config.txt 에 아래를 넣어주라는데

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi

 

청개구리 피라.. i2c_csi_dsi는 빼고 아래처럼 넣었는데

dmesg에서 pcf로 검색되지도 hwclock으로 되지도 /proc/driver/rtc가 생성되지도 않았다.

dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a

 

이것저것 섞어서 하다보니 헷갈리네.. 아무튼 이런 에러도 나오고

$ dmesg | grep pcf
[    6.470302] rtc-pcf85063 1-0051: RTC chip is not present
[    6.470489] rtc-pcf85063: probe of 1-0051 failed with error -121

 

$ lsmod | grep pcf
rtc_pcf85063           16384  0
regmap_i2c             16384  1 rtc_pcf85063

$ ls -al /sys/class/i2c-adapter/i2c-10/new_device
--w------- 1 root root 4096 Jun 11 14:37 /sys/class/i2c-adapter/i2c-10/new_device

 

아무튼 유일하게 효과가 있던건 아래의 새 장치 추가, rtc-pcf85063 모듈을 불러왔을때 인데.

$ sudo su -
# echo pcf85063 0x51 >/sys/class/i2c-adapter/i2c-10/new_device
# modprobe rtc-pcf85063
# exit

 

아무튼 modprobe 로 넣어주면 rtc0로 등록되었다고 뜨고

$ dmesg | tail
[  151.430236] rtc-pcf85063 10-0051: registered as rtc0
[  151.430336] i2c i2c-10: new_device: Instantiated device pcf85063 at 0x51

 

해당 장치를 procfs로 접근하면 시간은 나오는데

$ cat /proc/driver/rtc
rtc_time        : 05:38:03
rtc_date        : 2021-06-11
24hr            : yes

 

그럼에도 hwclock으로는 작동하지 않는다.

$ hwclock --verbose
hwclock from util-linux 2.33.1
System Time: 1623389945.199668
Trying to open: /dev/rtc0
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

 

커널에서 설정을 바꾸거나 init 스크립트 바꾸어서 i2c에 등록하고 modprobe 하게 해주어야 할 것 같긴한데..

rtc wake까진 가기 까마득 하구만..

 

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

 

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

edid-decode  (0) 2021.06.11
cm4 태워먹음 ㅠㅠ  (0) 2021.06.11
ETH SYNC / IEEE 1588 / PTP  (2) 2021.06.09
raspivid camera select  (0) 2021.06.09
bmp280  (0) 2021.06.09
Posted by 구차니

시놀로지 NAS 쓰다 보면

절전모드에서 ssh나 samba 접속하면 알아서 켜지는데 그것에 대한 기술명

wake on lan의 하위인지 다른 기술인진 모르겠으나

WoL 처럼 magic packet이 아니라 다른 패턴에서도 매칭되면 깨어나게 해주는 기능.

 

[링크 : https://askubuntu.com/questions/1332960/how-to-check-if-my-device-supports-wake-on-wlan]

[링크 : https://coolenjoy.net/bbs/37/4140?sfl=wr_name%2C1&stx=isaiah&sop=and]

'이론 관련 > 네트워크 관련' 카테고리의 다른 글

EtherCAT - Ethernet for Control Automation Technology  (0) 2021.11.01
WiFi 프로토콜, cipher  (0) 2021.09.27
rs-422  (0) 2021.06.03
FTPS  (0) 2021.02.07
UDP와 MTU?  (0) 2020.09.07
Posted by 구차니

output 텐서의 차원에 대한 정보는 세개 변수에 저장된다.

TfLiteType type;
TfLiteIntArray* dims;
size_t bytes;

 

type은 개별 엘리먼트의 출력 포맷(float라던가 uint8 이라던가)의 변수 크기를 저장하고

dims.size 에는 몇 차원 텐서인지

dims.data[] 에는 차원별 갯수를 저장한다.

dims.size = 4

dims.data[] = [1 7 7 18] 식으로 저장되며

float32형이기에

1*7*7*18*sizeof(float) = 3528 byte로

해당 내용은 bytes에 저장된다.

 

TfLitePtrUnion data;

그리고 그 용량의 데이터는 data에 저장되어 접근을 하면 되는데..

차원을 어떻게 접근해야 하려나.. -_-

 

대충 label_image.cc 예제에서 이런 식으로 출력하면 okay

    printf("dims size[%d]\n",output_dims->size);
    for(int idx = 0; idx < output_dims->size; idx++)
    {
            printf("%d\t",output_dims->data[idx]);
    }

    printf("tensor pos bytes [%d]\n",interpreter->tensor(interpreter->outputs()[0])->bytes);
    printf("tensor per bytes [%d]\n",interpreter->tensor(interpreter->outputs()[1])->bytes);

 

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

tflite typed_tensor(), tensor()  (0) 2021.06.25
tflite yolov4  (0) 2021.06.14
tensorflow lite interpreter->AllocateTensors()  (0) 2021.05.26
tflite common.h  (0) 2021.05.21
imx6q neon tensorlow lite  (0) 2021.05.10
Posted by 구차니