Index: output/eeprom.dat
===================================================================
--- /branch/USB/dongle_16M/output/eeprom.dat	(revision 2686)
+++ /branch/USB/dongle_16M/output/eeprom.dat	(working copy)
@@ -2,7 +2,7 @@
 02
 aa
 55
-a6
+b2
 11
 c2
 84
@@ -11,7 +11,7 @@
 c0
 42
 83
-aa
+ad
 c0
 44
 83
@@ -19,7 +19,7 @@
 c0
 45
 03
-ac
+af
 c0
 00
 03
@@ -739,11 +739,11 @@
 20
 40
 03
-c2
+c5
 20
 40
 03
-e2
+e5
 20
 20
 01
@@ -823,7 +823,7 @@
 20
 20
 03
-e2
+e5
 70
 48
 bb
@@ -831,7 +831,7 @@
 20
 20
 03
-e2
+e5
 1c
 42
 7e
@@ -855,7 +855,7 @@
 20
 40
 03
-bd
+c0
 60
 08
 c8
@@ -871,7 +871,7 @@
 20
 20
 03
-e2
+e5
 20
 40
 00
@@ -1031,7 +1031,7 @@
 20
 20
 03
-c2
+c5
 20
 40
 01
@@ -2047,7 +2047,7 @@
 20
 40
 03
-fc
+ff
 24
 77
 80
@@ -2335,7 +2335,7 @@
 20
 40
 03
-c2
+c5
 68
 00
 c8
@@ -2363,7 +2363,7 @@
 20
 40
 03
-b6
+b9
 60
 08
 c8
@@ -2371,7 +2371,7 @@
 20
 40
 03
-bd
+c0
 60
 08
 c8
@@ -2391,7 +2391,7 @@
 20
 40
 03
-e6
+e9
 60
 08
 c8
@@ -2415,7 +2415,7 @@
 20
 40
 03
-ea
+ed
 60
 00
 c8
@@ -2439,7 +2439,7 @@
 20
 40
 03
-c2
+c5
 68
 00
 c8
@@ -2467,7 +2467,7 @@
 20
 40
 03
-b6
+b9
 60
 08
 c8
@@ -2475,7 +2475,7 @@
 20
 40
 03
-bd
+c0
 60
 08
 c8
@@ -2495,7 +2495,7 @@
 20
 40
 03
-e6
+e9
 60
 08
 c8
@@ -2519,7 +2519,7 @@
 20
 40
 03
-ea
+ed
 60
 00
 c8
@@ -2539,7 +2539,7 @@
 20
 40
 03
-c2
+c5
 68
 00
 c8
@@ -2567,7 +2567,7 @@
 20
 40
 03
-b6
+b9
 60
 08
 c8
@@ -2575,7 +2575,7 @@
 20
 40
 03
-bd
+c0
 60
 08
 c8
@@ -2595,7 +2595,7 @@
 20
 40
 03
-e6
+e9
 60
 08
 c8
@@ -2707,15 +2707,15 @@
 20
 40
 03
-d0
+d3
 20
 40
 04
-46
+49
 20
 20
 04
-3e
+41
 70
 48
 38
@@ -3753,9 +3753,21 @@
 80
 43
 20
+40
+64
+0d
+70
+89
+5b
+86
+70
+89
+5c
+a0
+20
 20
 20
-03
+04
 18
 00
 2a
@@ -3795,7 +3807,7 @@
 20
 40
 03
-b6
+b9
 60
 08
 c8
@@ -3879,7 +3891,7 @@
 c2
 00
 03
-c6
+c9
 1a
 22
 7e
@@ -3987,7 +3999,7 @@
 20
 40
 03
-e6
+e9
 60
 08
 c8
@@ -3999,7 +4011,7 @@
 20
 40
 03
-ea
+ed
 18
 40
 84
@@ -4123,7 +4135,7 @@
 20
 40
 03
-f3
+f6
 78
 57
 fc
@@ -4159,7 +4171,7 @@
 24
 2c
 04
-41
+44
 78
 46
 fc
@@ -4199,7 +4211,7 @@
 24
 22
 84
-3e
+41
 09
 80
 00
@@ -4223,7 +4235,7 @@
 20
 22
 84
-23
+26
 68
 00
 c7
@@ -4239,7 +4251,7 @@
 24
 20
 84
-3e
+41
 09
 80
 00
@@ -4263,7 +4275,7 @@
 20
 22
 84
-2d
+30
 09
 80
 00
@@ -4279,7 +4291,7 @@
 c2
 00
 04
-29
+2c
 09
 80
 00
@@ -4315,7 +4327,7 @@
 20
 23
 04
-3e
+41
 78
 37
 fc
@@ -4363,11 +4375,11 @@
 20
 40
 03
-af
+b2
 20
 20
 04
-3e
+41
 20
 40
 29
@@ -4395,11 +4407,11 @@
 20
 40
 03
