2025-11-27 2:20 AM - last edited on 2025-11-27 2:41 AM by Andrew Neil
Hi,
I want my slave device to be able to sniff packets destined for other slaves on the same bus. At the moment, communication management is based on HAL with interrupts, and I can see when the master sends requests to me because I enter the address match interrupt.
I would like to take a step back and see where a wrong address is discarded, before answering with a NACK.
I want my slave to be able to understand when the packets are intended for another slave with a specific address and from there monitor the communication to sniff the information.
Is that possible?
I can't find where an address that doesn't match mine is discarded.
Thank you
Solved! Go to Solution.
2025-11-27 7:26 AM
This is not possible in the I2C peripheral. You can answer on 1 or 2 slave addresses (plus general call), but not all. You don't get notified when an address doesn't match.
You could do it in software independent from the I2C peripheral but it would take quite a bit of expertise.
2025-11-27 2:44 AM
You would need a deep-dive into the I2C section of the Reference Manual for the chip to understand how the I2C peripheral works:
via: https://www.st.com/en/microcontrollers-microprocessors/stm32g030k8.html#documentation
2025-11-27 7:26 AM
This is not possible in the I2C peripheral. You can answer on 1 or 2 slave addresses (plus general call), but not all. You don't get notified when an address doesn't match.
You could do it in software independent from the I2C peripheral but it would take quite a bit of expertise.
2025-12-01 2:34 AM
Hello @mfcheckup
The STM32 I²C peripheral only triggers the ADDR interrupt if the address matches. There is no HAL callback or interrupt for non-matching addresses.