Index: output/eeprom.dat
===================================================================
--- /branch/USB/dongle/output/eeprom.dat	(revision 2791)
+++ /branch/USB/dongle/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-6e
+7a
 11
 c2
 84
@@ -11,7 +11,7 @@
 c0
 42
 83
-9f
+a2
 c0
 44
 83
@@ -695,11 +695,11 @@
 20
 40
 03
-b4
+b7
 20
 40
 03
-d4
+d7
 20
 20
 01
@@ -779,7 +779,7 @@
 20
 20
 03
-d4
+d7
 70
 48
 b9
@@ -787,7 +787,7 @@
 20
 20
 03
-d4
+d7
 1c
 42
 7e
@@ -811,7 +811,7 @@
 20
 40
 03
-af
+b2
 60
 08
 c8
@@ -827,7 +827,7 @@
 20
 20
 03
-d4
+d7
 20
 40
 00
@@ -987,7 +987,7 @@
 20
 20
 03
-b4
+b7
 20
 40
 01
@@ -2003,7 +2003,7 @@
 20
 40
 03
-ee
+f1
 24
 77
 80
@@ -2291,7 +2291,7 @@
 20
 40
 03
-b4
+b7
 68
 00
 c8
@@ -2319,7 +2319,7 @@
 20
 40
 03
-a8
+ab
 60
 08
 c8
@@ -2327,7 +2327,7 @@
 20
 40
 03
-af
+b2
 60
 08
 c8
@@ -2347,7 +2347,7 @@
 20
 40
 03
-d8
+db
 60
 08
 c8
@@ -2371,7 +2371,7 @@
 20
 40
 03
-dc
+df
 60
 00
 c8
@@ -2395,7 +2395,7 @@
 20
 40
 03
-b4
+b7
 68
 00
 c8
@@ -2423,7 +2423,7 @@
 20
 40
 03
-a8
+ab
 60
 08
 c8
@@ -2431,7 +2431,7 @@
 20
 40
 03
-af
+b2
 60
 08
 c8
@@ -2451,7 +2451,7 @@
 20
 40
 03
-d8
+db
 60
 08
 c8
@@ -2475,7 +2475,7 @@
 20
 40
 03
-dc
+df
 60
 00
 c8
@@ -2495,7 +2495,7 @@
 20
 40
 03
-b4
+b7
 68
 00
 c8
@@ -2523,7 +2523,7 @@
 20
 40
 03
-a8
+ab
 60
 08
 c8
@@ -2531,7 +2531,7 @@
 20
 40
 03
-af
+b2
 60
 08
 c8
@@ -2551,7 +2551,7 @@
 20
 40
 03
-d8
+db
 60
 08
 c8
@@ -2663,15 +2663,15 @@
 20
 40
 03
-c2
+c5
 20
 40
 04
-38
+3b
 20
 20
 04
-30
+33
 70
 48
 36
@@ -3709,9 +3709,21 @@
 80
 43
 20
+40
+64
+0d
+70
+89
+5b
+86
+70
+89
+5c
+a0
 20
 20
-03
+20
+04
 18
 00
 2a
@@ -3739,7 +3751,7 @@
 20
 40
 03
-a8
+ab
 60
 08
 c8
@@ -3823,7 +3835,7 @@
 c2
 00
 03
-b8
+bb
 1a
 22
 7e
@@ -3931,7 +3943,7 @@
 20
 40
 03
-d8
+db
 60
 08
 c8
@@ -3943,7 +3955,7 @@
 20
 40
 03
-dc
+df
 18
 40
 84
@@ -4067,7 +4079,7 @@
 20
 40
 03
-e5
+e8
 78
 57
 fc
@@ -4103,7 +4115,7 @@
 24
 2c
 04
-33
+36
 78
 46
 fc
@@ -4143,7 +4155,7 @@
 24
 22
 84
-30
+33
 09
 80
 00
@@ -4167,7 +4179,7 @@
 20
 22
 84
-15
+18
 68
 00
 c7
@@ -4183,7 +4195,7 @@
 24
 20
 84
-30
+33
 09
 80
 00
@@ -4207,7 +4219,7 @@
 20
 22
 84
-1f
+22
 09
 80
 00
@@ -4223,7 +4235,7 @@
 c2
 00
 04
-1b
+1e
 09
 80
 00
@@ -4259,7 +4271,7 @@
 20
 23
 04
-30
+33
 78
 37
 fc
@@ -4307,11 +4319,11 @@
 20
 40
 03
-a1
+a4
 20
 20
 04
-30
+33
 20
 40
 29
@@ -4339,11 +4351,11 @@
 20
 40
 03
-e5
+e8
 20
 40
 04
-35
+38
 79
 20
 2a
@@ -4423,7 +4435,7 @@
 c2
 00
 04
-4e
+51
 68
 00
 c8
