Hi,
If you are seeing ~700uA then I suspect that the problem is due to the accelerometer on the board is still active.
There is a hardware mistake on the S1 board which means that the accelerometer is on the same power domain as the S1.
Therefore, what you are measuring is the Icc for the S1 and the accelerometer.
However, the accelerometer can be configured and placed into a power saving mode via the I2C interface, allowing you to measure accurate Icc values of the S1.
In the configurator add a I2C driver with these parameters:
name: g_i2c
RIIC Channel 0
Rate: Standard
Slave Address: 0x18
Address Mode 7-Bit
Remember to enable the ICCO RXI, TXI, TEI, ERI interrupts
Enable RIIC0 on port pins SCL0=P400, SDA0=P401
With this driver added to your code / thread, then use this function to place the accelerometer into lowpower / standby mode:
BR, Richard
static inline void app_s1_irq0_release(void)
{
/* Initialise the external accelerometer to "free up" S1/IRQ0 operation
* The accelerometer IRQ pin (connected to IRQ0 of the S124 device) defaults to push/pull configuration
* and has an active high IRQ state.
* This means it's always pulling down on the I/O pin to which it is connected (IRQ0 / P2_6)
* which prevents usage of this I/O pin for SW1 / IRQ
* This code will place the accelerometer into a low power state, releasing the IRQ0 / P2_6 line
* Additionally, by placing the device into a low power mode does not skew the figures when trying to
* measure the low power Icc figures for the S124, especially in SW Standby mode
*/
volatile ssp_err_t lc_ssp_err;
uint8_t data[2];
/* Open RIIC driver */
lc_ssp_err = g_i2c.p_api->open(g_i2c.p_ctrl, g_i2c.p_cfg);
if (SSP_SUCCESS != lc_ssp_err)
{
while (1);
}
R_BSP_SoftwareDelay(10, BSP_DELAY_UNITS_MILLISECONDS);
/* Reset any latched interrupts */
data[0] = 0x20;
data[1] = 0x02;
g_i2c.p_api->write(g_i2c.p_ctrl, data, 2, false);
R_BSP_SoftwareDelay(10, BSP_DELAY_UNITS_MILLISECONDS);
data[0] = 0x21;
data[1] = 0x8e;
g_i2c.p_api->write(g_i2c.p_ctrl, data, 2, false);
R_BSP_SoftwareDelay(10, BSP_DELAY_UNITS_MILLISECONDS);
data[0] = 0x12;
data[1] = 0x00;
g_i2c.p_api->write(g_i2c.p_ctrl, data, 2, false);
R_BSP_SoftwareDelay(10, BSP_DELAY_UNITS_MILLISECONDS);
data[0] = 0x11;
data[1] = 0x80;
g_i2c.p_api->write(g_i2c.p_ctrl, data, 2, false);
R_BSP_SoftwareDelay(10, BSP_DELAY_UNITS_MILLISECONDS);
lc_ssp_err = g_i2c.p_api->close(g_i2c.p_ctrl);
if (SSP_SUCCESS != lc_ssp_err)
{
while (1);
}
}