• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » WinCE » WinCE forum » Trying to bring up WinCE 7 eboot on a Sitara AM3517 from 8-bit NAND flash
Share
WinCE
  • Forum
Options
  • Subscribe via RSS

Trying to bring up WinCE 7 eboot on a Sitara AM3517 from 8-bit NAND flash

Trying to bring up WinCE 7 eboot on a Sitara AM3517 from 8-bit NAND flash

This question is answered
Andreas Geisreiter
Posted by Andreas Geisreiter
on Jul 27 2012 02:18 AM
Intellectual310 points

Hi,

I have problems to start eboot with 8bit NAND Flash. Everithing works fine up to the call of "memcpy(pData, (BYTE*)pDevice->pFifo, FIFO_THRESHOLD)"  in the function NAND_Read().

For 8bit NAND FLash support I have changed the source code lines

#define WRITE_NAND(x,y)         OUTREG16(x,y)    // 16-bit access
#define READ_NAND(x)            INREG16(x)       // 16-bit access
typedef REG16 NANDREG;

to

#define WRITE_NAND(x,y)         OUTREG8(x,y)    // 8-bit access
#define READ_NAND(x)            INREG8(x)       // 8-bit access
typedef REG8 NANDREG;

Here are my debug messages:

Microsoft Windows CE Bootloader Common Library Version 1.4 Built Jul 20 2012 10:20:54

Texas Instruments Windows CE EBOOT for AM35x, Built Jul 27 2012 at 08:42:48
EBOOT Version 1.2, BSP 2.00.00.02

TI AM3517 Version 0x1 (Hawkeye 0xb868 / manufacturer ID  0x17)
System ready!
Preparing for download...
INFO: Predownload....
Checking bootloader blocks are marked as reserved (Num = 14)
 Skip bad block 0
 Skip bad block 1
 Skip bad block 2
 Skip bad block 3
 Skip bad block 4
 Skip bad block 5
 Skip bad block 8
 Skip bad block 10
 Skip bad block 12

What could be the problem?

Best regards,

Andreas

