Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1,187 Views

In Curie BSP(Thunderdome) How to write sensor samples in flash memory ? whether to use ll_storage or circular storage ?

Hi,

I have gone through with the Curie BSP So I have used ll_storage but it is throwing panic error so can you please help me out in this

Thanks with regards

Vinod Hulagabali

0 Kudos
6 Replies
Highlighted
Community Manager
25 Views

Hello Vinod,

 

 

Thanks for reaching out!

 

 

Could you please explain us the steps you have taken so far? Please also explain us how to replicate the error.

 

 

We will be waiting for your response.

 

Pedro M.
0 Kudos
Highlighted
Beginner
25 Views

Hi,

I want to write sensor data to non-volatile memory, either by using ll_storage service or writing to flash directly.(unit_tests for both are provided in curie_BSP repository)

ll_storage service is under https://github.com/CurieBSP/main/tree/master/framework/unit_test/services main/framework/unit_test/services at master · CurieBSP/main · GitHub

flash_tst.c is under https://github.com/CurieBSP/main/tree/master/bsp/unit_test/machine/soc/intel/quark_se/quark main/bsp/unit_test/machine/soc/intel/quark_se/quark at master · CurieBSP/main · GitHub

Accordingly, I copied these files to my /projects/curie_hello folder and called appropriate function in these files from my main file.

I get panic error.

(flash_tst.c was not run simultaneously on both)

links to those logs are below-

https://pastebin.com/9HcVHL7b Flash_test.c run on arc of curie - Pastebin.com

https://pastebin.com/BiGszGhp Flash_test.c run on quark of curie - Pastebin.com

Thanks with regards

Vinod Hulagabali

0 Kudos
Highlighted
Community Manager
25 Views

Thank you for providing us this information, it is of help, however, we need some more details about what you tried.

 

 

Did you build Curie's BSP? If so, what steps did you take?

 

Are you trying to use a cross compiler toolchain? Or are you using the ODK to build your project? Are you following any guide?

 

Is it possible for you to share the step by step instructions of what you tried?

 

 

Let me know.

 

Pedro M.
0 Kudos
Highlighted
Beginner
25 Views

Hi,

Did you build Curie's BSP? If so, what steps did you take?

Yes I built Curie's BSP and I followed the steps as in https://github.com/CurieBSP/main/blob/master/README.rst main/README.rst at master · CurieBSP/main · GitHub

Are you trying to use a cross compiler toolchain? Or are you using the ODK to build your project? Are you following any guide?

Yes I have used the cross compiler toolchain. The guide is as in the read me file link mentioned.

I need to store the accel and gyro samples@200Hz for 20s(totalling to 128000 bytes).

 

Iam exploring writing to flash as storing in arrays is not an option for this large dataset.

 

 

I tried 2 methods

 

METHOD-1

 

1) coping flash_tst.c file in this path

 

https://github.com/CurieBSP/main/tree/master/bsp/unit_test/machine/soc/intel/quark_se/quark main/bsp/unit_test/machine/soc/intel/quark_se/quark at master · CurieBSP/main · GitHub

 

 

to our project path here

 

https://github.com/CurieBSP/main/tree/master/projects/curie_hello/quark

 

 

2) Created a "flash_tst.h" file

 

3) main.c will import this file and call "flash_test()" function.

 

 

 

 

METHOD-2

 

I also tried

 

 

Copying these files --

 

https://github.com/CurieBSP/main/blob/master/bsp/src/drivers/mtd/spi_flash_internal.h main/spi_flash_internal.h at master · CurieBSP/main · GitHub

 

https://github.com/CurieBSP/main/blob/master/bsp/src/drivers/mtd/spi_flash_mx25.c main/spi_flash_mx25.c at master · CurieBSP/main · GitHub

 

https://github.com/CurieBSP/main/blob/master/bsp/src/drivers/mtd/spi_flash_mx25.h main/spi_flash_mx25.h at master · CurieBSP/main · GitHub

 

https://github.com/CurieBSP/main/blob/master/bsp/include/drivers/spi_flash.h main/spi_flash.h at master · CurieBSP/main · GitHub

 

https://github.com/CurieBSP/main/blob/master/bsp/src/drivers/mtd/spi_flash.c main/spi_flash.c at master · CurieBSP/main · GitHub

 

https://github.com/CurieBSP/main/blob/3007eed9a03eb6945c0c63fa9ccca7fc1d6344d0/bsp/src/util/cunit_te... main/cunit_test.c at 3007eed9a03eb6945c0c63fa9ccca7fc1d6344d0 · CurieBSP/main · GitHub

 

https://github.com/CurieBSP/main/blob/3007eed9a03eb6945c0c63fa9ccca7fc1d6344d0/bsp/unit_test/machine... main/spi_flash_tst.c at 3007eed9a03eb6945c0c63fa9ccca7fc1d6344d0 · CurieBSP/main · GitHub (this included the spi_flash_mx25.h file)

 

we enabled CONFIG_SPI_FLASH_MX25R6435F=y in quark defconfig

 

into myhttps://github.com/CurieBSP/main/tree/master/projects/curie_hello/quark main/projects/curie_hello/quark at master · CurieBSP/main · GitHub folder.

 

 

main file included the spi_flash_tst.h and called the "spi_flash_test()" function .

 

We are trying this in quark

(It would be great if flash was accessible from arc only)

 

 

 

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~METHOD-2 logs are as follows~~~~~~~~~~~~~~~~~~~~~

 

 

Quark SE ID 16 Rev 0 A1

 

ARC Core state: 00004000

 

BOOT TARGET: 0

 

5889|QRK| DRV|ERROR| rdid check failed (0x1728c2)

 

5919|QRK|MAIN| INFO| BSP init done

 

5919|QRK| CFW| INFO| GPIO service init in progress...

 

5919|QRK|MAIN| INFO| CFW init done

 

5920|QRK|CUNI| INFO| #

 

5920|QRK|CUNI| INFO| # Purpose of spi flash tests: Erase, write, read #

 

5920|QRK| CFW|ERROR| Error: service 7 already registered

 

 

5920|QRK|CUNI| INFO| #

 

5920|QRK|CUNI| INFO| Do not use flash from 0x7fd8 to 0x8050

 

5921|QRK|CUNI| INFO| CU_FAIL: - file:/u/ee209535/Cur/wearable_device_sw/projects/curie_hello/quark/

 

5921|QRK|CUNI| INFO| Flash get RDID failed (7) 0x0

 

5922|QRK|CUNI| INFO| CU_FAIL: Test for spi flash driver failed - file:/u/ee209535/Cur/wearable_devic

 

5922|QRK|MAIN| INFO| Initialization done, go to main loop

0 Kudos
Highlighted
Community Manager
25 Views

Thank you for letting us know, please let us try to replicate the behavior you described. I'll update you as soon as I have any news.

 

 

Pedro M.
0 Kudos
Highlighted
Community Manager
25 Views

Hello Vinod,

 

 

We've reviewed this case and we have two possible solutions for your project.

 

 

1. You can use the Curie Open Developer Kit (ODK) which is derived from the Arduino 101 family of products. You can find additional information here: http://www.intel.com/curieodk

 

2. Another alternative is to adopt Zephyr RTOS.

 

 

Both of these are maintained releases and available to anyone. The support model is primary self-service and peer-to-peer. These source products are intended to support Curie devices that share commonality with the Arduino 101 product family and would be useful for developers who have designed their own products after the basic design template of the Arduino 101 board. There are several third-party development boards with Curie that can work with the Curie ODK, including the TinyTILE from element14.

 

 

Pedro M.
0 Kudos