I2C & I2S Dialog Implementation

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: barthess, RoccoMarco

danyz91
Posts: 4
Joined: Thu Jul 17, 2014 10:07 am

I2C & I2S Dialog Implementation

Postby danyz91 » Thu Jul 17, 2014 10:14 am

Hi,
I am trying to make CS43L22 circuit to play some beeps. I've read that i have to establish an I2C and an I2S dialog with some ports, but i did not manage to do it.
Does anyone have made an example like this or does anyone knows how to configure the project in order to use StdPeriph function I2S_SendData.

Thank you

User avatar
Giovanni
Site Admin
Posts: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: I2C & I2S Dialog Implementation

Postby Giovanni » Thu Jul 17, 2014 1:22 pm

Hi,

If you want to use the StdLib then you need to add the StdLib modules to the ChibiOS makefile. Look where other sources/paths are added to the CSRC/INCDIR variables.

Giovanni

danyz91
Posts: 4
Joined: Thu Jul 17, 2014 10:07 am

Re: I2C & I2S Dialog Implementation

Postby danyz91 » Thu Jul 17, 2014 2:20 pm

Thank you. Anyway,
Is there a way to use ChibiOS features directly to make CS43L22 sounds?

User avatar
Giovanni
Site Admin
Posts: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: I2C & I2S Dialog Implementation

Postby Giovanni » Thu Jul 17, 2014 3:56 pm

You can use the existing I2C driver but there is no solution yet for I2S in the released version, an experimental support is present in the 3.0 development branch.

If you are interested in testing the new I2S driver you can get the version 3.0 from the repository.

Giovanni

danyz91
Posts: 4
Joined: Thu Jul 17, 2014 10:07 am

Re: I2C & I2S Dialog Implementation

Postby danyz91 » Fri Jul 18, 2014 10:27 am

Hi,
I have got some work deadlines so i cannot test it now, but i will.
I'm trying to follow your suggests on CSRC/INCDIR variables but i don't manage to add StdPeriph files.
Can you give me some advices, please? It seems that the file stm32f4xx.h included by the libraries file is problematic.

Thank You

User avatar
Giovanni
Site Admin
Posts: 12949
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 733 times
Been thanked: 609 times
Contact:

Re: I2C & I2S Dialog Implementation

Postby Giovanni » Fri Jul 18, 2014 11:03 am

Advice about what? you didn't mention a specific problem.

stm32f4xx.h is already included by ChibiOS in a slightly modified version.

Giovanni

danyz91
Posts: 4
Joined: Thu Jul 17, 2014 10:07 am

Re: I2C & I2S Dialog Implementation

Postby danyz91 » Sun Jul 20, 2014 12:24 pm

Hi,
Sorry. Now i'm trying to use sendBeep function made by cs43l22Codec by abishek. It seems everything fine, i wrote bytes in the 0x1E register but i did not hear nothing.
That's my ChibiStudio Project.

Thank You
Attachments
provaCodec.zip
(1.95 MiB) Downloaded 54 times

Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm
Location: India

Re: I2C & I2S Dialog Implementation

Postby Abhishek » Thu Jul 31, 2014 11:21 pm

You need to send some dummy data to the codec in order to hear sound :)

You could, for example, run the DMA in circular mode with no address increment to achieve this, the flags can be seen in the transfer function.

Abhishek


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 8 guests