@@ -4464,8 +4476,8 @@
 60
 00
 00
-f0
-5b
+0f
+3b
 aa
 55
 01
@@ -5035,20 +5047,8 @@
 42
 00
 84
-3c
-ed
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+01
+23
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-45
-5d
+09
+4b
Index: output/program.lis
===================================================================
--- /branch/USB/dongle/output/program.lis	(revision 2791)
+++ /branch/USB/dongle/output/program.lis	(working copy)
@@ -1,7 +1,7 @@
               include "bt_format "
               org 0x0000
 0000 c284000a bbit1 8 ,pf_patch_ext 
-0001 c042839f beq patch10_5 ,p_shutdown_radio 
+0001 c04283a2 beq patch10_5 ,p_shutdown_radio 
 0002 c044837a beq patch11_1 ,p_set_freq_tx 
 0003 c000039a beq patch00_0 ,p_soft_reset 
 0004 c047000b beq patch11_6 ,p_save_rssi 
@@ -232,8 +232,8 @@
 00a9 7048b001 jam 1 ,mem_24g_abort_packet 
 00aa 70483500 jam 0 ,mem_24g_pid 
 00ab 6802489f fetch 4 ,mem_24g_rx_addr 
-00ac 204003b4 call p_g24_update_addr_and_synccrc8 
-00ad 204003d4 call p_g24_ch 
+00ac 204003b7 call p_g24_update_addr_and_synccrc8 
+00ad 204003d7 call p_g24_ch 
 00ae 20200102 branch p_g24_rx_interrupt_clear 
 
 p_g24_ch_process:
@@ -255,11 +255,11 @@
 00be 793ffe1c set0 28 ,pdata 
 00bf 600248b2 store 4 ,mem_24g_hop_btclk 
 00c0 7048b001 jam 1 ,mem_24g_abort_packet 
-00c1 202003d4 branch p_g24_ch 
+00c1 202003d7 branch p_g24_ch 
 
 p_g24_ch_receive_hop_pac:
 00c2 7048b900 jam 0 ,mem_24g_hop_packet 
-00c3 202003d4 branch p_g24_ch 
+00c3 202003d7 branch p_g24_ch 
 
 p_g24_ch_timer_reinit:
 00c4 1c427e00 copy clkn_bt ,pdata 
@@ -269,11 +269,11 @@
 
 p_g24_noise_rssi:
 00c8 da200d9e arg mem_rssi_noise_buffer ,rega 
-00c9 204003af call p_rssi_average 
+00c9 204003b2 call p_rssi_average 
 00ca 6008c8ef storet 1 ,mem_rssi_noise_avg 
 00cb 18467c50 sub temp ,rssi_thresh_noise ,null 
 00cc 24610000 nrtn positive 
-00cd 202003d4 branch p_g24_ch 
+00cd 202003d7 branch p_g24_ch 
 
 p_g24_blank_data_process:
 00ce 204000d1 call p_g24_ms_blank_data 
@@ -325,7 +325,7 @@
 00f2 70483500 jam 0 ,mem_24g_pid 
 00f3 7048404e jam g24_pair_ch ,mem_24g_ch 
 00f4 68024842 fetch 4 ,mem_24g_paring_addr 
-00f5 202003b4 branch p_g24_update_addr_and_synccrc8 
+00f5 202003b7 branch p_g24_update_addr_and_synccrc8 
 
 p_g24_dongle_bind_data_process:
 00f6 204001f2 call p_g24_receive_transmit_ack 
@@ -697,7 +697,7 @@
 
 p_g24_receive_transmit_ack:
 01f2 20400102 call p_g24_rx_interrupt_clear 
-01f3 204003ee call p_g24_receive_packet 
+01f3 204003f1 call p_g24_receive_packet 
 01f4 24778000 nrtn user3 
 01f5 20200291 branch p_g24_transmit_ack 
 
@@ -789,21 +789,21 @@
 0238 2040010a call p_g24_dongle_bind_ms_payload_cfg 
 0239 680248da fetch 4 ,mem_24g_ms_addr 
 023a 203a022f branch p_g24_rx_auto_addr_ch_search ,blank 
-023b 204003b4 call p_g24_update_addr_and_synccrc8 
+023b 204003b7 call p_g24_update_addr_and_synccrc8 
 023c 6800c8e6 fetch 1 ,mem_24g_ms_config_ch_once 
 023d 205a024d call p_g24_ms_config_ch_once ,blank 
 023e 6800c8e4 fetch 1 ,mem_24g_ms_last_ch 
 023f 6000c840 store 1 ,mem_24g_ch 
 0240 6808c8f7 fetcht 1 ,mem_rssi_noise_ms_index 
 0241 da200f9e arg mem_rssi_noise_ms_buffer ,rega 
