SPI Send (sizeof) too big
Hi, I am wondering if anyone has any experience with HAL SPI as when I try in 16-bit mode to make a single packet of data manually and use (sizeof xxx) it sends 2x data packets to the oscilloscope and when I specify the packet size as "1" I get the correct waveform? I show it below the code and attach the scope readings:-
uint16_t packet;
packet = 0b0111 1111 1000 0000; // send 8 MSB bits in 16 bit mode
HAL_SPI_Transmit (&hspi1, &packet, sizeof(packet), HAL_MAX_DELAY); // sends 2 packets?
HAL_SPI_Transmit (&hspi1, &packet, 1, HAL_MAX_DELAY); // sends correct 1 packet.
