I run into the problem of sending 10 Bytes of data, but TDR size is 32Bit. I tried several possibilities, as found in the NXP community:
// for loop: //for ( index = 0; index < sequence_length; ++index) {
// for loop: //LPSPI1->TDR = &txbuffer[index]; /* Transmit data */
// for loop: //}
// cast to 32Bit words
// LPSPI1->TDR = ((uint32_t)txbuffer[index] << 24)
// |((uint32_t)txbuffer[index+1] << 16)
// |((uint32_t)txbuffer[index+2] << /* Transmit data */
// |((uint32_t)txbuffer[index+3] ) ;
// LPSPI1->TDR = ((uint32_t)txbuffer[index+4] << 24)
// |((uint32_t)txbuffer[index+5] << 16)
// |((uint32_t)txbuffer[index+6] << /* Transmit data */
// |((uint32_t)txbuffer[index+7] ) ;
// LPSPI1->TDR = ((uint32_t)txbuffer[index+8] << 24)
// |((uint32_t)txbuffer[index+9] << 16);
Nothing is working, also receiving more than 32 Bits is not working!
How should the sending and receiving of data greater than 32Bit word file be implemented?
and How should the framesize be adjusted? (I changed it to 80bits)