da7212 to generate a tone

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
brijesh@avantari.org
Offline
Last seen:1 year 1 month ago
加入:2020-03-03 06:14
da7212 to generate a tone

Hi i am trying to write to registers of da7212 to generate a tone but i dont hear anything . here is my code

if(DA7212_i2c_write(REG_CIF_CTRL,0x01)==NRF_SUCCESS) printf("REG_CIF_CTRL set \n"); if(DA7212_i2c_write(REG_DAI_CLK_MODE,0x01)==NRF_SUCCESS) printf("SLAVE Mode set \n");

DA7212_i2c_write(0x92U, 0x00); nrf_delay_ms(2000); DA7212_i2c_write(0x90, 0x80); DA7212_i2c_write(0x29,0xCC); DA7212_i2c_write(0x22,0x0B); DA7212_i2c_write(0x27,0x04); DA7212_i2c_write(0x2A,0x32); DA7212_i2c_write(0x4B,0x08); DA7212_i2c_write(0x4C,0x08); DA7212_i2c_write(0x47,0xCD); DA7212_i2c_write(0x95,0x36); DA7212_i2c_write(0x96,0xA5); DA7212_i2c_write(0x48,0x2D); DA7212_i2c_write(0x49,0x2D); DA7212_i2c_write(0x51,0xF1); DA7212_i2c_write(0xBB,0x3F); DA7212_i2c_write(0xB5,0x01); DA7212_i2c_write(0xB4,0x80);

Please telll me what am i doing wrong

Device:
JE_Dialog
Offline
Last seen:1 month 1 day ago
工作人员
加入:2013-12-05 14:02
One of the team will take a

One of the team will take a look for you... we have used the DA7212 with one of our own BLE devices, so we can check to see if we ahve a driver example available. BR JE_Dialog

brijesh@avantari.org
Offline
Last seen:1 year 1 month ago
加入:2020-03-03 06:14
thanks looking forward for it

thanks looking forward for it

charlesxue1122
Offline
Last seen:3 days 17 hours ago
工作人员
加入:2019-12-23 05:48
Hi Sir,

Hi Sir,

Maybe attached code will help you with this case.

WRITE DA7212 0x92 0x00 WRITE DA7212 0x90 0x80 //Enable Digitl LDO WRITE DA7212 0x29 0xC8 //DAI I2S mode 24 bit WRITE DA7212 0x22 0x0B //Sample Rate 48K WRITE DA7212 0x94 0x01 //PC_Freerun WRITE DA7212 0x27 0x04 WRITE DA7212 0x2A 0xB3 WRITE DA7212 0x4B 0x08 WRITE DA7212 0x4C 0x08 WRITE DA7212 0x47 0xE9 WRITE DA7212 0x95 0x36 WRITE DA7212 0x96 0xA5 WRITE DA7212 0x48 0x2D WRITE DA7212 0x49 0x2D WRITE DA7212 0x40 0x00 WRITE DA7212 0x45 0x7F WRITE DA7212 0x46 0x7F WRITE DA7212 0x69 0x88 WRITE DA7212 0x6A 0x88 WRITE DA7212 0x6B 0x81 //HPOUT L CTRL WRITE DA7212 0x6C 0x80 //HPOUT R CTRL WRITE DA7212 0x44 0x80 //Filter 1 HPF WRITE DA7212 0x40 0x00 //DAC Filters Soft Mute Disable WRITE DA7212 0xB5 0x30 //Tone Gen Gain -9 dB, only SWG1 WRITE DA7212 0xB6 0x06 //Mixout CTRL WRITE DA7212 0xB7 0x55 WRITE DA7212 0xB8 0x15 WRITE DA7212 0xB9 0x00 WRITE DA7212 0xBA 0x00 WRITE DA7212 0xBB 0x02 WRITE DA7212 0xBC 0x01 WRITE DA7212 0xB4 0x80 //start playing tone, SWG1 1K, 20ms ON 10ms OFF WRITE DA7212 0x6E 0x88 //Mixout CTRL WRITE DA7212 0x6F 0x88 WRITE DA7212 0xFD 0x01 WRITE DA7212 0x51 0xF1

BR

Charles

brijesh@avantari.org
Offline
Last seen:1 year 1 month ago
加入:2020-03-03 06:14
它工作好谢谢

它工作好谢谢