USART in MPCM – errors

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

Hi, I have a question regarding USART in MPC mode. I need to address somehow every device on the bus, but if I set them in MPC mode they will respond only to their particular addresses. So I want to make intentional bus error (for example PE error), so I think all processors will report an interrupt with PE error flag set. But from documentation I'm not sure if unaddressed processor in MPCM will respond to any bus errors, or they will just wait until they receive a valid address?
Or maybe there is a better solution of my problem?

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

you can have as many addresses on a node as you like. MCPM mode does not do the address decoding, all it does is ignore any frames that do not have the "address bit" set. When a frame with an address bit set is received, the software must then determine if it is an address that the node is interested in, if so, it clears the MCPM bit, so any additional frames can be received. Thus you can have a direct node address, and any number of group and broadcast addresses.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

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

Thanks glitch. I misunderstood the documentation and though that microcontroller compares frame address with UDR register and only receives the following frames when compare matches.
But if it works as you said then everything is fine.

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

UDR is the data register. If you write to it, data will be transmitted out. You read from it when data has been received. There is no way to write an address to it for comparison against incoming addresses.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.