2025-08-25 10:22 AM
Hi,
I'm using the STM32H753-NUCLEO Board for some SW development, and I'm having some issues with the SPI Handling.
I'm attempting to transmit a single 16-bit data packet, however on the scope I'm transmitting two 16-bit data packets. When I change my data packet type to 8 bits, I'm transmitting 4 8-bit data packets.
I've scoured the RM0433 manual but cannot find the register which tells the peripheral to only transmit a single data packet.
Could someone point me to the correct register and what it should be set to to achieve this please?
2025-08-25 11:04 AM
Use byte or half-word writes to DR, otherwise it does data packing.
// half-word write
*(volatile uint16_t*)&SPIx->TXDR = .;
// byte write
*(volatile uint8_t*)&SPIx->TXDR = .;