-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Description of defect
changing SPI._spi.format(16, 0); does not work as intended.
Transmitted bytes are prepended by a zero byte.
This problem is introduced with mbed-os-6.15.0:
with mbed-os-6.14.0, the output is correct:
Target(s) affected by this defect ?
tested with STM32F407
but Problem is in targets/TARGET_STM/stm_spi_api.c and affects all STM32
Toolchain(s) (name and version) displaying this defect ?
gcc10
What version of Mbed-os are you using (tag or sha) ?
mbed-os-6.15.0
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-tools
How is this defect reproduced ?
#include "mbed.h"
DigitalOut led(LED1);
DigitalOut cs(PB_9, 1);
SPI spiDisplay(PB_5, NC, PB_3);
int main()
{
printf("Hello, Mbed!\n");
const char data[] = { 1, 2, 3, 4, 5, 6 };
spiDisplay.frequency(1e6);
spiDisplay.format(16, 0);
cs = 0;
spiDisplay.write(data, 3, nullptr, 0);
cs = 1;
while(1) {
ThisThread::sleep_for(1s);
led = !led;
}
return 0;
}