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.

psp drivers mmcsd and audio

Hi,

I use a C6747 evm, with the audioSample program from psp drivers and I would like to save some data to the mmcsd card. Hence, I have tried to merge the audioSample project with the mmcsdSample project from the rtfs example.

My problem is the following: I notice on dsp bios config (tcf files) that both audioSample and mmcsdSample have as user defined driver i2c0 with the following parameters:

init function : _audioUserI2cInit

function table ptr: _I2c_IOMFXNS

device params ptr: _audioI2cParams

device id 0x00000000

for audioSample and

init function : _mmcsdUserI2cInit

function table ptr: _I2c_IOMFXNS

device params ptr: _mmcsdI2cParams

device id 0x00000000

for mmcsdSample

 

 

My question is therefore, how can I have both drivers work at the same time?

 

I have tried 2 different things:

1- recompile the library ti.pspiom.platforms.evm6747.evmInit.a674 after modifiying the audio_evmInit.c file as follows (merge with mmcsd_evmInit.c)

add

#define PINMUX14                    (*((volatile Uint32 *)(0x01C14158u)))
#define PINMUX14_MMCSD_ENABLE       0x00222222u
#define PINMUX15                    (*((volatile Uint32 *)(0x01C1415Cu)))
#define PINMUX15_MMCSD_ENABLE       0x20000000u
#define PINMUX16                    (*((volatile Uint32 *)(0x01C14160u)))
#define PINMUX16_MMCSD_ENABLE       0x00000002u
/* Address of the pinmux 8 register for i2c                                   */
#define PINMUX8                     (*((volatile Uint32 *)(0x01C14140u)))
/* enable the pinmux registers for I2c                                        */
#define PINMUX8_I2C_ENABLE          0x00022000u
/* Address of the pinmux register for gpio                                    */
#define PINMUX18                    (*((volatile Uint32 *)(0x01C14168u)))
#define PINMUX18_GPIO_CD_ENABLE     0x00000008u
#define PINMUX17                    (*((volatile Uint32 *)(0x01C14164u)))
#define PINMUX17_GPIO_WP_ENABLE     0x80000000u

void audioUserI2cInit()
{
    I2c_init();
    audioI2cParams = I2c_PARAMS;
    audioI2cParams.hwiNumber = 8u;
    audioI2cParams.opMode = I2c_OpMode_INTERRUPT;

     audioI2cParams.busFreq = 200000u;
  
    mmcsdPscInit();
}*/

 

and keeping only one user defined driver i2c0, the result is I get :

Assertion failed, (0 != i2cOutHandle), file mmcsd_evmInit.c, line 156

 

The second thing I have tried is define 2 user defined drivers i2c0 and i2c0_1 with the configurations given above and device id =0x000000000 for i2c0 and device id=0x00000001 for i2c0_1 but it doesn't work either, this time nothing happens...

What is the correct procedure I should adopt?


Best Regards

  • JL said:

    I use a C6747 evm, with the audioSample program from psp drivers and I would like to save some data to the mmcsd card. Hence, I have tried to merge the audioSample project with the mmcsdSample project from the rtfs example.

    My problem is the following: I notice on dsp bios config (tcf files) that both audioSample and mmcsdSample have as user defined driver i2c0 with the following parameters:

    init function : _audioUserI2cInit

    function table ptr: _I2c_IOMFXNS

    device params ptr: _audioI2cParams

    device id 0x00000000

    for audioSample and

    init function : _mmcsdUserI2cInit

    function table ptr: _I2c_IOMFXNS

    device params ptr: _mmcsdI2cParams

    device id 0x00000000

    for mmcsdSample

    JL said:

    The second thing I have tried is define 2 user defined drivers i2c0 and i2c0_1 with the configurations given above and device id =0x000000000 for i2c0 and device id=0x00000001 for i2c0_1 but it doesn't work either, this time nothing happens...

    What is the correct procedure I should adopt?

    You have a resource conflict indeed as both drivers use I2C0. The device ID solution would probably be the correct one, but you would need to check the schematics. I do not think that I2C 0 and 1 are both connected to the parts that the driver needs to program. In case it was connected in a custom board, the device ID and the correct pinmux initialization would work (I have not tested but I assume that is the way).

    Most of the pinmux initializations are made at the project \packages\ti\pspiom\platforms\evmOMAPL137\build\evmInit.pjt (do not forget to rebuild this project and "rebuild all" your application). Sometimes you need to add an | instead of an = in the pinmux initialization on this file to avoid overrides and conflicts. But I think you already looked into it.

     

  • Hi JL,

         I wonder if you have merged the two sample projects to save the audio into SD card? I confront the same problem right now. If you could give me some advice on the critical point of this problem, I will highly appreciate your help.

     

    Best regards,

                 Bo Li

  • Hi Bo,

     

    Actually my needs changed, hence I gave up the use of the SD card with the audio (couldn't make it work). I hope you will be able to fix your problem.

    Best Regards,

     

    JL