CF SPI Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CF SPI Issue

Jump to solution
1,416 Views
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.

Labels (1)
0 Kudos
1 Solution
393 Views
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

View solution in original post

0 Kudos
2 Replies
393 Views
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 Kudos
394 Views
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 Kudos