ARM Technical Support Knowledge Articles

ERROR 22 (NO CODE AT ADDRESS 0045H) USING EZ-USB

Applies to: MON51 Target Monitor

Answer


Information in this article applies to:


QUESTION

Help. I'm using the Cypress EZ-USB development system and I receive the following error message from the debugger.

ERROR 22 (NO CODE MEMORY AT ADDRESS 0045H)

Why do I receive this error?

ANSWER

This error message is caused by the EZ-USB chip writing to the autovector address located at 0x0045. This code memory location is automatically modified by the EZ-USB hardware and is therefore not writeable.

When you create an interrupt service routine in your C program and the monitor downloads the interrupt vector, error 22 is generated.

The solution to this problem is to change the definition for the autovector interrupt in the Cypress firmware. This can be done in the USBJMPTB.A51 file provided by Cypress. Modify the USB_AutoVector jmp as shown below. Note that this modification will work for debugging (with the monitor) and for production.

--- from USBJMPTB.A51 ---
;--------------------------------------------------------
; Interrupt Vectors
;--------------------------------------------------------
                CSEG    AT 43H
USB_AutoVector  equ     $ + 2
                DB      02H     ; LJMP
                DB      HIGH    USB_Jump_Table  ; High Byte of Jmp vector table
                DS      1                       ; Autovector hardware will replace byte 45

MORE INFORMATION

Article last edited on: 2005-08-03 12:59:00

Rate this article

[Bad]
|
|
[Good]
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