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:
    it is solely how to store the most data possible in RAM, whether that be through making multiple ring buffers or just one large one.

    I would recommend using a single ring buffer unless there are specific reasons to justify multiple buffers. If your goal is to store as much data as possible in RAM, you might want to consider using a chip like the nRF52840 instead of the nRF52832. The amount of ring buffers doesn’t significantly impact the storage capacity compared to the RAM availability.

    Best regards,

    Charlie

Reply
  • connorshannon said:
    it is solely how to store the most data possible in RAM, whether that be through making multiple ring buffers or just one large one.

    I would recommend using a single ring buffer unless there are specific reasons to justify multiple buffers. If your goal is to store as much data as possible in RAM, you might want to consider using a chip like the nRF52840 instead of the nRF52832. The amount of ring buffers doesn’t significantly impact the storage capacity compared to the RAM availability.

    Best regards,

    Charlie

Children
  • Apologies for my continued confusion, but I still have a few questions. 

    1. Why is the nRF52840 a better option than the nRF52832? Does it have more RAM storage available?

    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?

    Thank you.

Related