I need to get 768/705.6 kHz (90.../98... MCK divided by 128) on 1 bit port on tile 0 of my XUF216 running USB audio SW for synchronizing external circuitry. I wanted to use an clock block which is initialized from audioports.xc on tile 0 like this:
Code: Select all
/* Clock bitclock clock block from master clock pin (divided) */
configure_clock_src_divide(clk_audio_bclk, p_mclk_in, (divide/2));
configure_port_clock_output(p_bclk, clk_audio_bclk);
configure_clock_src_divide(clk_pwr, p_mclk_in, 64);
configure_port_clock_output(p_clkpwr, clk_pwr);
.
.
.
/* Start clock blocks ticking */
start_clock(clk_audio_bclk);
start_clock(clk_pwr);
#else /* CODEC_MASTER */
/* Stop bit and master clock blocks */
...
I get very nice MCK/128 clock output on my clk_pwr port. Problem is that my USB audio is no longer working... LRCK and SCK are running at the beginning, but the moment I start streaming audio they disappear and whole software crashes. It's still enumerated but cannot play any audio.
Any idea whats wrong? Or maybe a better solution?
Thanks.