what to do for Error on operand read exception handler in mcf52233?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

what to do for Error on operand read exception handler in mcf52233?

1,084 Views
shubhangizarkar
Contributor I

hello,

  I am using mcf52233 micro controller  in this i implement the multi master but when i start it my processor goes in exception handler for some times in case of "Error on operand read "

so please help me how to remove this? why did it go in exception handler?


Labels (1)
0 Kudos
6 Replies

731 Views
shubhangizarkar
Contributor I

I am using MCF52233 processor for serial to ethernet communication over MODBUS. I have implement the software accordingly and it is working for one serial and one TCP port .After this I did modifications in software in such a way that the software should work for multiple clients for MODBUS TCP running on PC and server running on my hardware. I have referred to freescale_web server.c file in order to implement the same. But I am facing following problems in the same. 1: The communication between my hardware(server on my hardware) and MODBUS client running on my PC(MODBUS TCP software like lookout) is going out if I try to connect multiple PCs at the same time. In such a cases the software shows an exception error because of "Invalid operand". 2: Facing win sock error 10038 . When I face this error my hardware communicates with only one client running on PC.

0 Kudos

731 Views
TomE
Specialist II

> why did it go in exception handler?

You have a bug in your code. You need to debug it to find out what is wrong. There are so many different ways to make a mistake that causes this problem that there's no "single cause" that I could mention.

This requires a set of skills, experience and knowledge. First you have to understand how the CPU works so you can identify what is going wrong. So read through the CPU chapter in the manual a few times. Practice setting breakpoints in the debugger and single-stepping through your code. Examine the stack (the most likely cause of your problem) and understand the subroutine linkage.

Type "debug exception" into the Search Box at the top of this page and follow some of the links, specifically this one:

This post:

Re: Cause of Access Error Exception with ColdFire 52230

Links to this article:

DMA problem

> the software shows an exception error because of "Invalid operand".

What software is reporting that? Where is it reporting it, to a debug pod or on a serial port or what? Read the "Processor Exception" chapter in the Reference Manual and find out which machine exception that report is being generated by. Does the error report say what operand of which instruction?

> Facing win sock error 10038

That sounds like an error on the PC, and doesn't help at all.

Tom

0 Kudos

731 Views
shubhangizarkar
Contributor I

Thanks for your reply sir,

If I give you .lst file for my project can you simply

point me to the location or 'C' statement at which this invalid opcode

error is mentioned.

Regards

Shubhangi

0 Kudos

731 Views
TomE
Specialist II

> If I give you  .lst file for  my project can you simply

> point me to the location or 'C' statement at which

> this invalid opcode error is mentioned.

No. Simply No. The whole system is more complicated than just the ".lst" file.

You're going to have to learn a lot and understand the hardware, software and the problem, or you're going to have to find someone there to help you with this.

There's another way to debug these problems that should be obvious.

Go back to the code that WORKED, and the modify it a bit at a time until it stops working. The last thing you did will be the thing that is wrong.

Tom

0 Kudos

731 Views
TomE
Specialist II

More details needed.

0 Kudos

731 Views
shubhangizarkar
Contributor I

I am using MCF52233 processor for serial to ethernet communication over MODBUS. I have implement the software accordingly and it is working for one serial and one TCP port .After this I did modifications in software in such a way that the software should work for multiple clients for MODBUS TCP running on PC and server running on my hardware. I have referred to freescale_web server.c file in order to implement the same. But I am facing following problems in the same. 1: The communication between my hardware(server on my hardware) and MODBUS client running on my PC(MODBUS TCP software like lookout) is going out if I try to connect multiple PCs at the same time. In such a cases the software shows an exception error because of "Invalid operand". 2: Facing win sock error 10038 . When I face this error my hardware communicates with only one client running on PC.

0 Kudos