This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What are the var types of RAM data?

Hi Team,

Recently, I am developing spi functions. There is a function that makes me confused --"nrfx_is_in_ram".

I am not clear that what types belong to RAM data.

Can you explain to me?

In one SPI example, it seems a const type. If so, suppose that I want to transmit dynamic data. How can i do?

Best,

Gaosheng

Parents
  • Hi, 

    The reason for having a function to check if data is stored in RAM is that some peripherals (SPIM/TWIM/SPIS/TWIS/etc) support EasyDMA, to get/put data directly from/to RAM while CPU is sleeping. Data stored in flash can't be read using EasyDMA.

    Normally, data declared as 'const' is stored in flash, while other variables/buffers are stored in RAM.

    Best regards,
    Jørgen

  • Hi Jorgen,

    Thanks for the help.

    One thing is that I declared the variable is not "const" type. Why is it still reporting errors?

    Best,

    Gaosheng

     

  • NULL is 0x00000000 which is address 0 in Flash memory, ie not RAM. m_tx_buf can only point to RAM, so if a default initialiser has to be used it must be other than NULL. The implication is the transfer is being used without setting the m_tx_buf to a real buffer in RAM

Reply
  • NULL is 0x00000000 which is address 0 in Flash memory, ie not RAM. m_tx_buf can only point to RAM, so if a default initialiser has to be used it must be other than NULL. The implication is the transfer is being used without setting the m_tx_buf to a real buffer in RAM

Children
Related