KDS Problem OnTxChar interrupt SPI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

KDS Problem OnTxChar interrupt SPI

1,261 次查看
michaeltoaldo
Contributor I

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

0 项奖励
回复
0 回复数