This is my source code for the SPI configuration:static void SPI1_init(){ //GPIOs konfigurieren //PA4 Chip select //PA5 clk //PA6 MISO //PA7 MOSI uint8_t ch; while(SPI1->SR & SPI_SR_FTLVL); // Wait until no more data to transmit while...
If someone has the same problem, here is the solution:wrong: SPI1->DR = data; // write data Right:*(volatile uint8_t*)&SPI1->DR = data;Otherwise you have a 16 bit access to the DB register. Then the stm will automatically transfer 16 bits.
Short update:I think that the automatic data packing becomes active. As described in the manual on page 965.Does anyone know why this becomes active? I only transfer 8 bits. That's why it shouldn't actually be active.Or does anyone know how to disabl...