Ring Buffer Maximum Size

Hello, 

I'm reading about 700 values from an LSM6SDO gyro/accelerometers per second and need to store them, before sending them over bluetooth once where I store them is full. I briefly looked into flash storage, but it seems like ring buffers are the best way to go for my application. What is the best way to do this using ring buffers? Specifically, one question I had is how to use one (or multiple) ring buffers to store the most data possible. In my application, the amount of time that I can record data for will be dependent on the maximum amount of storage space I can use. I've looked through the ring buffer library, and it seems like one ring buffer can only hold 64 words worth of information. Does this mean I'll need to use more ring buffers? Any help you can provide would be greatly appreciated. I talk a little bit more about my specific application in this post. 

Thank you!

Parents
  • connorshannon said:
    1. Why is the nRF52840 a better option than the nRF52832? Does it have more RAM storage available?

    Yes. You can find following comparison from Bluetooth Low Energy (Bluetooth LE) - nordicsemi.com. You can even consider nRF5340 if the only concern is RAM size..

    connorshannon said:
    2. According to the ring buffer library, ring buffers are declared using RING_BUF_DECLARE which will "declare and statically initialize a ring buffer with a specified byte count." I want to make this as many bytes as are available in RAM, but I still don't know how to do this. Should I just use an arbitrarily large number and assume that it will allocate what is available? Is there a way to find out how many bytes are available for use in RAM?

    Yes, it is possible to monitor the RAM usage by your application, then you can adjust your ring buffer size accordingly. I have shared methods on the following thread:

    https://devzone.nordicsemi.com/support-private/support/338302#permalink=1028675

    Best regards,

    Charlie

Reply
  • connorshannon said:
    1. Why is the nRF52840 a better option than the nRF52832? Does it have more RAM storage available?

    Yes. You can find following comparison from Bluetooth Low Energy (Bluetooth LE) - nordicsemi.com. You can even consider nRF5340 if the only concern is RAM size..

    connorshannon said:
    2. According to the ring buffer library, ring buffers are declared using RING_BUF_DECLARE which will "declare and statically initialize a ring buffer with a specified byte count." I want to make this as many bytes as are available in RAM, but I still don't know how to do this. Should I just use an arbitrarily large number and assume that it will allocate what is available? Is there a way to find out how many bytes are available for use in RAM?

    Yes, it is possible to monitor the RAM usage by your application, then you can adjust your ring buffer size accordingly. I have shared methods on the following thread:

    https://devzone.nordicsemi.com/support-private/support/338302#permalink=1028675

    Best regards,

    Charlie

Children
No Data
Related