Ver0xdeで、子機モード時にCH1,CH2入力の割り込みを受け付けなくなる。
この現象に陥った際の消費電流値は常時4.7mA程度を消費し続けていることを確認。
再度、CH1,CH2の入力を受け付けなくなる現象をリアルタイムデバッグ時で確認。ブレイクしてみたところ、
0000018A LDD R24,Z+0 Load indirect with displacement
このコードを永久ループしている状態であることが分かった。
00000154 SUBI R24,0x01 Subtract immediate --- C:\mywork\new_wireless_module\open\cc1101driver\branches\test002_AVRS6_20140819\test02\test02\Debug/../src/i2c.c if(i > 100) return; 00000155 BREQ PC+0x04 Branch if equal while( !(TWCR & _BV(TWINT)) ) 00000156 LDD R25,Z+0 Load indirect with displacement 00000157 TST R25 Test for Zero or Minus 00000158 BRGE PC-0x0A Branch if greater or equal, signed 00000159 RET Subroutine return TWDR = d; // ���M�f�[�^ 0000015A STS 0x00BB,R24 Store direct to data space TWCR = _BV(TWINT) | _BV(TWEN); 0000015C LDI R24,0x84 Load immediate 0000015D STS 0x00BC,R24 Store direct to data space i2c_wait_int_clear();//while( !(TWCR & _BV(TWINT)) ) ; // �f�[�^�̑��o�����ҋ@ 0000015F RCALL PC-0x0015 Relative call subroutine if((TWSR & TW_STATUS_MASK) != TW_MT_DATA_ACK) i2c_error(); 00000160 LDS R24,0x00B9 Load direct from data space 00000162 ANDI R24,0xF8 Logical AND with immediate 00000163 CPI R24,0x28 Compare with immediate 00000164 BREQ PC+0x02 Branch if equal --- No source file ------------------------------------------------------------- 00000165 RJMP PC-0x002B Relative jump 00000166 RET Subroutine return 00000167 PUSH R28 Push register on stack 00000168 MOV R28,R24 Copy register 00000169 LDI R24,0xA4 Load immediate 0000016A STS 0x00BC,R24 Store direct to data space 0000016C RCALL PC-0x0022 Relative call subroutine 0000016D LDS R25,0x00B9 Load direct from data space 0000016F ANDI R25,0xF8 Logical AND with immediate 00000170 CPI R25,0x08 Compare with immediate 00000171 BREQ PC+0x04 Branch if equal 00000172 CPI R25,0x10 Compare with immediate 00000173 BREQ PC+0x02 Branch if equal 00000174 RCALL PC-0x003A Relative call subroutine 00000175 STS 0x00BB,R28 Store direct to data space 00000177 LDI R24,0x84 Load immediate 00000178 STS 0x00BC,R24 Store direct to data space 0000017A RCALL PC-0x0030 Relative call subroutine 0000017B LDS R24,0x00B9 Load direct from data space 0000017D ANDI R24,0xF8 Logical AND with immediate 0000017E CPI R24,0x18 Compare with immediate 0000017F BREQ PC+0x04 Branch if equal 00000180 CPI R24,0x40 Compare with immediate 00000181 BREQ PC+0x02 Branch if equal 00000182 RCALL PC-0x0048 Relative call subroutine 00000183 POP R28 Pop register from stack 00000184 RET Subroutine return 00000185 LDI R24,0x94 Load immediate 00000186 STS 0x00BC,R24 Store direct to data space 00000188 LDI R30,0xBC Load immediate 00000189 LDI R31,0x00 Load immediate 0000018A LDD R24,Z+0 Load indirect with displacement 0000018B SBRS R24,4 Skip if bit in register set --- No source file ------------------------------------------------------------- 0000018C RJMP PC-0x0002 Relative jump --- C:\mywork\new_wireless_module\open\cc1101driver\branches\test002_AVRS6_20140819\test02\test02\Debug/../src/i2c.c } 0000018D RET Subroutine return { 0000018E PUSH R28 Push register on stack 0000018F PUSH R29 Push register on stack 00000190 MOV R29,R24 Copy register 00000191 MOV R28,R22 Copy register i2c_error_flag = 0; 00000192 STS 0x01D8,R1 Store direct to data space i2c_start(RTC_R2223L | TW_WRITE); 00000194 LDI R24,0x64 Load immediate 00000195 RCALL PC-0x002E Relative call subroutine i2c_write(
Ver0xdeで、子機モード時にCH1,CH2入力の割り込みを受け付けなくなる。完全に動作が止まってしまう現象が発生している。
(詳細) ・ver0xcd以前では、この現象はない。 ・親機モードでは正常に動作している。