Enabling other interfaces in CS47L63 driver

I was going through the driver files for CS47L63 and apparently I2C is not supported for some reason. Here is the code block I'm talking about

static uint32_t cs47l63_comm_i2c_reset(uint32_t bsp_dev_id, bool *was_i2c_busy)
{
	LOG_ERR("Tried to reset I2C, not supported");
	return BSP_STATUS_FAIL;
}

static uint32_t cs47l63_comm_i2c_read_repeated_start(uint32_t bsp_dev_id, uint8_t *write_buffer,
						     uint32_t write_length, uint8_t *read_buffer,
						     uint32_t read_length, bsp_callback_t cb,
						     void *cb_arg)
{
	LOG_ERR("Tried to read repeated start I2C, not supported");
	return BSP_STATUS_FAIL;
}

static uint32_t cs47l63_comm_i2c_write(uint32_t bsp_dev_id, uint8_t *write_buffer,
				       uint32_t write_length, bsp_callback_t cb, void *cb_arg)
{
	LOG_ERR("Tried writing to I2C, not supported");
	return BSP_STATUS_FAIL;
}

static uint32_t cs47l63_comm_i2c_db_write(uint32_t bsp_dev_id, uint8_t *write_buffer_0,
					  uint32_t write_length_0, uint8_t *write_buffer_1,
					  uint32_t write_length_1, bsp_callback_t cb, void *cb_arg)
{
	LOG_ERR("Tried to write double buffered I2C, not supported");
	return BSP_STATUS_FAIL;
}

Is there any explicit reason as to why these functions are disabled and not supported?

If I wanted to use I2C along with SPI for transfer between the codec and SoC, is that possible?

Parents
  • The CS47L63 control interface to read/write its registers can either be SPI or I2C, but not both. The appropriate communication method is automatically selected by the CS47L63 at boot based on the control signals it first receives. See section "4.13 Control Interface" in the datasheet for further details.

    Since the Audio DK is hardwired for SPI communication with the CS47L63, I assume Nordic decided not to bother populating those unneeded I2C support functions when writing the cs47l63_comm driver.

    The CS47L63 does, however, have an additional I2C master interface that it uses to control its connected peripherals, such as the VM3011 MEMS microphone on the Audio DK. Unbelievably, though, the cs47l63_reg_conf.h file actually misconfigures this interface and its GPIO, making it impossible to control the VM3011 at all. The more you study Nordic's CS47L63 implementation, the more inadequacies you'll find.

  • Since the Audio DK is hardwired for SPI communication with the CS47L63, I assume Nordic decided not to bother populating those unneeded I2C support functions when writing the cs47l63_comm driver.

    Ah alright, sounds fair

    The more you study Nordic's CS47L63 implementation, the more inadequacies you'll find.

    Now that's disappointing. 

  • Hi,

    ace.johnny said:
    The CS47L63 does, however, have an additional I2C master interface that it uses to control its connected peripherals, such as the VM3011 MEMS microphone on the Audio DK. Unbelievably, though, the cs47l63_reg_conf.h file actually misconfigures this interface and its GPIO, making it impossible to control the VM3011 at all. The more you study Nordic's CS47L63 implementation, the more inadequacies you'll find.

    In general, we encourage all our customers to report any perceived inadequacies or misconfigurations so that we can examine them and handle them properly. As we strive to improve our products and applications continuously, we would appreciate very much if you could point to the misconfigured I2C interface and its GPIO so that we could look into this in detail and fix it if needed. Could you please provide more information about misconfiguration?

    Best regards,
    Dejan

Reply
  • Hi,

    ace.johnny said:
    The CS47L63 does, however, have an additional I2C master interface that it uses to control its connected peripherals, such as the VM3011 MEMS microphone on the Audio DK. Unbelievably, though, the cs47l63_reg_conf.h file actually misconfigures this interface and its GPIO, making it impossible to control the VM3011 at all. The more you study Nordic's CS47L63 implementation, the more inadequacies you'll find.

    In general, we encourage all our customers to report any perceived inadequacies or misconfigurations so that we can examine them and handle them properly. As we strive to improve our products and applications continuously, we would appreciate very much if you could point to the misconfigured I2C interface and its GPIO so that we could look into this in detail and fix it if needed. Could you please provide more information about misconfiguration?

    Best regards,
    Dejan

Children
Related