• 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 » Microcontrollers » Hercules™ Safety Microcontrollers » Hercules™ Safety Microcontrollers Forum » RAM ECC test, stuck during _memoryInit_
Share
Hercules™ Safety Microcontrollers
  • Forum
  • E2E Wiki
Options
  • Subscribe via RSS

RAM ECC test, stuck during _memoryInit_

RAM ECC test, stuck during _memoryInit_

This question is answered
Vaclav Cechticky
Posted by Vaclav Cechticky
on Feb 06 2012 06:40 AM
Intellectual550 points

Hello,

I'd like to verify the RAM ECC functionality, I'm calling

_memoryInit_();

_coreEnableRamEcc_();

 but, the system gets stuck during _memoryInit_ call.

Is there is a workaround for this issue?

Thank you

Vaclav

P.S. I'm using RM48L950, HALCoGen 3.0

RAM ECC
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • QJ Wang
    Posted by QJ Wang
    on Feb 06 2012 08:05 AM
    Verified Answer
    Verified by Vaclav Cechticky
    Expert4320 points

    Hello Vaclav,

    Which board are you using, TMS570LS3x HDK or RM48 HDK?

    For RM48 HDK, you can not init FlexRya RAM. Can you try this value 0x1C57F for ramIniMask in sys_memory.asm

    Regards,

    QJ

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vaclav Cechticky
    Posted by Vaclav Cechticky
    on Feb 06 2012 08:37 AM
    Intellectual550 points

    Hello,

    I have RM48 HDK, your proposal works, I had there 0x1E57F instead.

    In fact, I'd like to ask you one more question regarding the RAM ECC test. So, the test is started now, but after checking the single error status, the system gets stuck again

    if (!((tcram1REG->RAMERRSTATUS & 1) || (tcram2REG->RAMERRSTATUS & 1))) {

    ... it ends up here and then gets stuck ...

    } 

    Do you have any hint why is doing so?

    Thank you

     Vaclav

    RAM ECC
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sunil Oak
    Posted by Sunil Oak
    on Feb 06 2012 13:33 PM
    Expert8535 points

    Hello Vaclav,

    Are you running the RAM ECC check routine as shown in the example code that comes with SPNA106A? Can you post your entire RAM ECC check routine?

    Regards, Sunil

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vaclav Cechticky
    Posted by Vaclav Cechticky
    on Feb 07 2012 01:45 AM
    Intellectual550 points

    Hello Sunil,

    I'm using the routine originating form the SPNA106A example code ...

    Thank you

    Vaclav

    ----

    void checkB0RAMECC(void)
    {
    volatile unsigned int ramread = 0;

    tcram1REG->RAMCTRL = 0x0005010A; // enable writes to ECC RAM, enable ECC error response
    tcram2REG->RAMCTRL = 0x0005010A;

    tcram1REG->RAMTHRESHOLD = 0x1; // the first 1-bit error will cause an error response
    tcram2REG->RAMTHRESHOLD = 0x1;

    tcram1REG->RAMINTCTRL = 0x1; // allow SERR to be reported to ESM
    tcram2REG->RAMINTCTRL = 0x1;

    tcramA1bitError ^= 0x1; // cause a 1-bit ECC error
    tcram1REG->RAMCTRL = 0x0005000A; // disable writes to ECC RAM
    tcram2REG->RAMCTRL = 0x0005000A;

    ramread = tcramA1bit; // read from location with 1-bit ECC error
    if (!((tcram1REG->RAMERRSTATUS & 1) || (tcram2REG->RAMERRSTATUS & 1))) // SERR not set in TCRAM1 or TCRAM2 modules
    {
    tcramClass2Error(); // TCRAM module does not reflect 1-bit error reported by CPU
    }
    else
    {
    tcram1REG->RAMERRSTATUS = 0x1; // clear SERR flag
    tcram2REG->RAMERRSTATUS = 0x1;
    esmREG->ESTATUS1[0] = 0x14000000; // clear status flags for ESM group1 channels 26 and 28
    }

    tcram1REG->RAMCTRL = 0x0005010A; // enable writes to ECC RAM, enable ECC error response
    tcram2REG->RAMCTRL = 0x0005010A;

    tcramA2bitError ^= 0x3; // cause a 2-bit ECC error
    ramread = tcram1REG->RAMCTRL;
    ramread = tcram2REG->RAMCTRL;

    ramread = tcramA2bit; // read from location with 2-bit ECC error
    // this will cause a data abort to be generated
    }
    RAM ECC
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sunil Oak
    Posted by Sunil Oak
    on Feb 08 2012 20:58 PM
    Verified Answer
    Verified by Vaclav Cechticky
    Expert8535 points

    Hello Vaclav,

    Can you check if there is any other bit getting set in the RAM ERR STATUS register? You can also check if the RAM OCCUR register increments to indicate that a single-bit error was reported by the CPU's ECC logic.

    If you are using CCS for the debug, you can also view CPU registers, including the co-processor registers. You can check the Correctable Fault Location Register. This register contains a bit to indicate that a single-bit TCM ECC error was detected.

    Regards, Sunil

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vaclav Cechticky
    Posted by Vaclav Cechticky
    on Feb 10 2012 07:47 AM
    Verified Answer
    Verified by Vaclav Cechticky
    Intellectual550 points

    Hello Sunil,

    Thank you for your feedback. The test works now, the problem was in ECC enable assembler sequence.

    Regards Vaclav

    RAM ECC
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Sunil Oak
    Posted by Sunil Oak
    on Feb 10 2012 07:49 AM
    Expert8535 points

    Hello Vaclav,

    Did you mean the ECC enable sequence used in the example initialization code?

    Regards, Sunil

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Vaclav Cechticky
    Posted by Vaclav Cechticky
    on Feb 10 2012 07:55 AM
    Intellectual550 points

    Hallo Sunil,

    No, in fact, the one used in the example showing initialization code is correct. The mistake was on my side.

    Thank you

     Vaclav

    RAM ECC
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jiri Janacek
    Posted by Jiri Janacek
    on Aug 02 2012 09:55 AM
    Intellectual960 points

    Dear TI experts,

    I have similar issue with simple blinky example in IAR environment. The code of sys_memory.asm compiled and linked by IAR EWARM works incorrectly - processor stays in mloop.

    IAR EWARM installation:

        IAR Assembler for ARM
          6.40.2.53884 (6.40.2.53884)

        IAR C/C++ Compiler for ARM
          6.40.2.23884 (6.40.2.23884)

        IAR ELF Linker for ARM
          6.40.2.53884 (6.40.2.53884)

    target:
        TMS570LS3x HDK

    code snippet:
    ;-------------------------------------------------------------------------------
    ; Initialize memory

        PUBLIC     _memoryInit_

    _memoryInit_
            ldr   r12, regMinitGcr    ; MINITGCR register pointer
            mov   r4, #0xA
            str   r4, [r12]
            ldr   r4, ramInitMask     ; load RAM initialization mask
            str   r4, [r12, #4]
    mloop
            ldr   r5, [r12, #12]
            tst   r5, #0x100
            beq   mloop
            mov   r4, #5
            str   r4, [r12]
            bx    lr

    ramInitMask   dcd 0x657F       ; value copied from CCS project 

    regMinitGcr   dcd 0xFFFFFF5C

    A program built by TMS470 Code Generation Tools 4.9.1 is running properly, does not get stuck in _memoryInit_ function. By the way, the function _coreEnableRamEcc_() is not called.

    IAR and TI compilers produce a different object code:

    tst   r5, #0x100    

    E3150F40  (IAR EWARM)      

    E3150C01  (CCSv5)

    Dump of SYS1 registers in IAR debugger:
        MINITGCR = 0xA       
        MSINENA = 0x657F
        MSTCGSTAT = 0x0 (0x100 expected)


    Please do you have any idea what could be wrong?


    Many thanks in advance,

    Cheers
    Jiri

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jiri Janacek
    Posted by Jiri Janacek
    on Aug 08 2012 05:00 AM
    Intellectual960 points

    FYI

    This topic has been re-issued in this forum post

    http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/205959/731575.aspx#731575

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • marlon marlon
    Posted by marlon marlon
    on Sep 04 2012 02:36 AM
    Prodigy60 points

    hi,i am using RM48L950 MDK ,for our development,do you have any RM48L950 MDK examples  OR library function?

    thank you !

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • marlon marlon
    Posted by marlon marlon
    on Sep 04 2012 02:36 AM
    Prodigy60 points

    hi,i am using RM48L950 MDK ,for our development,do you have any RM48L950 MDK examples  OR library function?

    thank you !

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jiri Janacek
    Posted by Jiri Janacek
    on Sep 04 2012 02:59 AM
    Intellectual960 points

    Hello Marlon,

    have you checked some of following pages? RM4 processor is based on the same core ( Lockstep Dual Cortex-R4F) as the TMS570 processor is, so you can also utilize examples originally given for TMS570.

    RM4 ARM Cortex-R4F Series http://www.ti.com/mcu/docs/mcuprodtoolsw.tsp?sectionId=95&tabId=2843&familyId=2056&toolTypeId=1

    Hercules Platform Overview http://processors.wiki.ti.com/index.php/Category:Hercules

    Hecules TMS570 Safety MCU Example Code wiki http://processors.wiki.ti.com/index.php/Category:HerculesSWExamples


    Nevetheless, this forum thread has been already "closed" (the answer was verified), so I would recommend you to submit a new post for further support by TI experts.


    Good luck & cheers, Jiri

    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