Open
Description
Description of defect
When running a code like this, only the first write happens on the affected platform. Neither second write nor STOP condition happens.
bus.write(addr, reg, sizeof(reg), true);
bus.write(data[0]);
bus.stop();
On NUCLEO_F103RB writes happen as expected. I'm attaching analyzer screenshots for both.
Target(s) affected by this defect ?
NUCLEO_L073RZ, verified with logic analyzer
Probably NUCLEO_L432KC as well: my firmware has the same issues on it.
Toolchain(s) (name and version) displaying this defect ?
GCC_ARM
arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release)
What version of Mbed-os are you using (tag or sha) ?
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
$ mbed-tools --version
7.55.0
How is this defect reproduced ?
Compile and run this program.
#include "mbed.h"
I2C bus(PB_9, PB_8);
int main()
{
int addr = 0x77 << 1;
char reg[1] = { 0xE0 };
char data[1] = { 0xB6 };
printf("Sending reset\n");
bus.write(addr, reg, sizeof(reg), true);
bus.write(data[0]);
bus.stop();
printf("Done\n");
return 0;
}