Dario Murgia

I2C read/write with LPC1343

Discussion created by Dario Murgia Employee on Jan 28, 2019
Latest reply on Jan 30, 2019 by Serge De Maseneer

I am working with a colleague on a personal project, a home-made bluetooth speaker powered by NXP microcontroller LPC1343 and TFA98xx Audio Amplifier, together with a BT module by Qualcomm.

 

The application is quite simple: the BT module provides I2S signals to the amplifier, LPC uC takes care of initializing it from I2C interface.

 

We are facing some problems to make the I2C reading/writing working. We are using MCUXpresso 10.2.1, we loaded the LPCOpen library fror LPC1343 (lpcopen_2_05_lpcxpresso_nxp_lpcxpresso_1343.zip) and we used the example "periph_i2c" as starting point.

 

The I2C pins 14 (PIO0.4/SCL) and 15 (PIO0.5/SDA) don't show any kind of activity, we tried several boards and measured with an oscilloscope, they seem stuck.

 

Our goal at the moment is to read and write one I2C register of the TFA, for example register 0x3. If we will manage to do that, we could proceed with the rest, it will be pretty straight-forward.

 

We would like to have an example of main(), to replace the one of the LPCOpen example, able to initialize I2C bus with 400kHz speed, read the 16 bits of TFA register 0x3 and write the same register 0x3 with other 16 bits.

 

I2C address of TFA98xx slave device is 0x34

 

My colleague will provide tomorrow the source code we are trying to use, without success.

 

thanks in advance for your help,

 

Dario

Outcomes