Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 36216

SPORT stream in simulation reading only LSB

$
0
0

Hello All,

 

I am trying to simulate ADC data coming in to a 21488 via a stream to SPORT1A from a file consisting of a series of 1000 or so theoretical ADC samples given in hex.

 

I got the sample rate correct by setting the relevant CLKDIV field and verified that the SPORT1 interrupt is being triggered at the right rate.  The first instruction in the SPORT1 ISR is as follows:

r2 = dm(RXSP1A);

(I'm writing all of my code in assembly language)

The first few lines of the stream file look like this:

0x000000

0xFFEF23

0xFFDE46

0xFFCD69

...

Also, I'm attaching a screen shot of my stream configuration.

 

The problem I'm having is that only the LSB of the quantity on each line is getting assigned to r2 in the instruction above!

 

I feel like there is a serial to parallel conversion not happening correctly somewhere...

 

Based on these symptoms can anyone give me an idea of what I might be missing?

 

I will be very grateful for some help in this matter!

 

Thanks,

-Brian


Viewing all articles
Browse latest Browse all 36216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>