CF SPI Issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,986件の閲覧回数
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 解決策
963件の閲覧回数
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 返答(返信)
963件の閲覧回数
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 件の賞賛
返信
964件の閲覧回数
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 件の賞賛
返信