-0242 204003a8 call p_rssi_store 
+0242 204003ab call p_rssi_store 
 0243 6008c8f7 storet 1 ,mem_rssi_noise_ms_index 
-0244 204003af call p_rssi_average 
+0244 204003b2 call p_rssi_average 
 0245 6008c8f4 storet 1 ,mem_rssi_noise_ms_avg 
 0246 18467c50 sub temp ,rssi_thresh_noise ,null 
 0247 24610000 nrtn positive 
 0248 6808c8e5 fetcht 1 ,mem_24g_ms_ch_number 
-0249 204003d8 call p_g24_ch_map_size 
+0249 204003db call p_g24_ch_map_size 
 024a 6008c8e5 storet 1 ,mem_24g_ms_ch_number 
 024b 6000c8e4 store 1 ,mem_24g_ms_last_ch 
 024c 20600000 rtn 
@@ -811,7 +811,7 @@
 p_g24_ms_config_ch_once:
 024d 7048e601 jam 1 ,mem_24g_ms_config_ch_once 
 024e d8400000 arg 0 ,temp 
-024f 204003dc call p_g24_ch_calc 
+024f 204003df call p_g24_ch_calc 
 0250 6000c8e4 store 1 ,mem_24g_ms_last_ch 
 0251 20600000 rtn 
 
@@ -819,21 +819,21 @@
 0252 20400110 call p_g24_dongle_bind_kb_payload_cfg 
 0253 680248d6 fetch 4 ,mem_24g_kb_addr 
 0254 203a022f branch p_g24_rx_auto_addr_ch_search ,blank 
-0255 204003b4 call p_g24_update_addr_and_synccrc8 
+0255 204003b7 call p_g24_update_addr_and_synccrc8 
 0256 6800c8e3 fetch 1 ,mem_24g_kb_config_ch_once 
 0257 205a0267 call p_g24_kb_config_ch_once ,blank 
 0258 6800c8e1 fetch 1 ,mem_24g_kb_last_ch 
 0259 6000c840 store 1 ,mem_24g_ch 
 025a 6808c8f6 fetcht 1 ,mem_rssi_noise_kb_index 
 025b da20109e arg mem_rssi_noise_kb_buffer ,rega 
-025c 204003a8 call p_rssi_store 
+025c 204003ab call p_rssi_store 
 025d 6008c8f6 storet 1 ,mem_rssi_noise_kb_index 
-025e 204003af call p_rssi_average 
+025e 204003b2 call p_rssi_average 
 025f 6008c8f3 storet 1 ,mem_rssi_noise_kb_avg 
 0260 18467c50 sub temp ,rssi_thresh_noise ,null 
 0261 24610000 nrtn positive 
 0262 6808c8e2 fetcht 1 ,mem_24g_kb_ch_number 
-0263 204003d8 call p_g24_ch_map_size 
+0263 204003db call p_g24_ch_map_size 
 0264 6008c8e2 storet 1 ,mem_24g_kb_ch_number 
 0265 6000c8e1 store 1 ,mem_24g_kb_last_ch 
 0266 20600000 rtn 
@@ -841,28 +841,28 @@
 p_g24_kb_config_ch_once:
 0267 7048e301 jam 1 ,mem_24g_kb_config_ch_once 
 0268 d8400000 arg 0 ,temp 
-0269 204003dc call p_g24_ch_calc 
+0269 204003df call p_g24_ch_calc 
 026a 6000c8e1 store 1 ,mem_24g_kb_last_ch 
 026b 20600000 rtn 
 
 p_g24_rx_auto_bind_config_dongle:
 026c 2040010a call p_g24_dongle_bind_ms_payload_cfg 
 026d 6802489f fetch 4 ,mem_24g_rx_addr 
-026e 204003b4 call p_g24_update_addr_and_synccrc8 
+026e 204003b7 call p_g24_update_addr_and_synccrc8 
 026f 6800c8e0 fetch 1 ,mem_24g_dg_config_ch_once 
 0270 205a0280 call p_g24_dg_config_ch_once ,blank 
 0271 6800c8de fetch 1 ,mem_24g_dg_last_ch 
 0272 6000c840 store 1 ,mem_24g_ch 
 0273 6808c8f5 fetcht 1 ,mem_rssi_noise_dg_index 
 0274 da200e9e arg mem_rssi_noise_dg_buffer ,rega 
-0275 204003a8 call p_rssi_store 
+0275 204003ab call p_rssi_store 
 0276 6008c8f5 storet 1 ,mem_rssi_noise_dg_index 
-0277 204003af call p_rssi_average 
+0277 204003b2 call p_rssi_average 
 0278 6008c8f2 storet 1 ,mem_rssi_noise_dg_avg 
 0279 18467c50 sub temp ,rssi_thresh_noise ,null 
 027a 24610000 nrtn positive 
 027b 6808c8df fetcht 1 ,mem_24g_dg_ch_number 
