You are here

Project #026: BLE Data Logging on F-RAM | Cypress Semiconductor

Project #026: BLE Data Logging on F-RAM

In project #025, we demonstrated how you can use Cypress F-RAM as exteral storage memory to perform Over-the-Air BLE firmware upgrades. F-RAM is ideal to store data for such mission-critical applications like firmware bootloading due to its endurance and fast serial interface (100 trillion read/write cycles!)

In today's project, we will demonstrate how you can use F-RAM for data storage of vital information from your wearable products while consuming very little power. Recall, the Cypress F-RAM devices only consume 300-µA of active current and 6-µA of standby current making them ideal for sensor-based wearable electronics. 

In this example, we implement a BLE Heart Rate Sensor Profile on the BLE Pioneer Kit, similar to how we did in Project #002Additionally, the Heart Rate Measurements are stored on the external serial F-RAM device over an I2C interface. Once a BLE connection is established with a GAP Client (e.g. a mobile phone), this project will send the measured heart rate data to the Client via Notifications on a 1-second connection interval. The same data is sent to the F-RAM over I2C for data logging and also to a terminal (COM port) over UART for debugging purposes.

Using this example, you can create projects where the measured sensor data is stored on an external nonVolatile memory in realible way while consuming very little power.

You can download this PSoC Creator project along with a detailed PDF of instructions, here from GitHub: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day026_HRM_DataLogger

 

   BLE Pioneer Kit Block Diagram

Comments

Humbert's picture

In the fram_logging.c, cannot understand what is the uint8 temp_buf[len+ADDR_SIZE] for, could anyone help?

barrysmale's picture

I found a bug in the Project #026: BLE Data Logging on F-RAM by Gagan Luthra. Line 29which is memcpy(&temp_buf[2], write_buf, len); The &temp_buf[2] should be &temp_buf[4]. The first 4 bytes should be the FRam address followed by the data packet. I checked out the write and read compare. Before I was getting lots of errors :=( , but now I get none :-)
Cheers, Barry

Chad.Wagner_1573706's picture

The FRAM read/write routines are broken in this project. The ones in "BLE_OTA_External_Memory_Bootloader" are much better written.

The FRAM address should be 2 bytes not 4 bytes, and this project should use the page select in the Memory Slave Device Address for the upper memory locations.

ronijames11_3081306's picture

Hello super schöner Webblog den ihr da habt. Bin gerade über die Google Suche darüber gestolpert.  Gefällt mir echt super gut. macht weiter so. MFG Martina

ultimate ecom mastery course scam

angelina_3306851's picture

Marvelous and fascinating article. Incredible things you've generally imparted to us. Much obliged. Simply keep making this kind out of post. casino tivoli

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.