RAM test question - Embedded
This is a discussion on RAM test question - Embedded ; Hello!
I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and SDRAM.
And one question:
Codes are stored in FLASH , if I want to test RAM and print out some
message or get some command through ...
-
RAM test question
Hello!
I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and SDRAM.
And one question:
Codes are stored in FLASH , if I want to test RAM and print out some
message or get some command through RS-232 serial port before codes are
loaded into RAM and begin to run.Then RAM test routine must be written
in assembly language,right? Or can i write the test routine in C since
assembly programming is very time consuming?
-
Re: RAM test question
Hello ,
You can also write the RAM test routine in C!! It all depends on
what kind of RAM test you want to perform before starting your
application.
Best Regards,
Vivekanandan M
> Zhenhuan Du wrote:
> Hello!
>
> I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and SDRAM.
> And one question:
> Codes are stored in FLASH , if I want to test RAM and print out some
> message or get some command through RS-232 serial port before codes are
> loaded into RAM and begin to run.Then RAM test routine must be written
> in assembly language,right? Or can i write the test routine in C since
> assembly programming is very time consuming?
-
Re: RAM test question
I want to test RAM Address bus ,Data bus and Every Cell completely.
Can you give me some hint? Thanks!
Vivekanandan M wrote:
> Hello ,
>
> You can also write the RAM test routine in C!! It all depends on
> what kind of RAM test you want to perform before starting your
> application.
>
> Best Regards,
> Vivekanandan M
>
>> Zhenhuan Du wrote:
>> Hello!
>>
>> I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and SDRAM.
>> And one question:
>> Codes are stored in FLASH , if I want to test RAM and print out some
>> message or get some command through RS-232 serial port before codes are
>> loaded into RAM and begin to run.Then RAM test routine must be written
>> in assembly language,right? Or can i write the test routine in C since
>> assembly programming is very time consuming?
>
-
Re: RAM test question
"Zhenhuan Du" wrote in message
news:ejsdhb$94v$1@news.cn99.com...
>I want to test RAM Address bus ,Data bus and Every Cell completely.
> Can you give me some hint? Thanks!
>
> Vivekanandan M wrote:
> > Hello ,
>>
>> You can also write the RAM test routine in C!! It all depends on
>> what kind of RAM test you want to perform before starting your
>> application.
>>
>> Best Regards,
>> Vivekanandan M
>>
>>> Zhenhuan Du wrote:
>>> Hello!
>>>
>>> I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and SDRAM.
>>> And one question:
>>> Codes are stored in FLASH , if I want to test RAM and print out some
>>> message or get some command through RS-232 serial port before codes are
>>> loaded into RAM and begin to run.Then RAM test routine must be written
>>> in assembly language,right? Or can i write the test routine in C since
>>> assembly programming is very time consuming?
If you can lock the 8K cache then you can use it for stack and local
variables for a C app running directly from Flash. It is probably useful to
find out how to do that anyway because you don't want the cache getting in
the way of RAM testing.
Peter
-
Re: RAM test question
Peter Dickerson wrote:
> "Zhenhuan Du" wrote in message
> news:ejsdhb$94v$1@news.cn99.com...
>> I want to test RAM Address bus ,Data bus and Every Cell completely.
>> Can you give me some hint? Thanks!
>>
>> Vivekanandan M wrote:
>> > Hello ,
>>> You can also write the RAM test routine in C!! It all depends on
>>> what kind of RAM test you want to perform before starting your
>>> application.
>>>
>>> Best Regards,
>>> Vivekanandan M
>>>
>>>> Zhenhuan Du wrote:
>>>> Hello!
>>>>
>>>> I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and SDRAM.
>>>> And one question:
>>>> Codes are stored in FLASH , if I want to test RAM and print out some
>>>> message or get some command through RS-232 serial port before codes are
>>>> loaded into RAM and begin to run.Then RAM test routine must be written
>>>> in assembly language,right? Or can i write the test routine in C since
>>>> assembly programming is very time consuming?
>
> If you can lock the 8K cache then you can use it for stack and local
> variables for a C app running directly from Flash. It is probably useful to
> find out how to do that anyway because you don't want the cache getting in
> the way of RAM testing.
>
> Peter
>
>
thanks for your advice ,Peter! It's really a good idea! Further
question: What about an CPU without cache or integrated ram ?
I think it's better finding a general solution.
-
Re: RAM test question
"Zhenhuan Du" wrote in message
news:ek3vua$c1f$1@news.cn99.com...
> Peter Dickerson wrote:
>> "Zhenhuan Du" wrote in message
>> news:ejsdhb$94v$1@news.cn99.com...
>>> I want to test RAM Address bus ,Data bus and Every Cell completely.
>>> Can you give me some hint? Thanks!
>>>
>>> Vivekanandan M wrote:
>>> > Hello ,
>>>> You can also write the RAM test routine in C!! It all depends on
>>>> what kind of RAM test you want to perform before starting your
>>>> application.
>>>>
>>>> Best Regards,
>>>> Vivekanandan M
>>>>
>>>>> Zhenhuan Du wrote:
>>>>> Hello!
>>>>>
>>>>> I have a board with NET+50 (with ARM7TDMI core) , NOR FLASH and
>>>>> SDRAM.
>>>>> And one question:
>>>>> Codes are stored in FLASH , if I want to test RAM and print out some
>>>>> message or get some command through RS-232 serial port before codes
>>>>> are
>>>>> loaded into RAM and begin to run.Then RAM test routine must be written
>>>>> in assembly language,right? Or can i write the test routine in C since
>>>>> assembly programming is very time consuming?
>>
>> If you can lock the 8K cache then you can use it for stack and local
>> variables for a C app running directly from Flash. It is probably useful
>> to find out how to do that anyway because you don't want the cache
>> getting in the way of RAM testing.
>>
>
> thanks for your advice ,Peter! It's really a good idea! Further question:
> What about an CPU without cache or integrated ram ?
> I think it's better finding a general solution.
There is a point at which you have to trust something. Does your RAM and
Flash share address or data busses? If so then a fault at the RAM might
interfere with the Flash operation. How to you program the Flash in the
first place - before soldering to the board or via JTAG. Its not uncommon to
need some RAM to work for JTAG programming to work (e.g. download
programming code into RAM). If you have RAM in your CPU and you trust the
chip then I'd accept that as a gift. Writing code to test RAM *and* report
failures without using any RAM for workspace is likely to be much harder
work. To do this you will have to run from Flash and only use registers for
work space. You won't be able to do it in C because you can't have a stack.
With an ARM the subroutine call can be used without RAM but you'll need to
avoid nested calls.
Peter