CF SPI Issue

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

CF SPI Issue

跳至解决方案
2,514 次查看
glenn_s
Contributor I

I am using a CF52QE128, I have a SPI slave interface, I am receiving charactyers in the input  successfully and trying to send 8 bytes of a data structure out. I am seeing the same bytes repeating on the SPI MISO , The Bean is set for TX Buffer size 1 and the RX Buffer size is set for RX Buffer size = 1;  I am calling a send char and receive char task.

 

When I step through the code I see that the data is coming out in the SS1 bean as expected. Is there something I am missing; I originally  tried to set up the SPI SS bean with an 8 byte message and set the bean to TXBuffer size 8, this is where I first saw the problem, the SPI port seems to be feeding out additinal bytes ( or looping) , it is not sending out the empty char and instead repeating some values.

 

The TX and RX share the interrupt signal I am not running the port fast although we swap from 512KHz to 2.048MHz depending on the byte sequence. I tried to disable other interrupts but this is happening all the time, some bytes dont get repeated by most do.

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,491 次查看
glenn_s
Contributor I

Thanks for insight, yes I found an issue in my application code, the Spi interrupt, was being interrupted and repeating outputs (slave mode) as the Buffer would be empty. Had another bug as well related to multiple interrupt sources within my isr which I resolved.

 

Glenn

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,491 次查看
ProcessorExpert
Senior Contributor III

Hello,
 
It seems that it is rather application issue and it is not related to Processor Expert. However I think it could help add some delay time between sending of outgoing data to a slave device.
 
best regards
Vojtech Filip
Processor Expert Support Team

0 项奖励
回复
1,492 次查看
glenn_s
Contributor I

Thanks for insight, yes I found an issue in my application code, the Spi interrupt, was being interrupted and repeating outputs (slave mode) as the Buffer would be empty. Had another bug as well related to multiple interrupt sources within my isr which I resolved.

 

Glenn

0 项奖励
回复