cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

New Contributor II

I have a custom board with CYBLE-222014-01, an RGB LED, and an lis3dh accelerometer.

I am trying to use the accelerometer as an interrupt to wake up the CYBLE.

Can someone create a simple sample project that sets the accelerometer to wake up the CYBLE when the board is moved?... and ideally, it would put the board back to sleep if it hasn't moved in N number of seconds (30)? While the CYBLE is awake, turn on the green LED (on = 0u).

I've read the datasheets, tried a few times, and am still lost. Sorry... I am still a beginner to embedded.

R - P3[7] (18)

G - P3[4] (17)

B - P3[5] (16)

SCL - P5[1] (3)

SDA - P5[0] (4)

ACCL Int 1 - P1[5] (20)

ACCL int 2 - P1[4] (19)

Thank you so much in advance,

Steve

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello Steve,

1. We don't have the LIS3DH Accelerometer sensor to interface with the CYBLE-222014-01 device. From the LIS3DH sensor data sheet, it is given that the interface for this sensor to other device is through I2C/SPI digital output interface. So, please refer to some of the code examples ("I2C_SCB_Master", "I2C_SCB_Slave") on I2C interface in the PSoC Creator (Goto File-> Code examples) for more information.

2. The API CySysPmSleep() is used to put the the device into sleep mode. Any interrupt source in the device can be used to wake the device from sleep mode. Upon exiting Sleep, PSoC re-enters Active mode. Please refer to the AN86233 datasheet for more information on PSoC 4 Low power modes and Power reduction techniques.

Please let me know if you have any questions.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
Reply
1 Reply
Moderator
Moderator

Hello Steve,

1. We don't have the LIS3DH Accelerometer sensor to interface with the CYBLE-222014-01 device. From the LIS3DH sensor data sheet, it is given that the interface for this sensor to other device is through I2C/SPI digital output interface. So, please refer to some of the code examples ("I2C_SCB_Master", "I2C_SCB_Slave") on I2C interface in the PSoC Creator (Goto File-> Code examples) for more information.

2. The API CySysPmSleep() is used to put the the device into sleep mode. Any interrupt source in the device can be used to wake the device from sleep mode. Upon exiting Sleep, PSoC re-enters Active mode. Please refer to the AN86233 datasheet for more information on PSoC 4 Low power modes and Power reduction techniques.

Please let me know if you have any questions.

Thanks,

P Yugandhar.

View solution in original post

0 Likes
Reply