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

Debugger "Port 1 Error" message

When trying to run a program under the latest version of the uVision2 debugger (v6.12), the simulator keeps halting with the error box "Port 1 Error - You have tried to modify a port pin which is configured as output!".

Although the message looks clear, I don't understand its meaning since the area of code where it happens doesn't have any Port 1 accesses! The error also doesn't occur when single-stepping, only when running at full speed.

It looks like a bug in the simulator. Can anyone else shed any light on it?

(Unfortunately my program is pretty big, and I haven't managed to replicate the problem with a small code fragment, so I can't (yet) post the offending code).

Parents
  • I think I've isolated the root of the problem. I'm using the PCA to generate a PWM waveform on one of the Port 1 outputs, so I normally have the corresponding P1 bit set to 1. However, at times I want to disable the PWM output temporarily so rather than mess with the PCA registers I use a quick and dirty method of setting the P1 bit to 0, forcing the output low. This works fine on the real microcontroller, but does seem to create a conflict within the debugger/simulator - hence the error message.









Reply
  • I think I've isolated the root of the problem. I'm using the PCA to generate a PWM waveform on one of the Port 1 outputs, so I normally have the corresponding P1 bit set to 1. However, at times I want to disable the PWM output temporarily so rather than mess with the PCA registers I use a quick and dirty method of setting the P1 bit to 0, forcing the output low. This works fine on the real microcontroller, but does seem to create a conflict within the debugger/simulator - hence the error message.









Children
No data