-f3
+f6
 20
 40
 04
-43
+46
 79
 20
 2a
@@ -4479,7 +4491,7 @@
 c2
 00
 04
-5c
+5f
 68
 00
 c8
@@ -4520,8 +4532,8 @@
 60
 00
 00
-1c
-3a
+44
+c9
 aa
 55
 01
@@ -5103,20 +5115,8 @@
 42
 00
 84
-7b
-bf
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
-ff
+29
+0f
 ff
 ff
 ff
@@ -8188,5 +8188,5 @@
 ff
 ff
 ff
-2e
-78
+b6
+c1
Index: output/program.lis
===================================================================
--- /branch/USB/dongle_16M/output/program.lis	(revision 2686)
+++ /branch/USB/dongle_16M/output/program.lis	(working copy)
@@ -1,9 +1,9 @@
               include "bt_format "
               org 0x0000
 0000 c284000b bbit1 8 ,pf_patch_ext 
-0001 c04283aa beq patch10_5 ,p_shutdown_radio 
+0001 c04283ad beq patch10_5 ,p_shutdown_radio 
 0002 c0448385 beq patch11_1 ,p_set_freq_tx 
-0003 c04503ac beq patch11_2 ,p_initialize_radio_cont 
+0003 c04503af beq patch11_2 ,p_initialize_radio_cont 
 0004 c00003a5 beq patch00_0 ,p_soft_reset 
 0005 c047000c beq patch11_6 ,p_save_rssi 
 0006 c0620074 beq patch18_4 ,p_app_init 
@@ -245,8 +245,8 @@
 00b4 7048b201 jam 1 ,mem_24g_abort_packet 
 00b5 70483700 jam 0 ,mem_24g_pid 
 00b6 680248a1 fetch 4 ,mem_24g_rx_addr 
-00b7 204003c2 call p_g24_update_addr_and_synccrc8 
-00b8 204003e2 call p_g24_ch 
+00b7 204003c5 call p_g24_update_addr_and_synccrc8 
+00b8 204003e5 call p_g24_ch 
 00b9 2020010d branch p_g24_rx_interrupt_clear 
 
 p_g24_ch_process:
@@ -268,11 +268,11 @@
 00c9 793ffe1c set0 28 ,pdata 
 00ca 600248b4 store 4 ,mem_24g_hop_btclk 
 00cb 7048b201 jam 1 ,mem_24g_abort_packet 
-00cc 202003e2 branch p_g24_ch 
+00cc 202003e5 branch p_g24_ch 
 
 p_g24_ch_receive_hop_pac:
 00cd 7048bb00 jam 0 ,mem_24g_hop_packet 
-00ce 202003e2 branch p_g24_ch 
+00ce 202003e5 branch p_g24_ch 
 
 p_g24_ch_timer_reinit:
 00cf 1c427e00 copy clkn_bt ,pdata 
@@ -282,11 +282,11 @@
 
 p_g24_noise_rssi:
 00d3 da200d9e arg mem_rssi_noise_buffer ,rega 
-00d4 204003bd call p_rssi_average 
+00d4 204003c0 call p_rssi_average 
 00d5 6008c8f1 storet 1 ,mem_rssi_noise_avg 
 00d6 18467c50 sub temp ,rssi_thresh_noise ,null 
 00d7 24610000 nrtn positive 
-00d8 202003e2 branch p_g24_ch 
+00d8 202003e5 branch p_g24_ch 
 
 p_g24_blank_data_process:
 00d9 204000dc call p_g24_ms_blank_data 
@@ -338,7 +338,7 @@
 00fd 70483700 jam 0 ,mem_24g_pid 
 00fe 7048424e jam g24_pair_ch ,mem_24g_ch 
 00ff 68024844 fetch 4 ,mem_24g_paring_addr 
-0100 202003c2 branch p_g24_update_addr_and_synccrc8 
+0100 202003c5 branch p_g24_update_addr_and_synccrc8 
 
 p_g24_dongle_bind_data_process:
 0101 204001fd call p_g24_receive_transmit_ack 
@@ -710,7 +710,7 @@
 
 p_g24_receive_transmit_ack:
 01fd 2040010d call p_g24_rx_interrupt_clear 
-01fe 204003fc call p_g24_receive_packet 
+01fe 204003ff call p_g24_receive_packet 
 01ff 24778000 nrtn user3 
 0200 2020029c branch p_g24_transmit_ack 
 
@@ -802,21 +802,21 @@
 0243 20400115 call p_g24_dongle_bind_ms_payload_cfg 
 0244 680248dc fetch 4 ,mem_24g_ms_addr 
 0245 203a023a branch p_g24_rx_auto_addr_ch_search ,blank 
