• AVR Freaks

Hot!External memory via SQI (SST26)

Author
TZurich
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/04/02 23:28:38
  • Location: 0
  • Status: offline
2019/05/23 21:10:24 (permalink)
0

External memory via SQI (SST26)

Hi all,
 
I'm working with PIC32MZ DA and sst26 external flash memory for data stored. 
Currently, I can communicate with the device by sst26 driver and harmony framework, provided by Microchip.
But it seem not entirety meaning of memory, I'm just working with an device. 
 
Found from datasheet, memory map of PIC32MZ DA, we have SQI external memory addressing from 0xF0000000->0xF3FFFFFFF (not cacheable) and 0xD0000000 -> 0xD3FFFFFF (cacheable). What these address meaning and how to use them? And at the end of memory map picture I found the sentence: "The MMU must be enabled and the TBL must be set up to access this segment". It's so confusing to me.  
 
Could anyone please to help?
 
MPLAB X v5.15
Harmony v2.06

Attached Image(s)

#1

5 Replies Related Threads

    NKurzman
    A Guy on the Net
    • Total Posts : 17349
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: External memory via SQI (SST26) 2019/05/23 23:19:13 (permalink)
    0
    The PIC32 has 3 overlapping memory spaces.
    Physical ( the real address used only in rare cases)
    Cacheable ( this is the address for normal program use, these reads a writes use the cache)
    Non cacheable. (These can be used for normal program use, but can be slower since they’re not cached. They are required for some operations, like DMA)
    #2
    TZurich
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/04/02 23:28:38
    • Location: 0
    • Status: offline
    Re: External memory via SQI (SST26) 2019/05/23 23:47:41 (permalink)
    0
    Uhm... so what can I do with these SQI external address in memory map, do these address designed for SQI external memory device like SST26?
    post edited by TZurich - 2019/05/24 02:27:44
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 17349
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: External memory via SQI (SST26) 2019/05/24 05:55:42 (permalink)
    0
    If you are using SQI then you can use the SQI chip like ordinary memory in those address ranges.
    I assume writing to it would require more steps.
    #4
    TZurich
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/04/02 23:28:38
    • Location: 0
    • Status: offline
    Re: External memory via SQI (SST26) 2019/05/27 00:12:21 (permalink)
    0
    Oh you mean that at least we can map the external SQI memory (sst26) to MCU memory. Are there any document or example available for this mapping fearture?
    #5
    Rituv
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2019/06/11 22:13:39
    • Location: 0
    • Status: offline
    Re: External memory via SQI (SST26) 2019/06/18 02:03:30 (permalink)
    0
    Hii all,
    i am unable to find proper thread to post Write/Read  issue of flash memory , so i am posting here.
    It is regarding SST26VF064B Flash Memory  interface with SPI1/SSP – Write to memory Issue
    I have interfaced SST26VF064B Flash Memory  with SPI1/SSP of LPC2138 ARM microcontroller.
    Issue- I am facing an issue to choose Serial clock Rate selection to operate SPI1.
    After APB divider I am using 15 MHz for peripheral.
    Configuration- I have interfaced SPI1/SSP MOSI (Pin54), MISO (Pin53), SSEL (Pin55), SCK (pin47) lines with memory pins through 10k Pullup resistor. this is single master and  single Slave .  I want to make transmission in master mode and  SPI mode And initialized SPI1 the below:-
    I have defined SSEL as  #defined SS 00100000   // p0.20
     
    PINSEL1 |=0x000002A8;               // P0.17, P0.18, P0.19, P0.20 are set as SCK, MISO, MOSI and CE (SPI1)
    IODIR0 |= SS;                                     // SSEL is output
    IOSET0 |= SS;                                      // set SSEL to high
    SSPCPSR=0x02;                                    // 2 for master mode
     
    // 8 bit data of tx/rx, SCR (Serial clock rate as 10 =0A(hex) )  PCLK/(CPSDVSR*[SCR+1])
    SSPCR0= 0x0A07;            
    SSPCR1=0x02;                    //normal mode selection, SSp controller enabled
     
    I do not understand that how to select SCR (serial clock rate) in SSPCR0 register???? So I can make write and read properly.
    I have used  formula- PCLK/(CPSDVSR*[SCR+1])    //  15/( 2[2+1]) = 2.5MHZ
    I have checked these two , SSPCR0 and SSPCPSR  with multiple values, even checked for PCLK=60Mhz. But it is neither writing nor  reading passed string to memory.
    For writing  and reading to/from memory I have checked BSY flag in status register.
     while (!(SSPSR & 0x10) );
     
    Also I have  send the memory instruction/command prior WRITE and READ operation. WRITE_EN (0x06)  and 0x02 for 1 to 256 byte write. Then send actual data in format (Address, data length , actual data string)  as My_Write(0x000004,4,&MSG[0])
    Similarly send  0x03 prior to read data from memory. , then read data byte of the same address, length and string aaray.
     
    I  am receiving 0xFF after reading. I think this receive is dummy byte and writing is not happening.
    Hope somebody can give suggestion to SCR selection and writing commands.
    Regards,
    Ritu
     
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5