This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Julian
Thanks for your reply.
I tried reversing the bytes but still no luck. I've tried long and short frame syncs but neither works.
When I use the Motorola MC145483 and run the MAX9860 as a slave I get the sound through. This is however not optimal since the mode uses only 13 bits of the data instead of 16. For this setup to work I must use PLL mode in the MAX9860 to lock onto the LRCLK signal. Configuring the LRCLK as 8kHz doesn't work.
I'm wondering if the same applies to the PCM mode, i.e. that configuring PCM-slave mode with the 512kHz bit-clock frequency used by the MAX9860 does not work? The frequencies of the signals generated by the MAX9860 are 7.99991kHz and 511.994kHz for the LRCLK and bit-clock respectively.
Do you know if the LMX9838 and MAX9860 should work together?
I stumbled on a comment in the MAX9860 linux driver regarding the max9860 slave mode:
/* | |
* Check if Integer Clock Mode is possible, but avoid it in slave mode | |
* since we then do not know if lrclk is derived from pclk and the | |
* datasheet mentions that the frequencies have to match exactly in | |
* order for this to work. | |
*/ |
Best regards,
Gunnar.
Hi Gunnar,
I confirm the PCM slave settings must be E4033F so the reading from SimplyBlueCommander shall look like this:
Rx: Event: Read NVS, Status: 00, Address: B200, Data: E4033F
We run our test at 520kHz clock so our Fcps was 64 = 0x40 and PCM settings were E40340. The reason of the problem is an incorrect 32 bits long frame. The frame shall be set to 16 bits as explained in chapter 5.5.3.1.2 Using PCM Slave.
Incorrect, 32 bits long frame example for which the slave is not receiving data.
Correct, 16 bits long frame example for which the slave is receiving data correctly.
Regards,
Julian
Hi Julian
Thanks for your reply. I've been busy with other things so I couldn't try this out any sooner.
The value returned by read pcm slave config for the Long frame configuration is:
Rx: Event: Read NVS, Status: 00, Address: B200, Data: E4033F
The long frame signal generated by the MAX9860 chip is a left/right clock signal. Hence I can't configure it to frame the 16 bits of data as you suggest. The data of interest is the left channel which has 16 bits of data framed by a 32 bit frame. I thought that this should be possible since the pcm-slave can be configured to have 2 slots per frame?
I also tried it with the master running in short frame pulse mode, without any luck. The pcm-slave configuration I used is:
Rx: Event: Read NVS, Status: 00, Address: B200, Data: 64033F
In this mode the master sends the left and right channels in the first 32bits following the frame pulse.
As a side note to all of this: I am a bit perplexed by the pcm-slave configuration. The command to configure the slave that is included in the Commands.dir collection, which is included with simply blue commander, has a reversed byte order as compared to what you suggest. The command name is "Set PCMSlave: slot0, 1slot, 13bitlin, longfr, 16bit, normal, 520kHz", the read pcm-slave command returns this after sending the pcm-slave config
Hi Gunnar,
You are correct about the command.dir file. The bytes should be swapped.
I'm attaching the corrected file.
Thanks,
Julian
Hi Gunnar,
The PCM slave settings for long frame are correct but the frame is not and this is the cause of the problem. The PCM Slave has its requirements and one of them is the frame length.
May I ask for a more detailed view of the short frame length and position? It has to be one clock period long which looks like correct on the scope screen but it also shall have its rising edge on the clock rising edge. It is hard to see but is it not on the falling edge instead?
The correct sequence for positive short frame is shown below.
Regards,
Julian