cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030K8T6 i2c slave: get received address before NACK?

mfcheckup
Visitor

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

1 REPLY 1
Andrew Neil
Super User

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

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.