-027c 204003d8 call p_g24_ch_map_size 
+027c 204003db call p_g24_ch_map_size 
 027d 6008c8df storet 1 ,mem_24g_dg_ch_number 
 027e 6000c8de store 1 ,mem_24g_dg_last_ch 
 027f 20600000 rtn 
@@ -898,11 +898,11 @@
 
 p_g24tx_with_ack:
 0297 2040029b call p_g24_ackpayload_prep 
-0298 204003c2 call p_g24_transmit_prep 
-0299 20400438 call p_g24_transmit 
+0298 204003c5 call p_g24_transmit_prep 
+0299 2040043b call p_g24_transmit 
 
 p_g24tx_no_ack:
-029a 20200430 branch p_g24_end_of_packet 
+029a 20200433 branch p_g24_end_of_packet 
 
 p_g24_ackpayload_prep:
 029b 70483600 jam 0 ,mem_24g_datalen 
@@ -1240,239 +1240,242 @@
 039b 68108043 hfetch 1 ,core_config 
 039c 79207e03 set1 watchdog_bit ,pdata 
 039d 60108043 hstore 1 ,core_config 
-039e 20202003 branch soft_reset + 2 
+039e 2040640d call spi_ncs_gpio_init 
+039f 70895b86 jam 0x86 ,0x895b 
+03a0 70895ca0 jam 0xa0 ,0x895c 
+03a1 20202004 branch soft_reset + 3 
 
 p_shutdown_radio:
-039f 18002a08 force 8 ,radio_ctrl 
-03a0 202028fa branch shutdown_radio + 1 
+03a2 18002a08 force 8 ,radio_ctrl 
+03a3 202028fa branch shutdown_radio + 1 
 
 p_rssi_noise:
-03a1 204029bb call save_rssi 
-03a2 207a0000 rtn blank 
-03a3 6808c8f0 fetcht 1 ,mem_rssi_noise_index 
-03a4 da200d9e arg mem_rssi_noise_buffer ,rega 
-03a5 204003a8 call p_rssi_store 
-03a6 6008c8f0 storet 1 ,mem_rssi_noise_index 
-03a7 20600000 rtn 
+03a4 204029bb call save_rssi 
+03a5 207a0000 rtn blank 
+03a6 6808c8f0 fetcht 1 ,mem_rssi_noise_index 
+03a7 da200d9e arg mem_rssi_noise_buffer ,rega 
+03a8 204003ab call p_rssi_store 
+03a9 6008c8f0 storet 1 ,mem_rssi_noise_index 
+03aa 20600000 rtn 
 
 p_rssi_store:
-03a8 1a227e00 copy rega ,pdata 
-03a9 98408a00 iadd temp ,contw 
-03aa 68008018 fetch 1 ,mem_rssi 
-03ab e0a08000 istore 1 ,contw 
-03ac 18408401 increase 1 ,temp 
-03ad 184104ff and_into rssi_buf_len_noise ,temp 
-03ae 20600000 rtn 
+03ab 1a227e00 copy rega ,pdata 
+03ac 98408a00 iadd temp ,contw 
+03ad 68008018 fetch 1 ,mem_rssi 
+03ae e0a08000 istore 1 ,contw 
+03af 18408401 increase 1 ,temp 
+03b0 184104ff and_into rssi_buf_len_noise ,temp 
+03b1 20600000 rtn 
 
 p_rssi_average:
-03af d8400000 arg 0 ,temp 
-03b0 df200100 arg rssi_buf_len_noise + 1 ,loopcnt 
-03b1 1a220c00 copy rega ,contr 
-03b2 20202e64 branch rssi_average_loop 
-03b3 20600000 rtn 
+03b2 d8400000 arg 0 ,temp 
+03b3 df200100 arg rssi_buf_len_noise + 1 ,loopcnt 
+03b4 1a220c00 copy rega ,contr 
+03b5 20202e64 branch rssi_average_loop 
+03b6 20600000 rtn 
 
 p_g24_update_addr_and_synccrc8:
-03b4 6002485e store 4 ,mem_24g_addr 
+03b7 6002485e store 4 ,mem_24g_addr 
 
 p_g24_syncword_crc8:
-03b5 da200000 arg 0 ,rega 
-03b6 df200004 arg 4 ,loopcnt 
-03b7 d8c0485e arg mem_24g_addr ,contr 
+03b8 da200000 arg 0 ,rega 
+03b9 df200004 arg 4 ,loopcnt 
+03ba d8c0485e arg mem_24g_addr ,contr 
 
 p_g24_syncword_crc8_loop:
