Keil Logo

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


Information in this article applies to:

  • C51 Version 5.x
  • C51 Version 6.x

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

  • Refer to Application Note 162 for more information about Programming the EZ-USB chip.
  • Refer to section 9.10 or section 12.10 of the EZ-USB Technical Reference Manual.
  • Refer to Application Note 126 for more information about the Autovector on the EZ-USB chip.
  • Refer to Cypress USB FAQs for more information about the EZ-USB chips.

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Wednesday, August 3, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.