-0246 204003c2 call p_g24_update_addr_and_synccrc8 
+0246 204003c5 call p_g24_update_addr_and_synccrc8 
 0247 6800c8e8 fetch 1 ,mem_24g_ms_config_ch_once 
 0248 205a0258 call p_g24_ms_config_ch_once ,blank 
 0249 6800c8e6 fetch 1 ,mem_24g_ms_last_ch 
 024a 6000c842 store 1 ,mem_24g_ch 
 024b 6808c8f9 fetcht 1 ,mem_rssi_noise_ms_index 
 024c da200f9e arg mem_rssi_noise_ms_buffer ,rega 
-024d 204003b6 call p_rssi_store 
+024d 204003b9 call p_rssi_store 
 024e 6008c8f9 storet 1 ,mem_rssi_noise_ms_index 
-024f 204003bd call p_rssi_average 
+024f 204003c0 call p_rssi_average 
 0250 6008c8f6 storet 1 ,mem_rssi_noise_ms_avg 
 0251 18467c50 sub temp ,rssi_thresh_noise ,null 
 0252 24610000 nrtn positive 
 0253 6808c8e7 fetcht 1 ,mem_24g_ms_ch_number 
-0254 204003e6 call p_g24_ch_map_size 
+0254 204003e9 call p_g24_ch_map_size 
 0255 6008c8e7 storet 1 ,mem_24g_ms_ch_number 
 0256 6000c8e6 store 1 ,mem_24g_ms_last_ch 
 0257 20600000 rtn 
@@ -824,7 +824,7 @@
 p_g24_ms_config_ch_once:
 0258 7048e801 jam 1 ,mem_24g_ms_config_ch_once 
 0259 d8400000 arg 0 ,temp 
-025a 204003ea call p_g24_ch_calc 
+025a 204003ed call p_g24_ch_calc 
 025b 6000c8e6 store 1 ,mem_24g_ms_last_ch 
 025c 20600000 rtn 
 
@@ -832,21 +832,21 @@
 025d 2040011b call p_g24_dongle_bind_kb_payload_cfg 
 025e 680248d8 fetch 4 ,mem_24g_kb_addr 
 025f 203a023a branch p_g24_rx_auto_addr_ch_search ,blank 
-0260 204003c2 call p_g24_update_addr_and_synccrc8 
+0260 204003c5 call p_g24_update_addr_and_synccrc8 
 0261 6800c8e5 fetch 1 ,mem_24g_kb_config_ch_once 
 0262 205a0272 call p_g24_kb_config_ch_once ,blank 
 0263 6800c8e3 fetch 1 ,mem_24g_kb_last_ch 
 0264 6000c842 store 1 ,mem_24g_ch 
 0265 6808c8f8 fetcht 1 ,mem_rssi_noise_kb_index 
 0266 da20109e arg mem_rssi_noise_kb_buffer ,rega 
-0267 204003b6 call p_rssi_store 
+0267 204003b9 call p_rssi_store 
 0268 6008c8f8 storet 1 ,mem_rssi_noise_kb_index 
-0269 204003bd call p_rssi_average 
+0269 204003c0 call p_rssi_average 
 026a 6008c8f5 storet 1 ,mem_rssi_noise_kb_avg 
 026b 18467c50 sub temp ,rssi_thresh_noise ,null 
 026c 24610000 nrtn positive 
 026d 6808c8e4 fetcht 1 ,mem_24g_kb_ch_number 
-026e 204003e6 call p_g24_ch_map_size 
+026e 204003e9 call p_g24_ch_map_size 
 026f 6008c8e4 storet 1 ,mem_24g_kb_ch_number 
 0270 6000c8e3 store 1 ,mem_24g_kb_last_ch 
 0271 20600000 rtn 
@@ -854,28 +854,28 @@
 p_g24_kb_config_ch_once:
 0272 7048e501 jam 1 ,mem_24g_kb_config_ch_once 
 0273 d8400000 arg 0 ,temp 
-0274 204003ea call p_g24_ch_calc 
+0274 204003ed call p_g24_ch_calc 
 0275 6000c8e3 store 1 ,mem_24g_kb_last_ch 
 0276 20600000 rtn 
 
 p_g24_rx_auto_bind_config_dongle:
 0277 20400115 call p_g24_dongle_bind_ms_payload_cfg 
 0278 680248a1 fetch 4 ,mem_24g_rx_addr 
-0279 204003c2 call p_g24_update_addr_and_synccrc8 
+0279 204003c5 call p_g24_update_addr_and_synccrc8 
 027a 6800c8e2 fetch 1 ,mem_24g_dg_config_ch_once 
 027b 205a028b call p_g24_dg_config_ch_once ,blank 
 027c 6800c8e0 fetch 1 ,mem_24g_dg_last_ch 
 027d 6000c842 store 1 ,mem_24g_ch 
 027e 6808c8f7 fetcht 1 ,mem_rssi_noise_dg_index 
 027f da200e9e arg mem_rssi_noise_dg_buffer ,rega 
-0280 204003b6 call p_rssi_store 
+0280 204003b9 call p_rssi_store 
 0281 6008c8f7 storet 1 ,mem_rssi_noise_dg_index 
