How to respond NACK to Master
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-28 6: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.
- Labels:
-
I2C
-
STM32L5 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-02 3: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-02 5: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
