2023-02-28 06:01 PM
Hello everyone,
I have a application on STM32L5xx, I configuration I2C1 to slave mode,
when slave receive first unwanted command code, I want to response NACK to master. I judge the command code in AL_SMBUS_SlaveRxCpltCallback call back function, and set NACK bit at CR2 register but unfortunately cannot success.
2023-03-02 03:45 AM
Hi @PYF.1 ,
to get the ACK control, you need to configure slave byte control mode. The settings are SBC=1, RELOAD=1, NBYTES=1. NOSTRETCH=0. The slave byte control is a whole chapter in the reference manual.
BR,
J
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-03-02 05:43 PM
Hi JUUDO,
Thanks for your answer, here I ignore the RELOAD=1, now I could control the ACK at eacch byte
determine response ACK/NACK to master
BR
PYF