Hello,
I have a problem when I use SPI in KL25Z to send data.
Configuration of SPI is:
The code used to send data:
uint16_t Test_VBA_Buffer;
uint8_t SM1_Send[3];
SM1_Send[0] = 0;
SM1_Send[1] = Test_VBA_Buffer>>2;
SM1_Send[2] = Test_VBA_Buffer<<6;
SM1_SendBlock(SM1_Data, SM1_Send, sizeof(SM1_Send));
while (!SM1_GetBlockSentStatus(SM1_Data)) {
SM1_Main(SM1_Data);
}
Here 'SM1_Send' is 24 bits.
The problem is as shown:
Sometimes a delay appears in the middle of CS and Clock. The length of delay also varies: normally 8 bits but sometimes 1 bit. With this delay, I can't get correct output as expected.
Does someone have the same problem or have a solution?
Thanks,
Xiaocong
Hello Xiaocong Fu:
Please refer to the response by colleague Marek Neuzil in your other thread:
I think his suggestion might be correct. Let us know if you still have problems.
Regards!
Jorge Gonzalez