DA7212 Beep generator on FRDM-K66F

5 posts / 0 new
Last post
ozmandad
Offline
Last seen: 9 months 2 weeks ago
Joined: 2019-11-20 03:45
DA7212 Beep generator on FRDM-K66F

Hello,

We are using the NXP Semiconductor FRDM-K66F development board as a prototype and evaluation platform. This system is convienent as it allows us to evaluate the Freescale K66F and the DA7212 - two devices we are interested in using for an audio application.

Our team has had difficulty in getting the beep/tone generator to work on this platform. Searching the forums has indicated that there may be an errata with this device with respect to the beep generator, particularly after reset/power cycle. We have been unable to generate a tone/beep using both the Freescale provided drivers, and bare metal I2C register peeks/pokes. I have attached some sample code that initializes the device and attempt to generate a continuous tone.

I should also mention that we simply want to play the tone through headphones via the HP jack on the card.

It would be most appreciated if a support engineer could review our code and suggest modifications.

Thank you in advance,

Scott
 

void manualInit() {
  printf ("Manual Initialization:\n");
  audioCodec.writeRegister(0x92, 0x00);
  wait_ms(100);
  audioCodec.writeRegister(0x90, 0x80);
  audioCodec.writeRegister(0x29, 0xC8);
  audioCodec.writeRegister(0x22, 0x0B);
  audioCodec.writeRegister(0x94, 0x00);
  audioCodec.writeRegister(0x27, 0x84);
  audioCodec.writeRegister(0x2A, 0x32);
  audioCodec.writeRegister(0x4B, 0x08);
  audioCodec.writeRegister(0x4C, 0x08);
  audioCodec.writeRegister(0x47, 0xCD);
  audioCodec.writeRegister(0x95, 0x36);
  audioCodec.writeRegister(0x96, 0xA5);
  audioCodec.writeRegister(0x48, 0x2D);
  audioCodec.writeRegister(0x49, 0x2D);
  //audioCodec.writeRegister(0xFD, 0x01);
  
  audioCodec.writeRegister(0x51, 0xF1);
  uint8_t val;
  do {
    audioCodec.readRegister(0xE0, &val);
    printf("  SYSTEM STATUS = %02x\n", val);
    wait_ms(100);
  } while (val == 0x03);
  audioCodec.writeRegister(0xBB, 0x3F);
  audioCodec.writeRegister(0xB5, 0x01);
  audioCodec.writeRegister(0xB4, 0x80);
  
  printf("..DONE\n");

}

 

 

Device: 
ED_Dialog
Online
Last seen: 6 min 24 sec ago
Staff
Joined: 2017-09-18 11:54
Hi Ozmandad,

Hi Ozmandad,

I will look into this for you.

Kind regards,
ED

ozmandad
Offline
Last seen: 9 months 2 weeks ago
Joined: 2019-11-20 03:45
Thank you Ed. I look forward

Thank you Ed. I look forward to hearing the results of your investigation.

 

Scott

ED_Dialog
Online
Last seen: 6 min 24 sec ago
Staff
Joined: 2017-09-18 11:54
Hello Scott,

Hello Scott,

I have attached an example script.

Kind regards,
Elliott

Attachment: 
ozmandad
Offline
Last seen: 9 months 2 weeks ago
Joined: 2019-11-20 03:45
Elliott - thank you very much

Elliott - thank you very much for your script. As it turns out, there was another issue that was preventing the DA7212 from generating the tone/beep. I have another couple of questions regarding your device, and was wondering whether I could contact you directly. Please let me know if this is OK.

Thank you again.
Scott