DSPI Data Word aLignment MOD54415
Posted: Fri May 16, 2014 7:21 am
Hi all,
I'm trying to address an AD7490 A2D converter with a MOD54415 using DSPI. I noticed in the setup instructions in dspi.h, it says "Transfers > 8 bits must be word aligned". But there's no other explanation of how to do this, because the DSPI driver is demanding bytes, even if the setup says I'm transferring 16 bits.
I have a logic analyzer attached to the board, and it shows that the data I'm sending is correct, and the returning data is also correct. However, when I output the data to MTTY, it's completely wrong. I've attached a screenshot of MTTY output (left side of pic) and the snippet of code that generates the output. My DSPI setup is as follows:
All my resulting values should be zero because my ADC inputs are pulled to ground. The upper nibble should reflect the ADC channel being converted and the lower 12 bits, the conversion value. So I should be seeing this:
0x0000
0x1000
0x2000
0x3000
...
0xF000
Not sure where I'm going wrong, can someone point me in the right direction?
I'm trying to address an AD7490 A2D converter with a MOD54415 using DSPI. I noticed in the setup instructions in dspi.h, it says "Transfers > 8 bits must be word aligned". But there's no other explanation of how to do this, because the DSPI driver is demanding bytes, even if the setup says I'm transferring 16 bits.
I have a logic analyzer attached to the board, and it shows that the data I'm sending is correct, and the returning data is also correct. However, when I output the data to MTTY, it's completely wrong. I've attached a screenshot of MTTY output (left side of pic) and the snippet of code that generates the output. My DSPI setup is as follows:
Code: Select all
DSPIInit(3, 1000000, 16, 0xF0, 0x0F, 0x01, 0x00, TRUE, 0, 0);
0x0000
0x1000
0x2000
0x3000
...
0xF000
Not sure where I'm going wrong, can someone point me in the right direction?