Skip to main content

imp004m Pin Mux

The Functions Available From The imp004m’s Pins

The imp004m is an integrated design which combines an imp module and WiFi antenna. In addition, the imp004m supports Bluetooth LE.

Pin Mux

Pin
 
 
uart
BCAW
 
uart
FGJH
 
uart
HJ
 
uart
Q
 
i2c
NM
 
i2c
QP
 
spi
AHSR
 
spi
GJKL
 
DFSDM
 
 
Analog
In†
 
PWM
 
 
Pulse
Count
 
Wake
From
Sleep
State
Change
Callback
PTPG
Trigger
 
A RTS MOSI Yes Yes For Pin W
B TX Yes Yes Yes For Pin C
C RX Yes Yes
D Yes Yes Yes
E Yes
F TX
G RX MOSI
H CTS TX MISO Yes
J RTS RX MISO Yes
K SCLK Yes Yes
L NSS* Yes Yes
M SDA Yes For Pin N
or P
N SCL Yes
P SDA Yes Yes
Q TX SCL Yes
R NSS* DATA Yes
S SCLK CLK Yes
W CTS Yes Yes Yes
  • NSS is driven by master in certain SPI modes (byte sync) and may be used to implement SPI slave

† The imp004m provides GPIO pins capable of supporting analog input. However, none of the module’s GPIO pins support imp API sampler operation.

Notes

imp004m 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 == "imp004m") {
  // Code running on imp004m...
}

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

if ("i2cNM" in hardware) {
  // Code running on imp004m...
}

Default Pin States

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

Analog IO, Sampler And Fixed-frequency DAC

The imp004m provides seven GPIO pins which are capable of being configured as analog signal inputs using pin.configure(). However, none of these pins — or indeed any of the imp004m’s GPIO pins — support an imp API sampler object. For audio input (a typical application of sampler), impOS™ 38 supports DFSDM functionality (see below).

No imp004m pins support analog output. While the imp004m also lacks a true fixed-frequency DAC, it is nevertheless possible to use this API for audio output provided it is running impOS 38 or above and is fitted with a simple filter circuit. For more details, please see the fixedfrequencydac.configure() documentation.

DFSDM

From impOS 38, the imp004m incorporates STMicro’s Digital Filter for Sigma Delta Modulators (DFSDM) technology, which provides ADC functionality via an external analog unit by way of a high-speed dedicated serial bus on pins R (DATA) and S (CLK). This functionality is accessed through impOS 38’s dfsdm object.

For more information on DFSDM, please see this STMicro presentation.

Pin Names

The initial version of the imp004m pin mix included pins R, S and T but no pin Q. The first three of these pins have now been renamed, respectively, Q, R and S. This affects the following peripherals:

Old Name New Name
uartR uartQ
spiAHTS spiAHSR
i2cRP i2cQP