This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About memory monitoring ... Help me.

I want to monitor my Keyboard which is mapped in address 0xA001 of my external memory.

Here is my initialization file:

FUNC void key_scan(void){
  printf("Keyboard was scanned.\n");
}

BS READ X:0xA001,1,"key_scan()"


I want the function key_scan() be invoked when I scan keyboard input.

But..The result is not correct.
The function key_scan() was invoked in quick succession even when keyboard is not scanned.

Does anyone know what happen??

Parents
  • When you set a breakpoint that way, the function is invoked, but execution does not stop (unless you stop it in the function).

    I would change your function to be a signal as follows:

    SIGNAL void key_scan(void){
      while (1) {
        rwatch (X:0xA001);
        printf("Keyboard was scanned.\n");
        }
    }

    Jon

Reply
  • When you set a breakpoint that way, the function is invoked, but execution does not stop (unless you stop it in the function).

    I would change your function to be a signal as follows:

    SIGNAL void key_scan(void){
      while (1) {
        rwatch (X:0xA001);
        printf("Keyboard was scanned.\n");
        }
    }

    Jon

Children
No data