Monday, August 30, 2010

My second Python book


I bought my second Python handbook called Python 3 技術手冊.  The author is the funder of http://www.python.tw/ . This handbook is exactly what I want. Sometimes that reading a technical book wrote in English is good for learning English. But for me now, the fast way to finish my first UI python program and write an unique, compact even more powerful and reuseful classes and libaries is now my first top priority after daily work. Last week I also bought a book called GIMP創意影像設計18堂課. I like this open source software, but now I can not use it. So I expectedly hope to use it as tool to design my web pictures.

ref.: http://www.gimp.org/downloads/

鉭聚合物電容VS鉭二氧化錳電容

找到一個介紹鉭聚合物電容與二氧化錳電容介紹的文章, 挺不錯的, 當參考ㄅㄟ.

Pick and Place Outputs Options


I have problem about generating Pick and Place file. The value of Center-Y is bigger than the board Y size, how can I fix this problem?
After spent some hot surfing, found http://wiki.altium.com/display/ADOH/Preparing+the+Board+for+Design+Transfer said Moving the Board Shape which I think that I successfully moved the board into origin point then go for generating pick and place file.

From Design > Board Option to check current sheet position. My sheet position is X: 25.4mm, Y:25.4mm, Width: 254mm, Height: 203.2mm.

Then follow instructions above to use Move Board Shape to move shape to oringin (0, 0). Select Edit » Move » Move Selection by X, Y, then enter X: -25.4mm, Y:-25.4mm.

Sunday, August 29, 2010

放牛班貪嗔痴癲之天龍嬤部篇-001


主向配說 : 我幫雷媽媽做事照顧她是為了彌補我以前犯的過錯, 可是她給我 1 千元, 我要是不收, 她會向鄰居說這人怎饃這樣!我上次她給我2千元, 我拒絕又不行, 那我心裡想那乾脆拿給她女兒的廟寺, 當作是添香油錢; 哪知她女兒又退還給雷媽媽, 結果又惹的她生氣. 你說我這次要怎饃做才好?!

配 : 那你這次自己拿去做好事就好了阿? 這樣你既收了她的好意, 又做點小功德 !

主 : 不是阿! 她如果又去跟人家說我拿了她的錢, 怎饃辦?

配 : 你很矛盾哩 ! 你到底是想怎樣? ! 要懺悔, 又不要人家說閒話 ! 那你就不要幫人家嘛! 幫了, 你又在煩惱 ! 你錢收了, 拿去做善事. 問心無愧, 你管她愛怎饃說三道四, 隨她去嘛 !

配心裡納悶 OS : 你這是哪門子的懺悔與做好事!

Saturday, August 28, 2010

放牛班貪嗔痴癲之天龍霉部練瘋話-001


場景一,
叔 : 你剩多少錢阿?
霉: 不知道耶! 哪你還說要回宜蘭看阿嬤, 你連多少錢都不知道, 你說要回宜蘭.
叔心中又是佩服佩服 : 厲害厲害!

場景二,

霉 :  叔叔你跟阿嬤說我只剩300喔! 我好失望!
叔 : 活該 !
叔 : 你怕丟臉喔! 每月賺的錢, 到今天只剩 300 ; 只有三種現象會變成這樣 : 吃很好, 玩很大, 粧很多.
叔心中納悶 : 厲害厲害!

Soldering Paste caused an unexpected failure


Today I tried to reflash a SIE platform which is one top side with two layers pcb, so all the parts on top sides. I replaced a 64MB instead of 32MB. After that, I can not reflash rootfs image at some blocks and got fail.

My test script file is as:
#!/bin/bash
ROOTFS=openwrt-xburst-qi_lb60-root.ubi
sudo usbboot -f ./usbboot_2gb_nand.cfg  -c "boot"
sudo usbboot -f ./usbboot_2gb_nand.cfg  -c "nerase 16 512 0 0"
sudo usbboot -f ./usbboot_2gb_nand.cfg  -c "nprog 2048 $ROOTFS 0 0 -n"