3517 A8 bsp 010100 Adeneo Adeneo BSP
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Adeneo Embedded support team
    Posted by Adeneo Embedded support team
    on Jul 27 2012 02:46 AM
    Genius5255 points

    The 2.30 BSP NAND driver currently does not support 8-bit access.The small modification you made goes in the right direction but is most likely not enough to add 8-bit support in the driver. For instance, the SectorAccess and BlockAccess will probably need to be rewritten as your 8-bit FLASH may have a different sequence for passing offsets. You could have a look at your NAND part datasheet and see if these sequences match the NAND's expected sequence.

    Adeneo Embedded Support team
    Contact us at sales@adeneo-embedded.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Jul 27 2012 05:08 AM
    Intellectual310 points

    The BSP support the following flash Types:

    Manufacturer ID     Device ID   Nb of Blocks    Nb of Sectors per block     Sector Size     Bus width   Total Size 
    0x2C (Micron)       0xBA        2048            64                          2048            x16         256 Mbytes 
    0x2C (Micron)       0xBC        4096            64                          2048            x16         512 Mbytes  

    we use the follwing flash from Micron

    0x2C (Micron)      0xDA         2048            64                          2048            x8          256 Mbytes 

    I think it is nearly the same in all till the bus size. So it cann't be a big deal to adapt the driver, or? How different is the driver for the AM335x? This BSP support or NAND FLlash.

    Best regards,

    Andreas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Adeneo Embedded support team
    Posted by Adeneo Embedded support team
    on Jul 31 2012 05:09 AM
    Verified Answer
    Verified by Adeneo Embedded support team
    Genius5255 points

    The AM3xx BSP  uses a different NAND driver but supports only 16bit NAND parts:

    \PLATFORM\COMMON\SRC\SOC\COMMON_TI_V1\COMMON_TI_AMXX\BLOCK\NAND\fmd.c:

     if ((pBSPNandInfo->sectorSize != 2048) && (pBSPNandInfo->wordData != 2)){        

              ERRORMSG(1,(TEXT("FMD driver supports only 16bits large page (2KB) devices\r\n")));        

              goto cleanUp;    

    }

     It is not a big deal to adapt the driver but changing the WORD access as you did is most likely not enough. You will need to have a look at how you are supposed to send addresses offset through th 8-bit parallel port, which is defined in the datasheet of your NAND chip.

    Adeneo Embedded Support team
    Contact us at sales@adeneo-embedded.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Aug 03 2012 00:51 AM
    Intellectual310 points

    You wrote, that the AM335x BSP also doesn't support 8-bit NAND Flash. If this is correct, the information of the TI wiki is wrong: http://processors.wiki.ti.com/index.php/WinCE-BSP_ARM-A8_User_Guide#Supported_NAND_chip

    And I found some code like

    #define NANDREG_SIZE(p)   ((int)((IS_NAND_16BIT(p))?(sizeof(REG16)):(sizeof(REG8))))

    at \PLATFORM\COMMON\SRC\SOC\COMMON_TI_V1\COMMON_TI_AMXX\BLOCK\NAND\fmd.c.

    Are you really sure that this dirver only supports 16bit NAND Flash? I will try it as soon as I possibly.

    Best regards,

    Andreas

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rajath M B
    Posted by Rajath M B
    on Aug 07 2012 01:29 AM
    Intellectual395 points

    Hi Andreas,

    Were you able to resolve the issue.

    1) Can you just share the files to which you made changes.

    2) from your thread i observed in your debug messages you are able to detect the Manufacture ID, presently i am not even able to read my NAND ID.

    Could you please help me in resolving the issue, i am Newbie to this.

    Thanks ...................

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Aug 07 2012 03:03 AM
    Intellectual310 points

    Hi Rajath,

    I'm not working on this problem at the moment. But I don't have solved it so I need to spend some time on it later.

    At the moment I'm able to read the manufacturer ID be changing the following defines

    #define WRITE_NAND(x,y)         OUTREG16(x,y)    // 16-bit access
    #define READ_NAND(x)            INREG16(x)       // 16-bit access
    typedef REG16 NANDREG;

    to

    #define WRITE_NAND(x,y)         OUTREG8(x,y)    // 8-bit access
    #define READ_NAND(x)            INREG8(x)       // 8-bit access
    typedef REG8 NANDREG;

    But this changes are not enough, because the driver hangs on reading a block.

    At the moment I don't have more information. If you find something, it would be nice to hear from you. I will do the same to you.

    Best regards,

    Andreas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • suhas m1
    Posted by suhas m1
    on Aug 23 2012 10:47 AM
    Intellectual890 points

    hi andreas...

    same problem here..... im not even able to detect the  nand ID's...

     the boot gets stuck after below...........

    Microsoft Windows CE Bootloader Common Library Version 1.4 Built Jul 20 2012 10:20:54

    Texas Instruments Windows CE EBOOT for AM35x, Built Jul 27 2012 at 08:42:48
    EBOOT Version 1.2, BSP 2.00.00.02

    System ready!
    Preparing for download...
    INFO: Predownload....

    i have heard that 8 bit nand is not supported by the BSP.....

    pls share the changes i have to make.....

    thnx in advance............

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Adeneo Embedded support team
    Posted by Adeneo Embedded support team
    on Aug 23 2012 18:01 PM
    Verified Answer
    Verified by Adeneo Embedded support team
    Genius5255 points

    Please compare the fmd.c implementation in \PLATFORM\COMMON\SRC\SOC\COMMON_TI_V1\COMMON_TI_AMXX\BLOCK\NAND\fmd.c vs the \PLATFORM\COMMON\SRC\SOC\COMMON_TI_V1\COMMON_TI\BLOCK\NAND\fmd.c.  In the AMXX implementation there is a macro that detects the 8 or 16bit NAND bus size.  With this information it can use either the 8 or 16 bit code paths.  You'll need to port these changes and then debug the port to get your 8 bit NAND working.

    Adeneo Embedded Support team
    Contact us at sales@adeneo-embedded.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Sep 11 2012 04:56 AM
    Verified Answer
    Verified by Andreas Geisreiter
    Intellectual310 points

    Thanks for your answer.

    With your suggestion I have done the following changes, to get the 8bit NAND Flash working with the AM35x NAND Flash driver:

    16bit NAND Flash:

    #define WRITE_NAND(x,y)         OUTREG16(x,y)

    #define READ_NAND(x)            INREG16(x)  

    typedef REG16 NANDREG; 

    // Offset is provided to this function in bytes; NAND device requires words
    offset = offset / 2;

    pDevice->pFifo = MmMapIoSpace(pa, pDevice->memLen[1], FALSE);

     pDevice->ECCCfg = (GPMC_ECC_CONFIG_16BIT | (chipSelect << 1) | (0x3<<4));

    8bit NAND Flash:

    #define WRITE_NAND(x,y)         OUTREG8(x,y)

    #define READ_NAND(x)            INREG8(x)

    typedef REG8 NANDREG;

    // Offset is provided to this function in bytes; NAND device requires words
    offset = offset / sizeof(NANDREG);

     pDevice->pFifo = (NANDREG *)MmMapIoSpace(pa, pDevice->memLen[1], FALSE);

     pDevice->ECCCfg = (GPMC_ECC_CONFIG_8BIT | (chipSelect << 1) | (0x3<<4));

    Thanks and best regards,

    Andreas

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • suhas m1
    Posted by suhas m1
    on Sep 11 2012 12:31 PM
    Intellectual890 points

    hey andreas........

    i got my 8 bit nand working too..... :)

    but issues im facing are....

    1. the nand read/write spped is too slow wen compared to POP... its coming around 200KBPS...and the file copy speed is coming around 65KBPS.. which are too low as per the data sheet of the nand.. i tested these speeds with this utillity 6761.CETestContainer.rar ...

    2. some times the data that i have copied to nand is getting corrupted after cold reboot and some times its not...

    3. some times the data is getting lost.. i.e nand gets erased completely upon cold reboot  and some times its not....

    r u facing the same issues?????? wat might be the cause to it?????

    pls help me andreas....

    thnx in advance...

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Sep 18 2012 01:31 AM
    Intellectual310 points

    Hi,

    sorry for the late answer. I currently have a lot of work. I will check your notes as soon as possible with our platform and I'm writing again.

    Best regards,

    Andreas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • suhas m1
    Posted by suhas m1
    on Feb 13 2013 10:34 AM
    Intellectual890 points

    hey i made all the changes wat u hav done , im able to read device id n manufacture id of my 8bit nand but eve im getting stuck at  memcpy(pData, (BYTE*)pDevice->pFifo, FIFO_THRESHOLD);

    wat did u do to solve this problem... pls share..... :)

    can u pls share files fmd.c, bsp_def.h, bspcfg.c, cfg.c, flashmenu.c,,......whch made the 8bit nand work.... pls pls pls... im also trying to bring up 8bit nand... but have not seen much success... im able to read the device ID  n manufac id... but after reading, the boot hangs... unable to boot... pls can u share...... 

    pls pls pls........... :)

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Feb 14 2013 00:48 AM
    Intellectual310 points

    Hi,

    all the changes I have done are explained above.

    Best regards,

    Andreas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • suhas m1
    Posted by suhas m1
    on Feb 15 2013 10:31 AM
    Intellectual890 points

    hi andreas,

    thnx for timely reply.......


    but i have made all the changes wat u hav done , im able to read device id n manufacture id of my 8bit nand.......BUT BUT BUT.... still EBOOT is getting stuck at  memcpy(pData, (BYTE*)pDevice->pFifo, FIFO_THRESHOLD) line in  in the function NAND_Read().

    this is the same problem that u have posted in 1st post of this blog.....

    how did u solve this ??????

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Andreas Geisreiter
    Posted by Andreas Geisreiter
    on Feb 18 2013 01:43 AM
    Intellectual310 points

    Try to add line

    // Configure CS GPMC_CONFIG7_0

    OUTREG32(&pDevice->pGpmcRegs->GPMC_CONFIG7_0, 0xF48); // Chip-select size of 16 Mbytes + CS enable + CS base address 0x800_0000 (FIFO)

    in the function NAND_Initialize() after

    // configure prefetch engine

    OUTREG32(&pDevice->pGpmcRegs->GPMC_PREFETCH_CONFIG2, pBSPNandInfo->sectorSize);        

    SETREG32(&pDevice->pGpmcRegs->GPMC_PREFETCH_CONFIG1, GPMC_PREFETCH_CONFIG_ENABLEENGINE);

    Best regards,

    Andreas

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use