cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable I2C reserved addresses in promiscuous slave mode

Posted on March 17, 2016 at 23:09

In the newer STM32 models, the I2C module allows to respond to multiple addresses in slave mode, through using a mask for own-address in the I2Cx_OAR2 register. However, if this is used, reserved addresses 0000xxx and 1111xxx are excluded. I would like to use the whole address space, including the ''reserved addresses'. The RM appears to hint that this might be possible. For example, the RM for STM32L4x6, RM0351 rev.2 in the ''I2C slave mode'' chapter on page 1113 has this to say:

''These reserved addresses can be acknowledged if they are enabled by the specific

enable bit, if they are programmed in the I2C_OAR1 or I2C_OAR2 register with

OA2MSK=0.''

What is that ''specific enable bit'' this sentence talks about?

Thanks,

Jan Waclawek

2 REPLIES 2
clark2
Associate II
Posted on March 20, 2016 at 15:33

I think what they are trying to say is that you can acknowledge one of the reserved addresses by loading it in either OAR1 or OAR2 and enabling the respective OARxEN bit (OA1EN or OA2EN).  But, in typical STM fasion, the language leaves a lot to the reader's imagination.

I don't see how you can acknowledge the entire range of addresses, as you desire, given these constraints.  It seems you can acknowledge one of them with OAR1 and the rest of the range (excluding the other reserved) with OAR2 with masking...

Posted on March 21, 2016 at 23:26

> I think what they are trying to say is that you can acknowledge one of the reserved addresses by loading it in either OAR1 or OAR2 and enabling the respective OARxEN bit (OA1EN or OA2EN).

I dotes sound plausible, but believe me, I am as good as you are in guesswork 🙂 I would like to hear something more definitive.

> But, in typical STM fasion, the language leaves a lot to the reader's imagination.

I wish I could put it down in such a nice diplomatic manner.

> I don't see how you can acknowledge the entire range of addresses, as you desire, given these constraints.  It seems you can acknowledge one of them with OAR1 and the rest of the range (excluding the other reserved) with OAR2 with masking...

Yes, it works in this way indeed. However, the ''excluded addresses'' constraint is so ridiculous that I was hoping in a sanity correction in the form of the existence of a dedicated ''specific enable bit''.

Thanks, Clark.

JW