-03b8 e8c08000 ifetch 1 ,contr 
-03b9 9a20a200 iadd rega ,rega 
-03ba c20003b8 loop p_g24_syncword_crc8_loop 
-03bb 1a227e00 copy rega ,pdata 
-03bc 600148e7 store 2 ,mem_24g_syncword 
-03bd 6800c8e7 fetch 1 ,mem_24g_syncword 
-03be 6808c8e8 fetcht 1 ,mem_24g_syncword + 1 
-03bf 9840fe00 iadd temp ,pdata 
-03c0 6000c8e9 store 1 ,mem_24g_syncword_crc8 
-03c1 20600000 rtn 
+03bb e8c08000 ifetch 1 ,contr 
+03bc 9a20a200 iadd rega ,rega 
+03bd c20003bb loop p_g24_syncword_crc8_loop 
+03be 1a227e00 copy rega ,pdata 
+03bf 600148e7 store 2 ,mem_24g_syncword 
+03c0 6800c8e7 fetch 1 ,mem_24g_syncword 
+03c1 6808c8e8 fetcht 1 ,mem_24g_syncword + 1 
+03c2 9840fe00 iadd temp ,pdata 
+03c3 6000c8e9 store 1 ,mem_24g_syncword_crc8 
+03c4 20600000 rtn 
 
 p_g24_transmit_prep:
-03c2 6800c836 fetch 1 ,mem_24g_datalen 
-03c3 1fe0fe02 increase 2 ,pdata 
-03c4 6000c838 store 1 ,mem_24g_txlen 
-03c5 6800c837 fetch 1 ,mem_24g_data_type 
-03c6 6000c7f2 store 1 ,mem_24g_txpayload 
-03c7 6800c836 fetch 1 ,mem_24g_datalen 
-03c8 1fe9fe00 lshift3 pdata ,pdata 
-03c9 6808c835 fetcht 1 ,mem_24g_pid 
-03ca 18410403 and temp ,0x03 ,temp 
-03cb 18438400 lshift temp ,temp 
-03cc 9841fe00 ior temp ,pdata 
-03cd 6808c872 fetcht 1 ,mem_24g_no_ack 
-03ce 9840fe00 iadd temp ,pdata 
-03cf e0a08000 istore 1 ,contw 
-03d0 6800c836 fetch 1 ,mem_24g_datalen 
-03d1 98007200 iforce loopcnt 
-03d2 d8c047d2 arg mem_24g_txbuf ,contr 
-03d3 20207f01 branch memcpy 
+03c5 6800c836 fetch 1 ,mem_24g_datalen 
+03c6 1fe0fe02 increase 2 ,pdata 
+03c7 6000c838 store 1 ,mem_24g_txlen 
+03c8 6800c837 fetch 1 ,mem_24g_data_type 
+03c9 6000c7f2 store 1 ,mem_24g_txpayload 
+03ca 6800c836 fetch 1 ,mem_24g_datalen 
+03cb 1fe9fe00 lshift3 pdata ,pdata 
+03cc 6808c835 fetcht 1 ,mem_24g_pid 
+03cd 18410403 and temp ,0x03 ,temp 
+03ce 18438400 lshift temp ,temp 
+03cf 9841fe00 ior temp ,pdata 
+03d0 6808c872 fetcht 1 ,mem_24g_no_ack 
+03d1 9840fe00 iadd temp ,pdata 
+03d2 e0a08000 istore 1 ,contw 
+03d3 6800c836 fetch 1 ,mem_24g_datalen 
+03d4 98007200 iforce loopcnt 
+03d5 d8c047d2 arg mem_24g_txbuf ,contr 
+03d6 20207f01 branch memcpy 
 
 p_g24_ch:
-03d4 6808c841 fetcht 1 ,mem_24g_current_ch_number 
-03d5 204003d8 call p_g24_ch_map_size 
-03d6 6008c841 storet 1 ,mem_24g_current_ch_number 
-03d7 20600000 rtn 
+03d7 6808c841 fetcht 1 ,mem_24g_current_ch_number 
+03d8 204003db call p_g24_ch_map_size 
+03d9 6008c841 storet 1 ,mem_24g_current_ch_number 
+03da 20600000 rtn 
 
 p_g24_ch_map_size:
-03d8 204003dc call p_g24_ch_calc 
-03d9 18408401 increase 1 ,temp 
-03da 18410403 and_into 3 ,temp 
-03db 20600000 rtn 
+03db 204003df call p_g24_ch_calc 
+03dc 18408401 increase 1 ,temp 
+03dd 18410403 and_into 3 ,temp 
+03de 20600000 rtn 
 
 p_g24_ch_calc:
