Skip to main content

imp003 Pin Mux

The functions available from the imp003’s pins

The imp003 (Murata part number LBWA1ZV1CD) offer a broad array of IO options).

Pin Mux

Pin
 
 
uart
FG
 
uart
QRPW
 
uart
UVGD
 
uart
WJ
 
uart
DM
 
i2c
FG
 
i2c
AB
 
spi
EBCA
 
spi
LGDK
 
DAC
 
 
ADC
 
 
PWM
 
 
Pulse
Count
 
Wake
From
Sleep
State
Change
Callback
PTPG
Trigger
 
A SCL nSS* Yes Yes Yes
B SDA MISO Yes Yes Yes
C SCLK Yes Yes Yes Yes
D CTS TX SCLK Yes
E MOSI Yes Yes Yes For C
F TX SCL Yes Yes For K,X
G RX RTS SDA MISO Yes
H Yes
J RX Yes
K nSS* Yes Yes
L MOSI Yes For G
M RX Yes Yes Yes For D
N Yes
P RTS Yes
Q TX Yes
R RX Yes
S
T Yes
U TX Yes
V RX Yes
W CTS TX Yes Yes Yes
X Yes
Y

*nSS is driven by master in certain SPI modes (byte sync) and may be used to implement SPI slave
impOS™ 34 addressed an issue in which a state-change function applied to pin Q was not called consistently and so this functionality could not be used reliably with this pin.

Notes

Default Pin States

All of the imp003’s pins are tri-stated (floating) by default, ie. on power on, after chip reset, or after deep sleep.

Standard Buses

The imp003 provides five separate UART, two I²C and two SPI buses, in addition to being able to use space in the system-controlled SPI flash — in most cases, you will not need to use one of the GPIO pins’ SPI buses to attach extra storage to the imp003.

imp003 Identification

Under impOS™ 36 and above, call imp.info(). This returns a meta object with the property type, which is is a string containing the imp module name:

if (imp.info().type == "imp003") {
  // Code running on imp003/Murata LBWA1ZV1CD...
}

For earlier versions, check for the presence of the i2cAB object, which is not present on other types of imp:

if ("i2cAB" in hardware) {
  // Code running on imp003/Murata LBWA1ZV1CD...
}

Pin State-change Callbacks

Not all of the imp003’s pins, when assigned as digital inputs, can be supplied with callback functions that will be triggered when the pin’s state changes. The imp003 pins able to be configured with a callback — using the pin.configure() API call — are listed above. Attempts to nominate a callback for any of the remaining pins will generate a Squirrel runtime error.

Pulse Count Pin

The imp003 has a single Pulse Count pin: pin M.

Wakeup Pin

The imp003’s wakeup pin, pin W, can be used to wake the imp from a deep sleep, but only if the pin is configured with this capability before the imp goes into deep sleep. To configure the pin for this role, use the following code:

hardware.pinW.configure(DIGITAL_IN_WAKEUP);

Once the imp is in deep sleep — typically with a server.sleepfor() or server.sleepuntil() call — setting pin W to logic high will wake the device. The imp wakes when the pin is high, not on the rising edge. The external device responsible for triggering the wakeup pin should subsequently drive the pin low; the imp cannot return to sleep if the wakeup pin is already high. An internal pull-down is automatically enabled when wakeup is configured.