Hi Guys,
I'm trying to communicate via SPI with a stepper motor module.In my project I using FRDM MKE02Z, KDS and PE Syncro Master component. So, the issue I found is related with the interrupt OnTxChar, it seems that occurs before complete a char transmit.
Between the commands i need to toggle the CS and this is performed manually (cause I using CPOL = 1 and CPHA =1 and this mode does not allow automatic toggle). But after some problems i plugged a logic analyzer to verify and saw that interrupt "OnTxChar" is triggered before the char is totally finalized.
Image attached shows 2 commands, i toggle one auxiliar pin at "OnTxChar" to verify what time this occurs (channel 6).
void SPI_SM_OnTxChar(void)
{
/* Write your code here ... */
CS_SPI_SetVal();
CS_SPI_ClrVal();
}
Is there a way, with interrupts or pooling mode, to trigger the final of char transmit?
Thank in advance guys