-03dc 6800c85e fetch 1 ,mem_24g_addr 
-03dd 1fe17e03 and_into 0x03 ,pdata 
-03de 1fefa204 mul32 pdata ,4 ,rega 
-03df 58004847 setarg mem_24g_ch_map1 
-03e0 9a20fe00 iadd rega ,pdata 
-03e1 98408c00 iadd temp ,contr 
-03e2 e8c08000 ifetch 1 ,contr 
-03e3 6000c840 store 1 ,mem_24g_ch 
-03e4 20600000 rtn 
+03df 6800c85e fetch 1 ,mem_24g_addr 
+03e0 1fe17e03 and_into 0x03 ,pdata 
+03e1 1fefa204 mul32 pdata ,4 ,rega 
+03e2 58004847 setarg mem_24g_ch_map1 
+03e3 9a20fe00 iadd rega ,pdata 
+03e4 98408c00 iadd temp ,contr 
+03e5 e8c08000 ifetch 1 ,contr 
+03e6 6000c840 store 1 ,mem_24g_ch 
+03e7 20600000 rtn 
 
 p_g24_prep:
-03e5 7844fc00 disable enable_crc 
-03e6 7843fc00 disable enable_white 
-03e7 58555555 setarg 0x555555 
-03e8 98001e00 iforce crc24_init 
-03e9 6800c840 fetch 1 ,mem_24g_ch 
-03ea 1fed8400 reverse pdata ,temp 
-03eb 79200401 set1 1 ,temp 
-03ec 18431c00 rshift temp ,white_init 
-03ed 20600000 rtn 
+03e8 7844fc00 disable enable_crc 
+03e9 7843fc00 disable enable_white 
+03ea 58555555 setarg 0x555555 
+03eb 98001e00 iforce crc24_init 
+03ec 6800c840 fetch 1 ,mem_24g_ch 
+03ed 1fed8400 reverse pdata ,temp 
+03ee 79200401 set1 1 ,temp 
+03ef 18431c00 rshift temp ,white_init 
+03f0 20600000 rtn 
 
 p_g24_receive_packet:
-03ee 204053c4 call le_enable 
-03ef 6802485e fetch 4 ,mem_24g_addr 
-03f0 98001200 iforce access 
-03f1 20402918 call set_sync_on 
-03f2 6808c840 fetcht 1 ,mem_24g_ch 
-03f3 2040291f call set_freq_rx 
-03f4 58000500 setarg param_pll_setup 
-03f5 20402a8f call sleep 
-03f6 20402924 call rf_rx_enable 
+03f1 204053c4 call le_enable 
+03f2 6802485e fetch 4 ,mem_24g_addr 
+03f3 98001200 iforce access 
+03f4 20402918 call set_sync_on 
+03f5 6808c840 fetcht 1 ,mem_24g_ch 
+03f6 2040291f call set_freq_rx 
+03f7 58000500 setarg param_pll_setup 
+03f8 20402a8f call sleep 
+03f9 20402924 call rf_rx_enable 
 
 p_g24_receive_rxon:
-03f7 204003e5 call p_g24_prep 
-03f8 7857fc00 disable user3 
-03f9 7826fc00 enable decode_fec0 
-03fa 7830fc00 enable is_rx 
-03fb 78507c00 disable is_tx 
-03fc 78287c00 enable swfine 
-03fd 68014839 fetch 2 ,mem_24g_rx_window 
-03fe 98003600 iforce stop_watch 
-03ff 37c18400 correlate null ,timeout 
-0400 242c0433 nbranch p_g24_sync_timeout ,sync 
-0401 7846fc00 disable decode_fec0 
-0402 7825fc00 enable decode_fec1 
-0403 7823fc00 enable enable_white 
-0404 7824fc00 enable enable_crc 
-0405 09800008 parse demod ,bucket ,8 
-0406 19897e00 rshift3 pwindow ,pdata 
-0407 6000c8ea store 1 ,mem_24g_get_syncword_crc8 
-0408 6808c8e9 fetcht 1 ,mem_24g_syncword_crc8 
-0409 98467c00 isub temp ,null 
-040a 24228430 nbranch p_g24_end_of_packet ,zero 
-040b 09800008 parse demod ,bucket ,8 
-040c 19897e00 rshift3 pwindow ,pdata 
-040d 6000c7b0 store 1 ,mem_24g_rxbuf 
-040e 6800c87c fetch 1 ,mem_24g_mode 
-040f 1fe67c02 sub pdata ,rx_24g ,null 
-0410 20228415 branch p_g24_receive_skip ,zero 
-0411 6800c7b0 fetch 1 ,mem_24g_rxbuf 
-0412 6808c837 fetcht 1 ,mem_24g_data_type 
-0413 a8400e00 icompare bits_data ,temp 
-0414 24208430 nbranch p_g24_end_of_packet ,true 
+03fa 204003e8 call p_g24_prep 
+03fb 7857fc00 disable user3 
+03fc 7826fc00 enable decode_fec0 
+03fd 7830fc00 enable is_rx 
+03fe 78507c00 disable is_tx 
+03ff 78287c00 enable swfine 
+0400 68014839 fetch 2 ,mem_24g_rx_window 
+0401 98003600 iforce stop_watch 
+0402 37c18400 correlate null ,timeout 
+0403 242c0436 nbranch p_g24_sync_timeout ,sync 
+0404 7846fc00 disable decode_fec0 
+0405 7825fc00 enable decode_fec1 
+0406 7823fc00 enable enable_white 
+0407 7824fc00 enable enable_crc 
+0408 09800008 parse demod ,bucket ,8 
+0409 19897e00 rshift3 pwindow ,pdata 
+040a 6000c8ea store 1 ,mem_24g_get_syncword_crc8 
+040b 6808c8e9 fetcht 1 ,mem_24g_syncword_crc8 
+040c 98467c00 isub temp ,null 
+040d 24228433 nbranch p_g24_end_of_packet ,zero 
+040e 09800008 parse demod ,bucket ,8 
+040f 19897e00 rshift3 pwindow ,pdata 
+0410 6000c7b0 store 1 ,mem_24g_rxbuf 
+0411 6800c87c fetch 1 ,mem_24g_mode 
+0412 1fe67c02 sub pdata ,rx_24g ,null 
+0413 20228418 branch p_g24_receive_skip ,zero 
+0414 6800c7b0 fetch 1 ,mem_24g_rxbuf 
+0415 6808c837 fetcht 1 ,mem_24g_data_type 
+0416 a8400e00 icompare bits_data ,temp 
+0417 24208433 nbranch p_g24_end_of_packet ,true 
 
 p_g24_receive_skip:
