ARM Technical Support Knowledge Articles


Applies to: RTX51 Real-time Kernel


Information in this article applies to:


I am using the RTX51 Full RTOS and I need to implement a RAM memory check that writes and verifies every memory cell by writing a pattern (for example 0xAA and 0x55) on every RAM cell. The problem is that I have other tasks (fast and standard) and interrupts during this memory verification. Can you suggest a way to implement this memory check?


You may temporarily disable all interrupts even in a RTX51 application. This is allowed unless you disable the interrupt system for more than 10.000 cycles. If the interrupt disable time is longer than this (or if it exceeds the system timer tick value), you will lose interrupts in your system, which may yield to unpredictable behavior.

Therefore, the following function allows you to perform the memory test required in your system. You may call this function from a low priority task.

#include <absacc.h>

unsigned char TestLoc (unsigned int adr)  {
  unsigned char XRAMerr = 0;

  EA = 0;  // disable interrupts -> lock task (critical section)
  SaveVal = XBYTE[adr];
  XBYTE[adr] = 0x55;
  if (XBYTE[adr] != 0x55)  XRAMerr = 1;
  XBYTE[adr] = 0xAA;
  if (XBYTE[adr] != 0xAA)  XRAMerr = 1;
  EA = 1;  // enable interrupts -> unlock task (critical section)
  return (XRAMerr);


Article last edited on: 2007-01-18 11:35:09

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential