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