-0415 09800008 parse demod ,bucket ,8 
-0416 19897e00 rshift3 pwindow ,pdata 
-0417 e0a08000 istore 1 ,contw 
-0418 1fe97e00 rshift3 pdata ,pdata 
-0419 1fe1721f and pdata ,0x1f ,loopcnt 
-041a 2022841f branch p_g24rx_nopayload ,zero 
+0418 09800008 parse demod ,bucket ,8 
+0419 19897e00 rshift3 pwindow ,pdata 
+041a e0a08000 istore 1 ,contw 
+041b 1fe97e00 rshift3 pdata ,pdata 
+041c 1fe1721f and pdata ,0x1f ,loopcnt 
+041d 20228422 branch p_g24rx_nopayload ,zero 
 
 p_g24rx_loop:
-041b 09800008 parse demod ,bucket ,8 
-041c 19897e00 rshift3 pwindow ,pdata 
-041d e0a08000 istore 1 ,contw 
-041e c200041b loop p_g24rx_loop 
+041e 09800008 parse demod ,bucket ,8 
+041f 19897e00 rshift3 pwindow ,pdata 
+0420 e0a08000 istore 1 ,contw 
+0421 c200041e loop p_g24rx_loop 
 
 p_g24rx_nopayload:
-041f 09800018 parse demod ,bucket ,24 
-0420 78287c00 enable swfine 
-0421 db600664 arg param_sifs ,stop_watch 
-0422 1fef7e00 rshift32 pdata ,pdata 
-0423 1ff17e00 rshift16 pdata ,pdata 
-0424 e0a18000 istore 3 ,contw 
-0425 7845fc00 disable decode_fec1 
-0426 204029bb call save_rssi 
-0427 20230430 branch p_g24_end_of_packet ,crc_failed 
-0428 7837fc00 enable user3 
-0429 68008017 fetch 1 ,mem_last_freq 
-042a 1fe0a200 add pdata ,0 ,rega 
-042b 20402981 call rf_write_freq 
-042c 7846fc00 disable decode_fec0 
-042d 20402918 call set_sync_on 
-042e 20600000 rtn 
-042f 20600000 rtn 
+0422 09800018 parse demod ,bucket ,24 
+0423 78287c00 enable swfine 
+0424 db600664 arg param_sifs ,stop_watch 
+0425 1fef7e00 rshift32 pdata ,pdata 
+0426 1ff17e00 rshift16 pdata ,pdata 
+0427 e0a18000 istore 3 ,contw 
+0428 7845fc00 disable decode_fec1 
+0429 204029bb call save_rssi 
+042a 20230433 branch p_g24_end_of_packet ,crc_failed 
+042b 7837fc00 enable user3 
+042c 68008017 fetch 1 ,mem_last_freq 
+042d 1fe0a200 add pdata ,0 ,rega 
+042e 20402981 call rf_write_freq 
+042f 7846fc00 disable decode_fec0 
+0430 20402918 call set_sync_on 
+0431 20600000 rtn 
+0432 20600000 rtn 
 
 p_g24_end_of_packet:
-0430 784dfc00 disable encode_fec1 
-0431 7845fc00 disable decode_fec1 
-0432 2020264d branch end_of_packet 
+0433 784dfc00 disable encode_fec1 
+0434 7845fc00 disable decode_fec1 
+0435 2020264d branch end_of_packet 
 
 p_g24_sync_timeout:
