This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Use I2S play sound

 I use Nrf52832 and sdk16.0.Use I2S play sound.

If use:

int16_t sine_table[]= {0,0,23170,23170,32767,32767,23170,0,0,-23170,-23170,-32768,-32768,-23170,-23170};

NRF_I2S->TXD.PTR=(uint32_t)&sine_table[0];
NRF_I2S->RXTXD.MAXCNT=sizeof(sine_table)/sizeof(uint32_t);
NRF_I2S->TASKS_START=1;

It has sound output.

If use:

const uint8_t output[260760] = {0x13, 0xFC, 0xD9, 0xFA, 0x92, 0xF7, 0x14....};

This output file comes from https://github.com/NordicPlayground/nRF52-teensy-sgtl5000-audio/blob/master/Convert%20Audio%20Sample/car_sample_full.c

  NRF_I2S->TXD.PTR=(uint32_t)&output[0];
  NRF_I2S->RXTXD.MAXCNT=sizeof(output)/sizeof(uint32_t);
  NRF_I2S->TASKS_START=1;

It didn't respond.

Thanks!

i2s.rar

Parents Reply Children
No Data
Related