Contents: [Dobrica Pavlinušić's random unstructured stuff]
|
STM8S003F3

- STM8S003F3P6
- 3.3V
- LED on PD3
dpavlin@x200:/rest/cvs/stm8flash$ git remote -v
origin https://github.com/vdudouyt/stm8flash (fetch)
origin https://github.com/vdudouyt/stm8flash (push)
dpavlin@x200:/rest/cvs$ git clone https://github.com/vdudouyt/sdcc-examples-stm8.git
dpavlin@x200:/rest/cvs$ cd sdcc-examples-stm8/
dpavlin@x200:/rest/cvs/sdcc-examples-stm8$ make
dpavlin@x200:/rest/cvs/sdcc-examples-stm8$ git diff
diff --git a/Makefile b/Makefile
index bec46da..e23d5e3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
SDCC=sdcc
SDLD=sdld
-OBJECTS=blinky.ihx uart.ihx sp_test.ihx
+OBJECTS=blinky.ihx uart.ihx
.PHONY: all clean flash
dpavlin@x200:/rest/cvs/sdcc-examples-stm8$ make
sdcc -lstm8 -mstm8 --out-fmt-ihx blinky.c
sdcc -lstm8 -mstm8 --out-fmt-ihx uart.c
dpavlin@x200:/rest/cvs/stm8flash$ ./stm8flash -c stlinkv2 -p stm8s003 -w ../sdcc-examples-stm8/blinky.ihx
Determine FLASH area
Writing Intel hex file 191 bytes at 0x8000... OK
Bytes written: 191
STM8S103F3
- STM8S103F3P6
- 3.3V
- LED on B5
SWIM programming
Updated by Dobrica Pavlinušić on Feb 3 10:33pm
Posted by Dobrica Pavlinušić on Apr 13 12:04pm
Installing Stratum II NTP server on RaspberryPi using SiRF STAR III gps
Contents: [Dobrica Pavlinušić's random unstructured stuff]
|
Links
Raspbian installation
root@ntpi:/home/pi# systemctl start ssh
root@ntpi:/home/pi# systemctl enable ssh
pi@ntpi:~ $ grep pps /boot/config.txt
dtoverlay=pps-gpio,gpiopin=18
pi@ntpi:~ $ sudo apt-get install pps-tools
# reboot, after it:
pi@ntpi:~ $ dmesg | grep pps
[ 30.331047] pps_core: LinuxPPS API ver. 1 registered
[ 30.331066] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 30.352868] pps pps0: new PPS source pps.-1
[ 30.352966] pps pps0: Registered IRQ 178 as PPS source
root@ntpi:~# systemctl disable systemd-timesyncd
root@ntpi:~# systemctl stop systemd-timesyncd
pi@ntpi:~ $ hcitool scan
Scanning ...
00:02:78:10:A2:32 SJ GPS
root@ntpi:/home/pi# ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
time_pps_fetch() error -1 (Connection timed out)
fail, gps module is powered off without bluetooth connection
root@ntpi:/home/pi# grep rfcomm /etc/rc.local
rfcomm bind rfcomm0 00:02:78:10:A2:32
fix pps signal from this GPS and test again
root@ntpi:/home/pi# grep pps /boot/config.txt
dtoverlay=pps-gpio,gpiopin=18,assert_falling_edge
root@ntpi:/home/pi# ppstest /dev/pps0 | head
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1516805100.156350675, sequence: 70193 - clear 0.000000000, sequence: 0
source 0 - assert 1516805100.176368675, sequence: 70195 - clear 0.000000000, sequence: 0
source 0 - assert 1516805100.196339675, sequence: 70196 - clear 0.000000000, sequence: 0
source 0 - assert 1516805100.216363675, sequence: 70198 - clear 0.000000000, sequence: 0
source 0 - assert 1516805100.236378675, sequence: 70200 - clear 0.000000000, sequence: 0
source 0 - assert 1516805100.256385675, sequence: 70202 - clear 0.000000000, sequence: 0
source 0 - assert 1516805100.276392675, sequence: 70204 - clear 0.000000000, sequence: 0
This doesn't work, we need one event per second
# make pin 18 pull-down
root@ntpi:/home/pi# raspi-gpio set 18 ip pd
root@ntpi:/home/pi# grep pps /boot/config.txt
dtoverlay=pps-gpio,gpiopin=18,assert_falling_edge
root@ntpi:/home/pi# ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1517323262.001232132, sequence: 697469 - clear 0.000000000, sequence: 0
source 0 - assert 1517323263.001229640, sequence: 697470 - clear 0.000000000, sequence: 0
source 0 - assert 1517323264.001227157, sequence: 697471 - clear 0.000000000, sequence: 0
source 0 - assert 1517323265.001224685, sequence: 697472 - clear 0.000000000, sequence: 0
source 0 - assert 1517323265.788526615, sequence: 697474 - clear 0.000000000, sequence: 0
source 0 - assert 1517323266.001222221, sequence: 697475 - clear 0.000000000, sequence: 0
# works!
gpsd
pi@ntpi:~ $ sudo apt-get install gpsd
ntp server
root@ntpi:/home/pi# apt-get install ntp
Updated by Dobrica Pavlinušić on Jan 30 6:43am
Posted by Dobrica Pavlinušić on Jan 24 2:27am
connect
root@eeepy:~# hcitool scan
Scanning ...
00:02:78:10:A2:32 SJ GPS
root@eeepy:~# sdptool add --channel=1 OPUSH
OBEX Object Push service registered
root@eeepy:~# rfcomm bind /dev/rfcomm0 00:02:78:10:A2:32
serial output
$ Version GSW3.1.1-SDK_3.1.00.07-C23P1.00 *2F
$ Version MADE BY NAVIUS 2006.4.5*7F
$ TOW: 0*66
$ WK: 1340*20
$ POS: 6378137 0 0*69
$ CLK: 96250*66
$ CHNL: 12*30
$ Baud rate: 9600 System clock: 1058.797MHz*36
$ Version GSW3.1.1-SDK_3.1.00.07-C23P1.00 *2F
$ Version MADE BY NAVIUS 2006.4.5*7F
$ TOW: 0*66
$ WK: 1340*20
$ POS: 6378137 0 0*69
$ CLK: 96250*66
$ CHNL: 12*30
$ Baud rate: 9600 System clock: 1058.797MHz*36
$GPGGA,235943.035,,,,,0,00,,,M,0.0,M,,0000*5A
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,3,1,12,20,00,000,,10,00,000,,25,00,000,,27,00,000,*79
$GPGSV,3,2,12,03,00,000,,31,00,000,,24,00,000,,15,00,000,*78
$GPGSV,3,3,12,16,00,000,,05,00,000,,01,00,000,,26,00,000,*7D
$GPRMC,235943.035,V,,,,,,,100905,,*2E
$GPGGA,235944.035,,,,,0,00,,,M,0.0,M,,0000*5D
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,3,1,12,20,00,000,,10,00,000,,25,00,000,,27,00,000,*79
$GPGSV,3,2,12,03,00,000,,31,00,000,,24,00,000,,15,00,000,*78
$GPGSV,3,3,12,16,00,000,,05,00,000,,01,00,000,,26,00,000,*7D
$GPRMC,235944.035,V,,,,,,,100905,,*29
$GPGGA,235945.035,,,,,0,00,,,M,0.0,M,,0000*5C
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
links
Updated by Dobrica Pavlinušić on Jan 22 6:03am
Posted by Dobrica Pavlinušić on Jan 13 2:39pm
Contents: [Dobrica Pavlinušić's random unstructured stuff]
|
meanIT tablet Q70
7" IPS Quad Core
recovery: extdroid4.4.2_r2-a33-v2.0
adb shell
dpavlin@siobhan:~$ adb shell
root@astar-ococci:/ #
root@astar-ococci:/ # cat /proc/cmdline
console=ttyS0,115200 root=/dev/nandd init=/init loglevel=4 specialstr= partitions=bootloader@nanda:env@nandb:boot@nandc:system@nandd:data@nande:misc@nandf:recovery@nandg:cache@nandh:metadata@nandi:private@nandj:UDISK@nandk boot_type=0 config_size=39716
root@astar-ococci:/ # cat /proc/cpuinfo
Processor : ARMv7 Processor rev 5 (v7l)
processor : 0
BogoMIPS : 5714.28
processor : 1
BogoMIPS : 4800.00
processor : 3
BogoMIPS : 4800.00
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : sun8i
Revision : 0000
Serial : 1a884915
board
AL-AX3-751B-V1.0
2015.03.26
http://linux-sunxi.org/Aoson_M751s
https://github.com/Icenowy/linux-kernel-lichee-a33/tree/aoson-m751s
USB FEL
Vol+ to enter FEL mode
Bus 003 Device 004: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode
root@x230:~# sunxi-fel ver
AWUSBFEX soc=00001667(A33) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
# read SID
root@x230:~# sunxi-fel readl 0x01c23800
0x0461872a
root@x230:~# sunxi-fel sid
0461872a:033c50c3:1a884915:00000000
device info
dpavlin@x230:~/a33$ sudo sunxi-fel read 0x42400000 0x82d0 boot1.header
# blocks and version doesn't work any more
root@x230:~# sunxi-fel -v read 0x43000000 0x20000 script.bin
# also doesn't transfer anything and hangs
dpavlin@klin:/klin/armbian/sunxi-tools$ make CROSS_COMPILE=arm-linux-gnueabihf- sunxi-meminfo
arm-linux-gnueabihf-gcc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -static -o sunxi-meminfo meminfo.c
dpavlin@klin:/klin/armbian/sunxi-tools$ make CROSS_COMPILE=arm-linux-gnueabihf- sunxi-script_extractor
arm-linux-gnueabihf-gcc -std=c99 -Wall -Wextra -Wno-unused-result -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE -D_DEFAULT_SOURCE -Iinclude/ -static -o sunxi-script_extractor script_extractor.c
# put files in /cache/ instead of /sdcard/ since /sdcard/ doesn't have executable permission
dpavlin@x230:/mnt/klin/klin/armbian/sunxi-tools$ adb push sunxi-script_extractor /cache/
[100%] /cache/sunxi-script_extractor
dpavlin@x230:/mnt/klin/klin/armbian/sunxi-tools$ adb push sunxi-meminfo /cache/
[100%] /cache/sunxi-meminfo
root@astar-ococci:/cache # ./sunxi-meminfo
Error: unknown or unhandled Soc: 0x1667
255|
# urgh!
svroot@astar-ococci:/cache # ./sunxi-script_extractor > a33.bin
root@astar-ococci:/cache # ls -al a33.bin
-rw-rw-rw- root root 131072 2017-10-18 17:57 a33.bin
u-boot
dpavlin@klin:/klin/u-boot$ git remote -v
sunxi git://git.denx.de/u-boot-sunxi.git (fetch)
sunxi git://git.denx.de/u-boot-sunxi.git (push)
dpavlin@klin:/klin/u-boot$ git checkout -b sunxi/next sunxi/next
Branch 'sunxi/next' set up to track remote branch 'next' from 'sunxi'.
Switched to a new branch 'sunxi/next'
dpavlin@klin:/klin/u-boot$ make CROSS_COMPILE=arm-linux-gnueabihf- q8_a33_tablet_1024x600_defconfig
dpavlin@klin:/klin/u-boot$ make CROSS_COMPILE=arm-linux-gnueabihf- -j4
malware pre-installed
Updated by Dobrica Pavlinušić on Dec 27 7:23pm
Posted by Dobrica Pavlinušić on Feb 3 7:30am
over the years, I accumulated few thinkpads, so here are some relative measurements between them
T22
T42
t42:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.60GHz
stepping : 6
microcode : 0x18
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
bogomips : 1196.15
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:
t42:~# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 1232 MB in 2.00 seconds = 616.23 MB/sec
Timing buffered disk reads: 100 MB in 3.02 seconds = 33.09 MB/sec
Posted by Dobrica Pavlinušić on Oct 31 3:37am
Updated by Dobrica Pavlinušić on Oct 25 7:21am
Posted by Dobrica Pavlinušić on Oct 25 7:16am
Updated by Dobrica Pavlinušić on Oct 7 5:22am
Posted by Dobrica Pavlinušić on Dec 4 8:58am
D54250WKYXH
19V - 3.42A
04/2014
Contents: [Dobrica Pavlinušić's random unstructured stuff]
|
https://downloadcenter.intel.com/product/76977/Intel-NUC-Kit-D54250WYK
bios
https://downloadcenter.intel.com/download/23607
current: WYLPT10H.86A.0021.2013.1017.1606
i5-4250U @ 1.30GHz
make sure that usb keychain you are using with F7 bios update option has GPT partition table on it!
dpavlin@x200:~$ sudo gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 3948544 sectors, 1.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7564450A-7BE4-41EA-90E3-809C8C50BE51
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3948510
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 3948510 1.9 GiB 0700 Microsoft basic data
sensors
dpavlin@nuc:~$ grep nct /etc/modules
nct6775
dpavlin@nuc:~$ sensors
nct6776-isa-0a00
Adapter: ISA adapter
Vcore: +1.77 V (min = +0.00 V, max = +1.74 V) ALARM
in1: +1.35 V (min = +0.00 V, max = +0.00 V) ALARM
AVCC: +3.34 V (min = +0.00 V, max = +0.00 V) ALARM
+3.3V: +3.34 V (min = +0.00 V, max = +0.00 V) ALARM
in4: +1.01 V (min = +0.00 V, max = +0.00 V) ALARM
in5: +0.00 V (min = +0.00 V, max = +0.00 V)
in6: +0.24 V (min = +0.00 V, max = +0.00 V) ALARM
3VSB: +3.33 V (min = +0.00 V, max = +0.00 V) ALARM
Vbat: +3.20 V (min = +0.00 V, max = +0.00 V) ALARM
fan1: 0 RPM (min = 0 RPM)
fan2: 3183 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
SYSTIN: +123.0°C (high = +0.0°C, hyst = +0.0°C) ALARM sensor = CPU diode
CPUTIN: +37.5°C (high = +80.0°C, hyst = +75.0°C) sensor = CPU diode
AUXTIN: +41.0°C (high = +80.0°C, hyst = +75.0°C) sensor = CPU diode
PECI Agent 0: +40.0°C (high = +80.0°C, hyst = +75.0°C)
(crit = +100.0°C)
PCH_CHIP_TEMP: +0.0°C (high = +80.0°C, hyst = +75.0°C)
PECI Agent 1: +0.0°C (high = +80.0°C, hyst = +75.0°C)
(crit = +0.0°C)
PCH_CPU_TEMP: +0.0°C
intrusion0: OK
intrusion1: OK
beep_enable: disabled
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +105.0°C)
temp2: +29.8°C (crit = +105.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +42.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +42.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +39.0°C (high = +100.0°C, crit = +100.0°C)
Updated by Dobrica Pavlinušić on Sep 21 12:16am
Posted by Dobrica Pavlinušić on Jan 19 1:32pm
https://www.rcgroups.com/forums/showthread.php?2458896-DJI-Phantom-3-camera-wiring-diagram
P3P uses Sony EXMOR sensor, while P3A contains a cheaper equivalent by Panasonic.
For the camera/gimbal board, the Pro model seem to have separate video compressor SoC - the DM365 chip. Noticed it here:
New P3P new cooling fan on 4K camera
The DM365 is not powerful enough for 4k, but it can compress the live video feed (FPV). This takes some load out of Ambarella SoC, and allows it to focus on compressing stream for the SD card. This is why existence of this chip makes 4k possible.
Enabling 4k in firmware would make the Ambarella overloaded, so there would be frame drops on both recorded video and live feed. But still, possible to enable.
Updated by Dobrica Pavlinušić on Aug 20 11:04am
Posted by Dobrica Pavlinušić on Aug 19 4:28am
Updated by Dobrica Pavlinušić on Aug 13 12:41am
Posted by Dobrica Pavlinušić on Jul 16 3:02am
|
Weblog Navigation
Loading...
|