-0282 204003bd call p_rssi_average 
+0282 204003c0 call p_rssi_average 
 0283 6008c8f4 storet 1 ,mem_rssi_noise_dg_avg 
 0284 18467c50 sub temp ,rssi_thresh_noise ,null 
 0285 24610000 nrtn positive 
 0286 6808c8e1 fetcht 1 ,mem_24g_dg_ch_number 
-0287 204003e6 call p_g24_ch_map_size 
+0287 204003e9 call p_g24_ch_map_size 
 0288 6008c8e1 storet 1 ,mem_24g_dg_ch_number 
 0289 6000c8e0 store 1 ,mem_24g_dg_last_ch 
 028a 20600000 rtn 
@@ -911,11 +911,11 @@
 
 p_g24tx_with_ack:
 02a2 204002a6 call p_g24_ackpayload_prep 
-02a3 204003d0 call p_g24_transmit_prep 
-02a4 20400446 call p_g24_transmit 
+02a3 204003d3 call p_g24_transmit_prep 
+02a4 20400449 call p_g24_transmit 
 
 p_g24tx_no_ack:
-02a5 2020043e branch p_g24_end_of_packet 
+02a5 20200441 branch p_g24_end_of_packet 
 
 p_g24_ackpayload_prep:
 02a6 70483800 jam 0 ,mem_24g_datalen 
@@ -1253,244 +1253,247 @@
 03a6 68108043 hfetch 1 ,core_config 
 03a7 79207e03 set1 watchdog_bit ,pdata 
 03a8 60108043 hstore 1 ,core_config 
-03a9 20202003 branch soft_reset + 2 
+03a9 2040640d call spi_ncs_gpio_init 
+03aa 70895b86 jam 0x86 ,0x895b 
+03ab 70895ca0 jam 0xa0 ,0x895c 
+03ac 20202004 branch soft_reset + 3 
 
 p_shutdown_radio:
-03aa 18002a08 force 8 ,radio_ctrl 
-03ab 202028fa branch shutdown_radio + 1 
+03ad 18002a08 force 8 ,radio_ctrl 
+03ae 202028fa branch shutdown_radio + 1 
 
 p_initialize_radio_cont:
-03ac 20402978 call initialize_radio_cont + 1 
-03ad 70804205 jam clksel_dpll ,core_clksel 
-03ae 20600000 rtn 
+03af 20402978 call initialize_radio_cont + 1 
+03b0 70804205 jam clksel_dpll ,core_clksel 
+03b1 20600000 rtn 
 
 p_rssi_noise:
-03af 204029bb call save_rssi 
-03b0 207a0000 rtn blank 
-03b1 6808c8f2 fetcht 1 ,mem_rssi_noise_index 
-03b2 da200d9e arg mem_rssi_noise_buffer ,rega 
-03b3 204003b6 call p_rssi_store 
-03b4 6008c8f2 storet 1 ,mem_rssi_noise_index 
-03b5 20600000 rtn 
+03b2 204029bb call save_rssi 
+03b3 207a0000 rtn blank 
+03b4 6808c8f2 fetcht 1 ,mem_rssi_noise_index 
+03b5 da200d9e arg mem_rssi_noise_buffer ,rega 
+03b6 204003b9 call p_rssi_store 
+03b7 6008c8f2 storet 1 ,mem_rssi_noise_index 
+03b8 20600000 rtn 
 
 p_rssi_store:
-03b6 1a227e00 copy rega ,pdata 
-03b7 98408a00 iadd temp ,contw 
-03b8 68008018 fetch 1 ,mem_rssi 
-03b9 e0a08000 istore 1 ,contw 
-03ba 18408401 increase 1 ,temp 
-03bb 184104ff and_into rssi_buf_len_noise ,temp 
-03bc 20600000 rtn 
+03b9 1a227e00 copy rega ,pdata 
+03ba 98408a00 iadd temp ,contw 
+03bb 68008018 fetch 1 ,mem_rssi 
+03bc e0a08000 istore 1 ,contw 
+03bd 18408401 increase 1 ,temp 
+03be 184104ff and_into rssi_buf_len_noise ,temp 
+03bf 20600000 rtn 
 
 p_rssi_average:
-03bd d8400000 arg 0 ,temp 
-03be df200100 arg rssi_buf_len_noise + 1 ,loopcnt 
-03bf 1a220c00 copy rega ,contr 
-03c0 20202e64 branch rssi_average_loop 
-03c1 20600000 rtn 
+03c0 d8400000 arg 0 ,temp 
+03c1 df200100 arg rssi_buf_len_noise + 1 ,loopcnt 
+03c2 1a220c00 copy rega ,contr 
+03c3 20202e64 branch rssi_average_loop 
+03c4 20600000 rtn 
 
 p_g24_update_addr_and_synccrc8:
