View previous topic :: View next topic |
Author |
Message |
lindermat
Joined: 21 Nov 2011 Posts: 11
|
PIC24 Extended Data Space through SPI |
Posted: Wed Jan 25, 2012 1:20 pm |
|
|
I would like to use the SRAM buffers in my external serial flash memory directly rather than copy data into the internal memory of the PIC.
The flash memory is connected by SPI and works fine, but copying data is a pain. I can send commands to copy the SRAM buffer contents to and from the von-volatile part of the flash where I can easily modify it, then write it back with one command.
Can this be done using the Extended Data Space feature of the PIC24? Does CCS support this feature?
Thanks, |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Wed Jan 25, 2012 3:39 pm |
|
|
I don't think the extended data space feature would support this, but the CCS addressmod ability should. Look at this in the manual.
Best Wishes |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Fri Jan 27, 2012 12:23 am |
|
|
Just curious, which external flash with SRAM buffer are you using? Does it support random access, as required for the read and write functions?
In any case, the access will involve a lot of overhead, thus I wonder if it makes sense for a PIC24, that should have enough RAM for a small on chip buffer. |
|
|
miro
Joined: 15 Jan 2011 Posts: 62
|
Re: PIC24 Extended Data Space through SPI |
Posted: Tue Feb 14, 2012 2:58 am |
|
|
For example:
- pic24hj @50MHz, SPI=12.5MHz
- FRAM FM25H20, 2MBit, SPI, r/w full speed, no latencies
- addressmod used
- individual random byte r/w in 7us (~142kB/s)
- 1024Bytes large block r/w in 1ms (~1MB/s)
M. |
|
|
|