adam@adam-laptop:~/sie_aw_reflash/sie_fs$ ./program_rootfs.sh
[sudo] password for adam:
usbboot - Ingenic XBurst USB Boot Utility
(c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner
This program is Free Software and comes with ABSOLUTELY NO WARRANTY.

Now checking whether all configure args valid: YES
Current device information:
CPU type is Ingenic XBurst Jz4740
Crystal work at 12MHz, the CCLK up to 252MHz and PMH_CLK up to 84MHz
SDRAM Total size is 32 MB, work in 4 bank and 16 bit mode
Nand page per block 128, Nand page size 4096, ECC offset in OOB 12, bad block offset in OOB 0, bad block page 127, use 1 plane mode
 Execute command: boot
 CPU data: Boot4740
 Already booted.
usbboot - Ingenic XBurst USB Boot Utility
(c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner
This program is Free Software and comes with ABSOLUTELY NO WARRANTY.

Now checking whether all configure args valid: YES
Current device information:
CPU type is Ingenic XBurst Jz4740
Crystal work at 12MHz, the CCLK up to 252MHz and PMH_CLK up to 84MHz
SDRAM Total size is 32 MB, work in 4 bank and 16 bit mode
Nand page per block 128, Nand page size 4096, ECC offset in OOB 12, bad block offset in OOB 0, bad block page 127, use 1 plane mode
 Execute command: nerase 16 512 0 0
 CPU data: Boot4740
 Erasing No.0 device No.0 flash (start_blk 16 blk_num 512)......
 Finish! Return: 00 08 01 00 00 00 00 00 (position 528)
 Force erase, no bad block infomation!
usbboot - Ingenic XBurst USB Boot Utility
(c) 2009 Ingenic Semiconductor Inc., Qi Hardware Inc., Xiangfu Liu, Marek Lindner
This program is Free Software and comes with ABSOLUTELY NO WARRANTY.

Now checking whether all configure args valid: YES
Current device information:
CPU type is Ingenic XBurst Jz4740
Crystal work at 12MHz, the CCLK up to 252MHz and PMH_CLK up to 84MHz
SDRAM Total size is 32 MB, work in 4 bank and 16 bit mode
Nand page per block 128, Nand page size 4096, ECC offset in OOB 12, bad block offset in OOB 0, bad block page 127, use 1 plane mode
 Execute command: nprog 2048 openwrt-xburst-qi_lb60-root.ubi 0 0 -n
 Programing No.0 device, flen 78118912, start page 2048...
 CPU data: Boot4740
 Erasing No.0 device No.0 flash (start_blk 16 blk_num 149)......
 Finish! Return: 80 52 00 00 00 00 00 00 (position 165)
 Force erase, no bad block infomation!
 Size to send 78118912, transfer_size 524288
 Image type : without oob
 It will cause 149 times buffer transfer.
 Writing NAND page 2048 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2048 page_num 128)
 Checking 524288 bytes... Comparing 524288 bytes - SUCCESS
 End at Page: 2176
 Writing NAND page 2176 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2176 page_num 128)
 Checking 524288 bytes... Comparing 524288 bytes - FAIL at off 0, wrote 0x55, read 0xff
  off 0 write: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 00
  off 0 read:  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 CPU data: Boot4740
 mark bad block : 17
 Mark bad block at 17
 End at Page: 2304
 Writing NAND page 2304 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2304 page_num 128)
 Checking 524288 bytes... Comparing 524288 bytes - SUCCESS
 End at Page: 2432
 Writing NAND page 2432 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2432 page_num 128)
 Checking 524288 bytes... Comparing 524288 bytes - SUCCESS
 End at Page: 2560
 Writing NAND page 2560 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2560 page_num 128)
 Checking 524288 bytes... Comparing 524288 bytes - FAIL at off 32, wrote 0x0, read 0x2
  off 24 write: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  off 24 read:  00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00
 CPU data: Boot4740
 mark bad block : 20
 Mark bad block at 20
 End at Page: 2688
 Writing NAND page 2688 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2688 page_num 128)
 Checking 524288 bytes... Comparing 524288 bytes - FAIL at off 0, wrote 0x55, read 0xff
  off 0 write: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 00
  off 0 read:  ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 CPU data: Boot4740
 mark bad block : 21
 Mark bad block at 21
 End at Page: 2816
 Writing NAND page 2816 len 524288...
 CPU data: Boot4740
 Finish! (len 524288 start_page 2816 page_num 128)