-03c2 60024860 store 4 ,mem_24g_addr 
+03c5 60024860 store 4 ,mem_24g_addr 
 
 p_g24_syncword_crc8:
-03c3 da200000 arg 0 ,rega 
-03c4 df200004 arg 4 ,loopcnt 
-03c5 d8c04860 arg mem_24g_addr ,contr 
+03c6 da200000 arg 0 ,rega 
+03c7 df200004 arg 4 ,loopcnt 
+03c8 d8c04860 arg mem_24g_addr ,contr 
 
 p_g24_syncword_crc8_loop:
-03c6 e8c08000 ifetch 1 ,contr 
-03c7 9a20a200 iadd rega ,rega 
-03c8 c20003c6 loop p_g24_syncword_crc8_loop 
-03c9 1a227e00 copy rega ,pdata 
-03ca 600148e9 store 2 ,mem_24g_syncword 
-03cb 6800c8e9 fetch 1 ,mem_24g_syncword 
-03cc 6808c8ea fetcht 1 ,mem_24g_syncword + 1 
-03cd 9840fe00 iadd temp ,pdata 
-03ce 6000c8eb store 1 ,mem_24g_syncword_crc8 
-03cf 20600000 rtn 
+03c9 e8c08000 ifetch 1 ,contr 
+03ca 9a20a200 iadd rega ,rega 
+03cb c20003c9 loop p_g24_syncword_crc8_loop 
+03cc 1a227e00 copy rega ,pdata 
+03cd 600148e9 store 2 ,mem_24g_syncword 
+03ce 6800c8e9 fetch 1 ,mem_24g_syncword 
+03cf 6808c8ea fetcht 1 ,mem_24g_syncword + 1 
+03d0 9840fe00 iadd temp ,pdata 
+03d1 6000c8eb store 1 ,mem_24g_syncword_crc8 
+03d2 20600000 rtn 
 
 p_g24_transmit_prep:
-03d0 6800c838 fetch 1 ,mem_24g_datalen 
-03d1 1fe0fe02 increase 2 ,pdata 
-03d2 6000c83a store 1 ,mem_24g_txlen 
-03d3 6800c839 fetch 1 ,mem_24g_data_type 
-03d4 6000c7f4 store 1 ,mem_24g_txpayload 
-03d5 6800c838 fetch 1 ,mem_24g_datalen 
-03d6 1fe9fe00 lshift3 pdata ,pdata 
-03d7 6808c837 fetcht 1 ,mem_24g_pid 
-03d8 18410403 and temp ,0x03 ,temp 
-03d9 18438400 lshift temp ,temp 
-03da 9841fe00 ior temp ,pdata 
-03db 6808c874 fetcht 1 ,mem_24g_no_ack 
-03dc 9840fe00 iadd temp ,pdata 
-03dd e0a08000 istore 1 ,contw 
-03de 6800c838 fetch 1 ,mem_24g_datalen 
-03df 98007200 iforce loopcnt 
-03e0 d8c047d4 arg mem_24g_txbuf ,contr 
-03e1 20207f01 branch memcpy 
+03d3 6800c838 fetch 1 ,mem_24g_datalen 
+03d4 1fe0fe02 increase 2 ,pdata 
+03d5 6000c83a store 1 ,mem_24g_txlen 
+03d6 6800c839 fetch 1 ,mem_24g_data_type 
+03d7 6000c7f4 store 1 ,mem_24g_txpayload 
+03d8 6800c838 fetch 1 ,mem_24g_datalen 
+03d9 1fe9fe00 lshift3 pdata ,pdata 
+03da 6808c837 fetcht 1 ,mem_24g_pid 
+03db 18410403 and temp ,0x03 ,temp 
+03dc 18438400 lshift temp ,temp 
+03dd 9841fe00 ior temp ,pdata 
+03de 6808c874 fetcht 1 ,mem_24g_no_ack 
+03df 9840fe00 iadd temp ,pdata 
+03e0 e0a08000 istore 1 ,contw 
+03e1 6800c838 fetch 1 ,mem_24g_datalen 
+03e2 98007200 iforce loopcnt 
+03e3 d8c047d4 arg mem_24g_txbuf ,contr 
+03e4 20207f01 branch memcpy 
 
 p_g24_ch:
-03e2 6808c843 fetcht 1 ,mem_24g_current_ch_number 
-03e3 204003e6 call p_g24_ch_map_size 
-03e4 6008c843 storet 1 ,mem_24g_current_ch_number 
-03e5 20600000 rtn 
+03e5 6808c843 fetcht 1 ,mem_24g_current_ch_number 
+03e6 204003e9 call p_g24_ch_map_size 
+03e7 6008c843 storet 1 ,mem_24g_current_ch_number 
+03e8 20600000 rtn 
 
 p_g24_ch_map_size:
