EasyManua.ls Logo

Bouffalo Lab BL702 - Page 214

Default Icon
375 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BL702/704/706 Reference Manual
11.7.2 DMA receiving process
1. Configure the read-write flag i2c_config[PKTDIR] to 1
2. Configure the slave device address i2c_config[SLVADDR]
3. Configure slave device register address i2c_sub_addr, slave device register address length i2c_config[SABC],
configure slave device register address enable bit i2c_config[SAEN] to 1
4. Set the length of the received data i2c_config[PKTLEN]
5. Enable DMA mode reception, set i2c_fifo_config_0[DREN] to 1
7. Configure the data length of DMA transmission DMA_CxControl[TS] (x=0~7)
8. Configure DMA source address DMA_CxSrcAddr to i2c_fifo_rdata, data width DMA_CxControl[STW] to 32 and
burst size DMA_CxControl[SBS], clear DMA_CxControl[SI] to disable address automatic accumulation mode
7. Configure DMA destination address DMA_CxDstAddr, data width DMA_CxControl[DTW], burst size DMA_CxControl[DBS],
set DMA_CxControl[DI] to 1 to enable automatic address accumulation mode
9. Enable DMA
10. Configure i2c_config[MEN] to 1 to enable I2C
11.8 I2C interrupt
I2C includes the following interrupts:
• I2C_TRANS_END_INT: I2C transfer end interrupt
• I2C_TX_FIFO_READY_INT: Interrupt is triggered when I2C TX FIFO has free space available for filling
• I2C_RX_FIFO_READY_INT: When I2C RX FIFO receives data, trigger interrupt
• I2C_NACK_RECV_INT: When the I2C module detects a NACK state, an interrupt is triggered
• I2C_ARB_LOST_INT: I2C arbitration lost interrupt
• I2C_FIFO_ERR_INT: I2C FIFO ERROR interrupt
11.9 Register description
Name
Description
i2c_config I2C configuration register
i2c_int_sts I2C interrupt status
i2c_sub_addr I2C sub-address configuration
BL702/704/706 Reference Manual 214/ 375
@2021 Bouffalo Lab
guest@bouffalolab

Table of Contents