-0433 204003a1 call p_rssi_noise 
-0434 20200430 branch p_g24_end_of_packet 
+0436 204003a4 call p_rssi_noise 
+0437 20200433 branch p_g24_end_of_packet 
 
 p_g24_set_freq_tx:
-0435 20402918 call set_sync_on 
-0436 6808c840 fetcht 1 ,mem_24g_ch 
-0437 20202933 branch set_freq_tx 
+0438 20402918 call set_sync_on 
+0439 6808c840 fetcht 1 ,mem_24g_ch 
+043a 20202933 branch set_freq_tx 
 
 p_g24_transmit:
-0438 204053c4 call le_enable 
-0439 6802485e fetch 4 ,mem_24g_addr 
-043a 98001200 iforce access 
-043b 204003e5 call p_g24_prep 
-043c 20400435 call p_g24_set_freq_tx 
-043d 79202a00 set1 txgfsk ,radio_ctrl 
-043e 782efc00 enable encode_fec0 
-043f 78307c00 enable is_tx 
-0440 7850fc00 disable is_rx 
-0441 19317e00 rshift16 access ,pdata 
-0442 1fecfe00 rshift8 pdata ,pdata 
-0443 1ff1fe00 rshift4 pdata ,pdata 
-0444 08008628 inject mod ,40 
-0445 784efc00 disable encode_fec0 
-0446 782dfc00 enable encode_fec1 
-0447 7823fc00 enable enable_white 
-0448 7824fc00 enable enable_crc 
-0449 6800c8e9 fetch 1 ,mem_24g_syncword_crc8 
-044a 08008608 inject mod ,8 
-044b 6800c838 fetch 1 ,mem_24g_txlen 
-044c 98007200 iforce loopcnt 
-044d d8c047f2 arg mem_24g_txpayload ,contr 
+043b 204053c4 call le_enable 
+043c 6802485e fetch 4 ,mem_24g_addr 
+043d 98001200 iforce access 
+043e 204003e8 call p_g24_prep 
+043f 20400438 call p_g24_set_freq_tx 
+0440 79202a00 set1 txgfsk ,radio_ctrl 
+0441 782efc00 enable encode_fec0 
+0442 78307c00 enable is_tx 
+0443 7850fc00 disable is_rx 
+0444 19317e00 rshift16 access ,pdata 
+0445 1fecfe00 rshift8 pdata ,pdata 
+0446 1ff1fe00 rshift4 pdata ,pdata 
+0447 08008628 inject mod ,40 
+0448 784efc00 disable encode_fec0 
+0449 782dfc00 enable encode_fec1 
+044a 7823fc00 enable enable_white 
+044b 7824fc00 enable enable_crc 
+044c 6800c8e9 fetch 1 ,mem_24g_syncword_crc8 
+044d 08008608 inject mod ,8 
+044e 6800c838 fetch 1 ,mem_24g_txlen 
+044f 98007200 iforce loopcnt 
+0450 d8c047f2 arg mem_24g_txpayload ,contr 
 
 p_g24tr_loop:
-044e e8c08000 ifetch 1 ,contr 
-044f 08008608 inject mod ,8 
-0450 c200044e loop p_g24tr_loop 
-0451 6800c8ee fetch 1 ,mem_rssi_hex 
+0451 e8c08000 ifetch 1 ,contr 
 0452 08008608 inject mod ,8 
-0453 78247c00 enable enable_parity 
-0454 08008618 inject mod ,24 
-0455 78447c00 disable enable_parity 
-0456 37d38200 until null ,tx_clear 
-0457 20000064 nop 100 
-0458 784efc00 disable encode_fec0 
-0459 784dfc00 disable encode_fec1 
-045a 20600000 rtn 
+0453 c2000451 loop p_g24tr_loop 
+0454 6800c8ee fetch 1 ,mem_rssi_hex 
+0455 08008608 inject mod ,8 
+0456 78247c00 enable enable_parity 
+0457 08008618 inject mod ,24 
+0458 78447c00 disable enable_parity 
+0459 37d38200 until null ,tx_clear 
+045a 20000064 nop 100 
+045b 784efc00 disable encode_fec0 
+045c 784dfc00 disable encode_fec1 
+045d 20600000 rtn 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/USB/dongle/program/patch.prog	(revision 2791)
+++ /branch/USB/dongle/program/patch.prog	(working copy)
@@ -1289,7 +1289,10 @@
 	hfetch 1,core_config	//enable watchdog
 	set1 watchdog_bit,pdata
 	hstore 1,core_config
-	branch soft_reset+2
+	call spi_ncs_gpio_init  // 0xff disable spi ncs gpio init
+	jam 0x86,0x895b
+	jam 0xa0,0x895c
+	branch soft_reset+3
 
 p_shutdown_radio:
 	force 8,radio_ctrl
