2013-07-17 12:12 PM
When using the Audio_Playback_and_record example I was able to communicate with the codec[UDA1380] I2C interface[PB6, PB9] but when using PB6 and PB7[on my own board], I get a NAK even though the data appears to be clocked out correctly. I later configured the pins as inputs[on my board] and connected the discovery board's PB6 and PB9 to the SDA/SCL lines and was able to successfully address the codec[on my board]...is there any reason why changing the defines in the stm32f4_discovery_audio_codec.h file wouldn't be all that's necessary to switch from PB6 and PB9 to PB6 and PB7?
#define CODEC_I2C I2C1
#define CODEC_I2C_CLK RCC_APB1Periph_I2C1
#define CODEC_I2C_GPIO_CLOCK RCC_AHB1Periph_GPIOB
#define CODEC_I2C_GPIO_AF GPIO_AF_I2C1
#define CODEC_I2C_GPIO GPIOB
#define CODEC_I2C_SCL_PIN GPIO_Pin_6
#define CODEC_I2C_SDA_PIN GPIO_Pin_7
#define CODEC_I2S_SCL_PINSRC GPIO_PinSource6
#define CODEC_I2S_SDA_PINSRC GPIO_PinSource7
2013-07-17 03:48 PM
Issues resolved. It ended up being an io configuration error.