cancel
Showing results for 
Search instead for 
Did you mean: 

hi im working on FDA903D AEK AUD D903V1 autodevkit, im trying to send information from an NXP MPCU5748G microcontroller through I2C AND I2S.

aturk.2
Associate II

i have set enables 1,2,3 and 4 as 1100 which is address 2 , but for some reason the speaker is not open and voltage is not passing through it which means i cant move on and give orders through i2c registers, can you please explain what the reason might be?

1 ACCEPTED SOLUTION

Accepted Solutions
  1. First install SPC5Studio https://www.st.com/en/development-tools/spc5-studio.html
  2. Download AutoDevKit library from www.st.com/autodevkitsw
  3. Install AutoDevKit on SPC5Studio.

For point 3. please refer to paragraph 8.1 of User Manual UM2623

https://www.st.com/resource/en/user_manual/um2623-how-to-assemble-and-use-the-autodevkit-adaptive-front-lighting-kits-stmicroelectronics.pdf

or watch the following YouTube self learning video 1

https://www.youtube.com/watch?v=WDp4XmmwEwc&list=PLnMKNibPkDnEju3j_qhe-MFK-NnwD_kuP

If you watch all 8 videos of 10min each it will give you a basic understanding of

how the environment works.

Regards,

AutoDevKit Team

View solution in original post

18 REPLIES 18
Max VIZZINI
ST Employee

Dear Sir,

As you can understand, it is not possible for us to help you debug the NXP microcontroller. I can only report the init procedure we use. For the configuration of the MCU peripherals you should consult with NXP.

The Init() function for the FDA903D is the following (on our Microcontroller):

// The following line reset the address signals

pal_lld_clearpad(Enables_ARRAY[dev][0], Enables_ARRAY[dev][1]);     

pal_lld_clearpad(Enables_ARRAY[dev][2], Enables_ARRAY[dev][3]);     

pal_lld_clearpad(Enables_ARRAY[dev][4], Enables_ARRAY[dev][5]);    

pal_lld_clearpad(Enables_ARRAY[dev][6], Enables_ARRAY[dev][7]);

// We wait a period to stabilize the signals

osalThreadDelayMilliseconds(500);

//Enables address with combination 1100 0xE2

pal_lld_setpad(Enables_ARRAY[dev][0], Enables_ARRAY[dev][1]);      //Enable 1 = 1

pal_lld_setpad(Enables_ARRAY[dev][2], Enables_ARRAY[dev][3]);     //Enable 2 = 1

pal_lld_clearpad(Enables_ARRAY[dev][4], Enables_ARRAY[dev][5]);  //Enable 3 = 0

pal_lld_clearpad(Enables_ARRAY[dev][6], Enables_ARRAY[dev][7]);     //Enable 4 = 0

// Initialize register with default value

uint8_t data[15];

// Init: Turn IB registers into application default setting

data[0] = IB0_DEFAULT; // data[0] = 0x00;

  data[1] = IB1_DEFAULT; // data[1] = 0x00;

  data[2] = IB2_DEFAULT;  // data[2] = 0x00;

  data[3] = IB3_DEFAULT;  // data[3] = 0x38;

  data[4] = IB4_DEFAULT;  // data[4] = 0x00;

  data[5] = IB5_DEFAULT;  // data[5] = 0x00;

  data[6] = IB6_DEFAULT;  // data[6] = 0x00;

  data[7] = IB7_DEFAULT;  // data[7] = 0x00;

  data[8] = IB8_DEFAULT;  // data[8] = 0xC0;

  data[9] = IB9_DEFAULT;  // data[9] = 0x00;

  data[10] = IB10_DEFAULT;  // data[10] = 0x50;

  data[11] = IB11_DEFAULT;  // data[11] = 0x30;

  data[12] = IB12_DEFAULT;  // data[12] = 0x00;

  data[13] = IB13_DEFAULT;  // data[13] = 0x20;

  data[14] = IB14_DEFAULT;  // data[14] = 0x09;

AEK_903D_Write_IB(dev, IB0, &data[0], 15); // IB14[0] = 1; FIRST bit

The function to send the first message is:

i2c_result_t AEK_903D_Write_IB(AEK_AUD_D903V1_DEVICE dev, uint8_t reg_addr, uint8_t * data, uint8_t size)

{

// Check address range

  if (reg_addr > FDA903D_IB_ADDR_MAX)

  {

    return I2C_ERROR_INVALID_ADDRESS;

  }

  if (size > 1)

  {

    reg_addr |= 0x80;    // Continues Write

  }

  return i2c_lld_write(AEK_AUD_D903V1_I2C_ARRAY_DRIVER[dev],(uint8_t)I2CAddress[dev], reg_addr, data, size);

}

I hope it helps!

Best Regards,

AutoDevKit Team

Max VIZZINI
ST Employee

The full code for our microcontroller SPC582B is available on AutoDevKit www.st.com/autodevkitsw

Mr. Max , if i give my enables 1100 without doing any other procedure, the speaker should open right?

Also , do i need to reset the values of the enables and registers to 0?

The Enables set the I2C address nothing to do with the speaker.

Please follow the entire procedure include register reset to activate the I2C.

im trying to understand the code, so after setting the enables we have to reset the register values as you specified, and then write messages to them according to our command. thats right?

Mr max

also can u explain the procedure to open the speaker ?

0693W00000UnDelQAF.pngyou need to follow the state machine to reach mute and play states and send I2S data

Please refer page 28 of FDA903D datasheet

FDA903D - 1 x 45 W class D digital input automotive power amplifier

Here is the User Manual

https://www.st.com/resource/en/user_manual/um2719-avas-architecture-based-on-autodevkit-stmicroelectronics.pdf

ok how can i open the example code you provided, i have downloaded the library and installed it.

or can you just give the full code here please.

  1. First install SPC5Studio https://www.st.com/en/development-tools/spc5-studio.html
  2. Download AutoDevKit library from www.st.com/autodevkitsw
  3. Install AutoDevKit on SPC5Studio.

For point 3. please refer to paragraph 8.1 of User Manual UM2623

https://www.st.com/resource/en/user_manual/um2623-how-to-assemble-and-use-the-autodevkit-adaptive-front-lighting-kits-stmicroelectronics.pdf

or watch the following YouTube self learning video 1

https://www.youtube.com/watch?v=WDp4XmmwEwc&list=PLnMKNibPkDnEju3j_qhe-MFK-NnwD_kuP

If you watch all 8 videos of 10min each it will give you a basic understanding of

how the environment works.

Regards,

AutoDevKit Team