Error - can't set the address on Ingenic device: -110
Error - can't set data length on Ingenic device: -110
Error - can't set Ingenic device nand ops: -110
Error - can't read bulk data from Ingenic device:-110
Error - can't read bulk data from Ingenic device:-110
 Checking 524288 bytes... Comparing 524288 bytes - FAIL at off 0, wrote 0x55, read 0x35
  off 0 write: 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 00
  off 0 read:  35 18 04 00 74 15 80 04 03 00 80 04 f1 04 bb 02
 End at Page: -297579704
 Skip a old bad block !
 Writing NAND page -297579704 len 524288...
Error - can't retrieve XBurst CPU information: -110
 Device unboot! Boot it first!

The root cause was that I didn't clean soldering paste well with cleaner around SDRAM. Actually this is surprised for me! Since I frequently didn't clean soldering paste after rework or repair while faced over than or equally 4 layers pcba. So this implies another phenomenon. The data bus run along only top side is really dangerous and easily encountered unexpected equivalent impedance caused by other materials mixed with buses.

Wednesday, August 25, 2010

minicom


/# minicom -s
In [configuration] menu, > "Serial port setup"
A - Serial Device : /dev/ttyS0
E - Bps/Par/Bits : 57600 8N1
F - Hardware Flow Control : No
G - Software Flow Control : No

In [configuration] menu, > "Serial setup as dfl"
> "Exit" or "Exit from Minicom"

then press CTRL - "A" then "X" to exit.

Tuesday, August 24, 2010

放牛班貪嗔痴癲之轟出家門篇-001


場景一,

甲母 : 又做錯事了, XD , 我怕了; 別人教得好, 你讓他們問問看看怎教比較好, 萬一弄不好, 又怪我們頭上來, 成了冤大頭了, 我可不要!

乙女 : 哭著打電話問 丙 『我瞞著甲母說我做錯了嫁禍給姊姊要怎給出個作法怎辦才好 !!!』

丙男 : 喔!這樣喔!把電話拿給丁父聽 !

丙男 : 要交代是嗎? 錯都錯了, 你是要乙女給出個交代是嗎 ?

丁父 : 是. 做錯事要給出個辦法來阿?!甲母是這樣的, 是我的話就不用!
丙男 : 喔!你年紀輕時, 都不會犯錯吼!? 甲母是皇帝嗎 ? 一定要給出個交代才行是喔 !!!???
丙男 : 哇 ! 我看你們都病了, 真是病了; 雖不至於病到變態, 但真是 XD 病了!!!
... 被丁父掛電話了....

... 幾分鐘後...

乙女 : 哭著打電話給丙男, 『丁父, 要我現在回阿嬤家去!!!』


場景二,

甲母、丁父 : ㄟㄟ~老公老婆~阿我們都先挪用別人的錢, 現在慘跌耶, 回收不來了, 阿怎辦才好???

甲母 : 嗯~是; 說了會丟死人, 還是別說得好, ...你給我好好管好 XX 女就好.



場景三,

甲母 : 不要做出讓我會丟臉的事, 這樣你叫我要怎饃做人!!! 如果不聽話或是有想離家出走的念頭, 就是背叛我!
丁父對著兩女說教 : 你們這樣不受教, 你們也體諒一下甲母的用心苦心, 你們會不會做人家的女兒阿!!! 想要人疼, 就該要懂事一點阿!!!
丙男 : 喔! 這樣喔! 厲害厲害!