-03e6 204003ea call p_g24_ch_calc 
-03e7 18408401 increase 1 ,temp 
-03e8 18410403 and_into 3 ,temp 
-03e9 20600000 rtn 
+03e9 204003ed call p_g24_ch_calc 
+03ea 18408401 increase 1 ,temp 
+03eb 18410403 and_into 3 ,temp 
+03ec 20600000 rtn 
 
 p_g24_ch_calc:
-03ea 6800c860 fetch 1 ,mem_24g_addr 
-03eb 1fe17e03 and_into 0x03 ,pdata 
-03ec 1fefa204 mul32 pdata ,4 ,rega 
-03ed 58004849 setarg mem_24g_ch_map1 
-03ee 9a20fe00 iadd rega ,pdata 
-03ef 98408c00 iadd temp ,contr 
-03f0 e8c08000 ifetch 1 ,contr 
-03f1 6000c842 store 1 ,mem_24g_ch 
-03f2 20600000 rtn 
+03ed 6800c860 fetch 1 ,mem_24g_addr 
+03ee 1fe17e03 and_into 0x03 ,pdata 
+03ef 1fefa204 mul32 pdata ,4 ,rega 
+03f0 58004849 setarg mem_24g_ch_map1 
+03f1 9a20fe00 iadd rega ,pdata 
+03f2 98408c00 iadd temp ,contr 
+03f3 e8c08000 ifetch 1 ,contr 
+03f4 6000c842 store 1 ,mem_24g_ch 
+03f5 20600000 rtn 
 
 p_g24_prep:
-03f3 7844fc00 disable enable_crc 
-03f4 7843fc00 disable enable_white 
-03f5 58555555 setarg 0x555555 
-03f6 98001e00 iforce crc24_init 
-03f7 6800c842 fetch 1 ,mem_24g_ch 
-03f8 1fed8400 reverse pdata ,temp 
-03f9 79200401 set1 1 ,temp 
-03fa 18431c00 rshift temp ,white_init 
-03fb 20600000 rtn 
+03f6 7844fc00 disable enable_crc 
+03f7 7843fc00 disable enable_white 
+03f8 58555555 setarg 0x555555 
+03f9 98001e00 iforce crc24_init 
+03fa 6800c842 fetch 1 ,mem_24g_ch 
+03fb 1fed8400 reverse pdata ,temp 
+03fc 79200401 set1 1 ,temp 
+03fd 18431c00 rshift temp ,white_init 
+03fe 20600000 rtn 
 
 p_g24_receive_packet:
-03fc 204053c4 call le_enable 
-03fd 68024860 fetch 4 ,mem_24g_addr 
-03fe 98001200 iforce access 
-03ff 20402918 call set_sync_on 
-0400 6808c842 fetcht 1 ,mem_24g_ch 
-0401 2040291f call set_freq_rx 
-0402 58000500 setarg param_pll_setup 
-0403 20402a8f call sleep 
-0404 20402924 call rf_rx_enable 
+03ff 204053c4 call le_enable 
+0400 68024860 fetch 4 ,mem_24g_addr 
+0401 98001200 iforce access 
+0402 20402918 call set_sync_on 
+0403 6808c842 fetcht 1 ,mem_24g_ch 
+0404 2040291f call set_freq_rx 
+0405 58000500 setarg param_pll_setup 
+0406 20402a8f call sleep 
+0407 20402924 call rf_rx_enable 
 
 p_g24_receive_rxon:
