Skip to main content
linas2
Associate III
September 1, 2012
Question

Float or other format storing in SRAM

  • September 1, 2012
  • 1 reply
  • 479 views
Posted on September 01, 2012 at 14:33

Hello, i want to boost DFT speed so i need to calculate lot of sinf cosf  and store in external SRAM. internal is capable only for few dft points in spectrum, so i have to store them into SRAM, but don't know how to do that.

it work fine for 16b integers (i have 8Mb organized as 16b blocks)

i have this functions to read/write:

void SRAM_Write(uint16_t data, uint32_t WriteAddr);

int  SRAM_Read(uint32_t ReadAddr);

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    September 1, 2012
    Posted on September 01, 2012 at 16:12

    The floats would be 32-bit IEEE 754 format.

    float convert_u32_to_float(uint32_t x)

    {

      return(*((float *)&x));

    }

    The bigger question is why you don't access the external memory directly, as it's presumably parked in the middle of the ARM's address space and directly accessible.

    float *array_of_floats = (float *)0x60000000;

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..