EMC NOP Recomendation

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just designing a product for EMC testing ATM and came across this...

Quote:
"A bus access to a non-existent address returns the data #ff, provided there is a passive pullup on the bus. Nothing can be done about this. Hovever, un-programmed ROM also returns #FF and this can be changed. A good approach is to convert all unused #FF locations to the processor's one-byte NOP instruction. The last few locations in ROM can be programmed with a JMP RESET."

from "EMC for Product Designers" Tim Williams

Basically the idea is if the PC goes crazy it will hit the NOPs and reset the processor.

Is this worth implementing?
Is there an easy way to implement it in C?

odd.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I haven't thought about it deeply, but one suggestion is: do everything as usual and then edit your hex-file before uploading it to the controller... I would figure out how the nop-instruction looks like in hex and then replace every free flash-location with this value (I'm using ponyprogrammer for uploading, I think it's no problem editing the hex-file with it at the end).

til then, Sebastian...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

neruem wrote:
I haven't thought about it deeply, but one suggestion is: do everything as usual and then edit your hex-file before uploading it to the controller... I would figure out how the nop-instruction looks like in hex and then replace every free flash-location with this value (I'm using ponyprogrammer for uploading, I think it's no problem editing the hex-file with it at the end).

If you do this, I would recommend that you automate this with the SRecord utilities that are shipped with WinAVR.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the tip, I'm new to winavr!!!