-0405 204003f3 call p_g24_prep 
-0406 7857fc00 disable user3 
-0407 7826fc00 enable decode_fec0 
-0408 7830fc00 enable is_rx 
-0409 78507c00 disable is_tx 
-040a 78287c00 enable swfine 
-040b 6801483b fetch 2 ,mem_24g_rx_window 
-040c 98003600 iforce stop_watch 
-040d 37c18400 correlate null ,timeout 
-040e 242c0441 nbranch p_g24_sync_timeout ,sync 
-040f 7846fc00 disable decode_fec0 
-0410 7825fc00 enable decode_fec1 
-0411 7823fc00 enable enable_white 
-0412 7824fc00 enable enable_crc 
-0413 09800008 parse demod ,bucket ,8 
-0414 19897e00 rshift3 pwindow ,pdata 
-0415 6000c8ec store 1 ,mem_24g_get_syncword_crc8 
-0416 6808c8eb fetcht 1 ,mem_24g_syncword_crc8 
-0417 98467c00 isub temp ,null 
-0418 2422843e nbranch p_g24_end_of_packet ,zero 
-0419 09800008 parse demod ,bucket ,8 
-041a 19897e00 rshift3 pwindow ,pdata 
-041b 6000c7b2 store 1 ,mem_24g_rxbuf 
-041c 6800c87e fetch 1 ,mem_24g_mode 
-041d 1fe67c02 sub pdata ,rx_24g ,null 
-041e 20228423 branch p_g24_receive_skip ,zero 
-041f 6800c7b2 fetch 1 ,mem_24g_rxbuf 
-0420 6808c839 fetcht 1 ,mem_24g_data_type 
-0421 a8400e00 icompare bits_data ,temp 
-0422 2420843e nbranch p_g24_end_of_packet ,true 
+0408 204003f6 call p_g24_prep 
+0409 7857fc00 disable user3 
+040a 7826fc00 enable decode_fec0 
+040b 7830fc00 enable is_rx 
+040c 78507c00 disable is_tx 
+040d 78287c00 enable swfine 
+040e 6801483b fetch 2 ,mem_24g_rx_window 
+040f 98003600 iforce stop_watch 
+0410 37c18400 correlate null ,timeout 
+0411 242c0444 nbranch p_g24_sync_timeout ,sync 
+0412 7846fc00 disable decode_fec0 
+0413 7825fc00 enable decode_fec1 
+0414 7823fc00 enable enable_white 
+0415 7824fc00 enable enable_crc 
+0416 09800008 parse demod ,bucket ,8 
+0417 19897e00 rshift3 pwindow ,pdata 
+0418 6000c8ec store 1 ,mem_24g_get_syncword_crc8 
+0419 6808c8eb fetcht 1 ,mem_24g_syncword_crc8 
+041a 98467c00 isub temp ,null 
+041b 24228441 nbranch p_g24_end_of_packet ,zero 
+041c 09800008 parse demod ,bucket ,8 
+041d 19897e00 rshift3 pwindow ,pdata 
+041e 6000c7b2 store 1 ,mem_24g_rxbuf 
+041f 6800c87e fetch 1 ,mem_24g_mode 
+0420 1fe67c02 sub pdata ,rx_24g ,null 
+0421 20228426 branch p_g24_receive_skip ,zero 
+0422 6800c7b2 fetch 1 ,mem_24g_rxbuf 
+0423 6808c839 fetcht 1 ,mem_24g_data_type 
+0424 a8400e00 icompare bits_data ,temp 
+0425 24208441 nbranch p_g24_end_of_packet ,true 
 
 p_g24_receive_skip:
-0423 09800008 parse demod ,bucket ,8 
-0424 19897e00 rshift3 pwindow ,pdata 
-0425 e0a08000 istore 1 ,contw 
-0426 1fe97e00 rshift3 pdata ,pdata 
-0427 1fe1721f and pdata ,0x1f ,loopcnt 
-0428 2022842d branch p_g24rx_nopayload ,zero 
+0426 09800008 parse demod ,bucket ,8 
+0427 19897e00 rshift3 pwindow ,pdata 
+0428 e0a08000 istore 1 ,contw 
+0429 1fe97e00 rshift3 pdata ,pdata 
+042a 1fe1721f and pdata ,0x1f ,loopcnt 
+042b 20228430 branch p_g24rx_nopayload ,zero 
 
 p_g24rx_loop:
-0429 09800008 parse demod ,bucket ,8 
-042a 19897e00 rshift3 pwindow ,pdata 
-042b e0a08000 istore 1 ,contw 
-042c c2000429 loop p_g24rx_loop 
+042c 09800008 parse demod ,bucket ,8 
+042d 19897e00 rshift3 pwindow ,pdata 
+042e e0a08000 istore 1 ,contw 
+042f c200042c loop p_g24rx_loop 
 
 p_g24rx_nopayload:
-042d 09800018 parse demod ,bucket ,24 
-042e 78287c00 enable swfine 
-042f db600664 arg param_sifs ,stop_watch 
-0430 1fef7e00 rshift32 pdata ,pdata 
-0431 1ff17e00 rshift16 pdata ,pdata 
-0432 e0a18000 istore 3 ,contw 
-0433 7845fc00 disable decode_fec1 
-0434 204029bb call save_rssi 
-0435 2023043e branch p_g24_end_of_packet ,crc_failed 
-0436 7837fc00 enable user3 
-0437 68008017 fetch 1 ,mem_last_freq 
-0438 1fe0a200 add pdata ,0 ,rega 
-0439 20402981 call rf_write_freq 
-043a 7846fc00 disable decode_fec0 
-043b 20402918 call set_sync_on 
-043c 20600000 rtn 
-043d 20600000 rtn 
+0430 09800018 parse demod ,bucket ,24 
+0431 78287c00 enable swfine 
+0432 db600664 arg param_sifs ,stop_watch 
+0433 1fef7e00 rshift32 pdata ,pdata 
+0434 1ff17e00 rshift16 pdata ,pdata 
+0435 e0a18000 istore 3 ,contw 
+0436 7845fc00 disable decode_fec1 
+0437 204029bb call save_rssi 
+0438 20230441 branch p_g24_end_of_packet ,crc_failed 
+0439 7837fc00 enable user3 
+043a 68008017 fetch 1 ,mem_last_freq 
+043b 1fe0a200 add pdata ,0 ,rega 
+043c 20402981 call rf_write_freq 
+043d 7846fc00 disable decode_fec0 
+043e 20402918 call set_sync_on 
+043f 20600000 rtn 
+0440 20600000 rtn 
 
 p_g24_end_of_packet:
