Frank / Mike:
it dies on this memset: ...\teensy\avr\libraries\Audio\output_i2s.cpp
Code:
void AudioOutputI2S::isr(void)
// …
} else {
deb_tt( 4, dest );
debTrace_tt( (uint32_t)dest, __LINE__, "memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)" );
memset(dest,0,AUDIO_BLOCK_SAMPLES * 2);
return;
}
This entry 4 from :: deb_tt( 4, dest );
Code:
Debug Info:
1 => 1 0x1 [L#261_C#1312
2 => 425 0x1A9 [L#262_C#1313
4 => 536896804 0x20006524 [L#291_C#1319 _<< last func::isr
5 => 536896804 0x20006524 [L#274_C#1318
These entries 1 and 4 from :: debTrace_tt( (uint32_t)dest, __LINE__, "memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)" );
And entry #7 is from loop where it did the delay(d_time)
Code:
#1: (ii=486): CycCnt 536896804 line 292 func memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)
#2: (ii=485): CycCnt 558447482 line 262 func DMA is transmitting the first
#3: (ii=484): CycCnt 558447381 line 256 func AudioOutputI2S::isr
#4: (ii=483): CycCnt 536896548 line 292 func memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)
#5: (ii=482): CycCnt 557576734 line 268 func DMA is transmitting the second
#6: (ii=481): CycCnt 557576633 line 256 func AudioOutputI2S::isr
#7: (ii=480): CycCnt 557517658 line 256 func delay(d_time) pre
#8: (ii=479): CycCnt 557517601 line 221 func Loop Enter
#9: (ii=478): CycCnt 557517539 line 298 func loop
#10: (ii=477): CycCnt 557517497 line 296 func loop
#11: (ii=476): CycCnt 557517325 line 288 func CMD_PLAYNOTE
The example examples\Synthesis\pulseWidth\pulseWidth.ino seems to die in the same place - neither 'dest' is NULL:
This recorded it here in DEC then HEX:: 4 => 536880044 0x200023AC [L#291_C#903 _<< last func::isr
Code:
#1: (ii=903): CycCnt 536880044 line 292 func memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)
#2: (ii=902): CycCnt 438280737 line 262 func DMA is transmitting the first
#3: (ii=901): CycCnt 438280636 line 256 func AudioOutputI2S::isr
#4: (ii=900): CycCnt 536879788 line 292 func memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)
#5: (ii=899): CycCnt 437409997 line 268 func DMA is transmitting the second
#6: (ii=898): CycCnt 437409897 line 256 func AudioOutputI2S::isr
#7: (ii=897): CycCnt 536880044 line 292 func memset(dest,0,AUDIO_BLOCK_SAMPLES * 2)
#8: (ii=896): CycCnt 436539249 line 262 func DMA is transmitting the first
#9: (ii=895): CycCnt 436539149 line 256 func AudioOutputI2S::isr
#10: (ii=894): CycCnt 436144353 line 59 func setup