OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [docs/] [datasheet/] [soc_twi.adoc] - Diff between revs 65 and 66

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 65 Rev 66
Line 44... Line 44...
 
 
* send START condition (also as REPEATED START condition)
* send START condition (also as REPEATED START condition)
* send STOP condition
* send STOP condition
* send (at least) one byte while also sampling one byte from the bus
* send (at least) one byte while also sampling one byte from the bus
 
 
 
[TIP]
 
A transmission can be terminated at any time by disabling the TWI module
 
by clearing the _TWI_CTRL_EN_ control register bit.
 
 
[IMPORTANT]
[IMPORTANT]
The serial clock (SCL) and the serial data (SDA) lines can only be actively driven low by the
The serial clock (SCL) and the serial data (SDA) lines can only be actively driven low by the
controller. Hence, external pull-up resistors are required for these lines.
controller. Hence, external pull-up resistors are required for these lines.
 
 
The TWI clock frequency is defined via the 3-bit _TWI_CTRL_PRSCx_ clock prescaler. The following prescalers
The TWI clock frequency is defined via the 3-bit _TWI_CTRL_PRSCx_ clock prescaler. The following prescalers
Line 66... Line 70...
_**f~SCL~**_ = _f~main~[Hz]_ / (4 * `clock_prescaler`)
_**f~SCL~**_ = _f~main~[Hz]_ / (4 * `clock_prescaler`)
 
 
 
 
**Interrupt**
**Interrupt**
 
 
The TWI module provides a single interrupt to singal _idle state_ (= read for new transmission) to the CPU. Whenever TWI SPI module
The TWI module provides a single interrupt to signal _idle state_ (= read for new transmission) to the CPU. Whenever TWI SPI module
is currently idle (and enabled), the interrupt request is active. A pending interrupt request is cleared
is currently idle (and enabled), the interrupt request is active. A pending interrupt request is cleared
by triggering a new TWI transmission or by disabling the device.
by triggering a new TWI transmission or by disabling the device.
 
 
 
 
.TWI register map (`struct NEORV32_TWI`)
.TWI register map (`struct NEORV32_TWI`)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.