-043e 784dfc00 disable encode_fec1 
-043f 7845fc00 disable decode_fec1 
-0440 2020264d branch end_of_packet 
+0441 784dfc00 disable encode_fec1 
+0442 7845fc00 disable decode_fec1 
+0443 2020264d branch end_of_packet 
 
 p_g24_sync_timeout:
-0441 204003af call p_rssi_noise 
-0442 2020043e branch p_g24_end_of_packet 
+0444 204003b2 call p_rssi_noise 
+0445 20200441 branch p_g24_end_of_packet 
 
 p_g24_set_freq_tx:
-0443 20402918 call set_sync_on 
-0444 6808c842 fetcht 1 ,mem_24g_ch 
-0445 20202933 branch set_freq_tx 
+0446 20402918 call set_sync_on 
+0447 6808c842 fetcht 1 ,mem_24g_ch 
+0448 20202933 branch set_freq_tx 
 
 p_g24_transmit:
-0446 204053c4 call le_enable 
-0447 68024860 fetch 4 ,mem_24g_addr 
-0448 98001200 iforce access 
-0449 204003f3 call p_g24_prep 
-044a 20400443 call p_g24_set_freq_tx 
-044b 79202a00 set1 txgfsk ,radio_ctrl 
-044c 782efc00 enable encode_fec0 
-044d 78307c00 enable is_tx 
-044e 7850fc00 disable is_rx 
-044f 19317e00 rshift16 access ,pdata 
-0450 1fecfe00 rshift8 pdata ,pdata 
-0451 1ff1fe00 rshift4 pdata ,pdata 
-0452 08008628 inject mod ,40 
-0453 784efc00 disable encode_fec0 
-0454 782dfc00 enable encode_fec1 
-0455 7823fc00 enable enable_white 
-0456 7824fc00 enable enable_crc 
-0457 6800c8eb fetch 1 ,mem_24g_syncword_crc8 
-0458 08008608 inject mod ,8 
-0459 6800c83a fetch 1 ,mem_24g_txlen 
-045a 98007200 iforce loopcnt 
-045b d8c047f4 arg mem_24g_txpayload ,contr 
+0449 204053c4 call le_enable 
+044a 68024860 fetch 4 ,mem_24g_addr 
+044b 98001200 iforce access 
+044c 204003f6 call p_g24_prep 
+044d 20400446 call p_g24_set_freq_tx 
+044e 79202a00 set1 txgfsk ,radio_ctrl 
+044f 782efc00 enable encode_fec0 
+0450 78307c00 enable is_tx 
+0451 7850fc00 disable is_rx 
+0452 19317e00 rshift16 access ,pdata 
+0453 1fecfe00 rshift8 pdata ,pdata 
+0454 1ff1fe00 rshift4 pdata ,pdata 
+0455 08008628 inject mod ,40 
+0456 784efc00 disable encode_fec0 
+0457 782dfc00 enable encode_fec1 
+0458 7823fc00 enable enable_white 
+0459 7824fc00 enable enable_crc 
+045a 6800c8eb fetch 1 ,mem_24g_syncword_crc8 
+045b 08008608 inject mod ,8 
+045c 6800c83a fetch 1 ,mem_24g_txlen 
+045d 98007200 iforce loopcnt 
+045e d8c047f4 arg mem_24g_txpayload ,contr 
 
 p_g24tr_loop:
-045c e8c08000 ifetch 1 ,contr 
-045d 08008608 inject mod ,8 
-045e c200045c loop p_g24tr_loop 
-045f 6800c8f0 fetch 1 ,mem_rssi_hex 
+045f e8c08000 ifetch 1 ,contr 
 0460 08008608 inject mod ,8 
-0461 78247c00 enable enable_parity 
-0462 08008618 inject mod ,24 
-0463 78447c00 disable enable_parity 
-0464 37d38200 until null ,tx_clear 
-0465 20000064 nop 100 
-0466 784efc00 disable encode_fec0 
-0467 784dfc00 disable encode_fec1 
-0468 20600000 rtn 
+0461 c200045f loop p_g24tr_loop 
+0462 6800c8f0 fetch 1 ,mem_rssi_hex 
+0463 08008608 inject mod ,8 
+0464 78247c00 enable enable_parity 
+0465 08008618 inject mod ,24 
+0466 78447c00 disable enable_parity 
+0467 37d38200 until null ,tx_clear 
+0468 20000064 nop 100 
+0469 784efc00 disable encode_fec0 
+046a 784dfc00 disable encode_fec1 
+046b 20600000 rtn 
               org 0x2000
 
 start:
Index: program/patch.prog
===================================================================
--- /branch/USB/dongle_16M/program/patch.prog	(revision 2686)
+++ /branch/USB/dongle_16M/program/patch.prog	(working copy)
@@ -1301,7 +1301,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
