Hi community,
I make a setup with TWRk60F120 and TWR-Audio-SGTL and try to run i2s MQX 4.02 on it. Once I run the demo it initializes the codec chip and creates sell and sd card tasks and everything looks good. Then I tried to execute 'play' command. To do that I copied
a "*.wav file" in the sd card and issued the following command:
shell> play sai: a:\wav_record.wav
this is what i got from the board:
Playback information
Sampling frequency: 16000 Hz
Bit depth: 16 bits
Channels: mono
Data rate: 32 kbyte/s
----------------------------------------------
Playing a file...DONE
----------------------------------------------
Playback stats
Total interrupts: 16797
Bytes requested for transmit: 133942
Bytes transmitted: 133942
Underruns of hardware FIFO: 0
Software buffer empty: 54
----------------------------------------------
it looks that it playing the file but I couldn't get sound out of speaker which is connected to j12. I oscoped the line_out jack and no signal on it.
I wonder if I need to change anything or issue an other command to get the code up and run? any suggestion?
Cheers!
Solved! Go to Solution.
I think the problem is that you haven't installed the jumper in K60F120M right. If you want to run the i2s_demo, you should install J21(1,2) and J22(1,2) in K60F120.
I think the problem is that you haven't installed the jumper in K60F120M right. If you want to run the i2s_demo, you should install J21(1,2) and J22(1,2) in K60F120.
I noticed that there are a few settings in InitCodec() need to be modified based om TWR-Audio schematic. I did the following mods BUT the demo still doesn't work
list of modifications:
in sgtl5000.c
//fixme change the value based on VDDA = 3.3V VDDA/2 = 1.65V.
sgtl_WriteReg(CHIP_REF_CTRL, 0x01FE);
//sgtl_WriteReg(CHIP_REF_CTRL, 0x004E);
//fixme VDDA = VDDIO = 3.3V. Based on Table.32 the left LO volume (bits 12:8) and right LO volume (bits 4:0) value should be set to 0x0F
sgtl_WriteReg(CHIP_LINE_OUT_VOL, 0x0F0F);
//sgtl_WriteReg(CHIP_LINE_OUT_VOL, 0x0505);
//fixme(SM) VDDD is derived internally on TWR-AUDIO so I commented out the line below
//sgtl_WriteReg(CHIP_ANA_POWER, 0x4260);
//fixme(SM) both VDDA and VDDIO are greater than 3.1 V on TWR-AUDIO so I commented out these two lines
//sgtl_WriteReg(CHIP_CLK_TOP_CTRL, 0x0800); // Enable the internal oscillator for the charge pump (Set bit 11)
//sgtl_WriteReg(CHIP_ANA_POWER, 0x4A60); // Enable charge pump (Set bit 11)
Please check the following link,
https://community.freescale.com/message/370656#370656
https://community.freescale.com/message/333307#333307
https://community.freescale.com/message/320492#320492
Have a great day,
Vicente
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------