Author Topic: Data logging SPI Flash  (Read 1977 times)

Shane

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Data logging SPI Flash
« on: February 23, 2014, 04:39:47 PM »
I want to log some sensor data on the PIC and I am thinking of using the SPI flash because the library is already there (nz_xFlash.h, spiFlashWinBound.c).
I am aware that the webserve is hosted on the SPI flash and I don't want to accidentally corrupt it and other programs, is it possible to reserve a 20 KB block of memory maybe at the end of the memory address, and what would you recommend for the address range of that block?

modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
Re: Data logging SPI Flash
« Reply #1 on: February 24, 2014, 12:09:48 PM »
Hello Shane

Yes, this is no problem.

See documentation for memory map:
http://www.netcruzer.com/nz/v203/doc/html/projects/webserver/group__proj__webserver__memmap.html

The start of the user space is given by the XFLASH_USER_SPACE_ADR define in code. User space is followed by the File System, which is located at the address given by the MPFS_RESERVE_BLOCK define

The user can use the space in external FLASH from XFLASH_USER_SPACE_ADR up till (MPFS_RESERVE_BLOCK - 1). The user space is only 4kbytes by default. To increase user space, increase the MPFS_RESERVE_BLOCK value. It is defined in the TCPIP_BOARDNAME.h file located in the "../Configs" folder. For example, for the SBC66EC Revision 2 board, it is defined in the "../Configs/TCPIP_SBC66EC-R2.h" file.