RTL8710 I2S initialization code

Post your RTL8710 based projects and build logs here
alsaleem
Posts: 3
Joined: Mon Apr 09, 2018 2:44 am

RTL8710 I2S initialization code

Postby alsaleem » Mon Apr 09, 2018 4:05 pm

hi kissste
I read "kissste " post "RTL8710 and I2S" that he managed to run I2S on RTL8710AF board.
Saddly, I could not manage to make it initialized in my code:
I got : [I2S Err]i2s_init: HalI2SInit is failure when calling i2s_init()

I got the development board from
https://www.aliexpress.com/item/1-pc-New-Arrival-RTL8710-Wireless-Module-WiFi-Transceiver-Module-Test-Development-Board-Transmitter-Receiver-RTL/32798445849.html?spm=a2g0s.9042311.0.0.lAd0cW

My pins :

Code: Select all

#define I2S_SCLK_PIN            PC_1
#define I2S_WS_PIN              PC_0
#define I2S_SD_PIN              PC_2


the init function :

Code: Select all

void i2s_audio_task(void* param)
{
   i2s_obj.channel_num = CH_STEREO;
   i2s_obj.sampling_rate = SR_44p1KHZ;
   i2s_obj.word_length = WL_16b;
   i2s_obj.direction = I2S_DIR_TXRX;
   i2s_init(&i2s_obj, I2S_SCLK_PIN, I2S_WS_PIN, I2S_SD_PIN);  // <== fails here

   i2s_set_dma_buffer(&i2s_obj, (char*)i2s_tx_buf, (char*)i2s_rx_buf, \
      I2S_DMA_PAGE_NUM, I2S_DMA_PAGE_SIZE);
   i2s_tx_irq_handler(&i2s_obj, (i2s_irq_handler)i2s_tx_complete, (uint32_t)&i2s_obj);
   i2s_rx_irq_handler(&i2s_obj, (i2s_irq_handler)i2s_rx_complete, (uint32_t)&i2s_obj);


Note: I am using SDK ameba1 4.0a with GCC and using eclipse IDE (does it differ from 3.4/3.5?)

thanks.

alsaleem
Posts: 3
Joined: Mon Apr 09, 2018 2:44 am

Re: RTL8710 I2S initialization code

Postby alsaleem » Mon Apr 09, 2018 10:08 pm

UPDATE :

I downloaded the ameba1 3.5a SDK and rebuilt my application.
The program runs OK and I can see the I2S signal on the pin.

It looks there is a bug in the new (4.0a SDK) and specifically lib_pimux.a library!

thanks.

alsaleem
Posts: 3
Joined: Mon Apr 09, 2018 2:44 am

Re: RTL8710 I2S initialization code

Postby alsaleem » Mon Apr 09, 2018 10:19 pm

What I liked in SDK 4.0a is that it has already a pre-built project for eclipse.
So, I can easily use eclipse for code development.

Furthermore, I can use GDB for debugging where I can step/break into my code (within eclipse) rather than use command line.

Does any one have this project for SDK 3.5a?
Is it easy to do it?

thanks.


Return to “Projects and builds”

Who is online

Users browsing this forum: No registered users and 1 guest