Read from 0th index in SPI+DMA configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Read from 0th index in SPI+DMA configuration

541件の閲覧回数
madhavaishriram
Contributor II
Hi All, We are using the MKE15Z256xxx7 controller for transfer and receive the data through SPI with DMA. The slave device we are using for SPI+DMA is PMOD-SF3 and trying to read and write data and it is working fine. Below is the read and write operations for slave device PMOD-SF3 WriteBuff[10u] = {0x02, 0x00, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06}; ReadBuff[10u] = {0x03, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; First 4 bytes are command plus address in the read and write buffer. The write operation is fine and working using SPI+DMA, but after read operation ReadBuff is containing using it. ReadBuff = {0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06} The first 4 bytes are empty or contains some garbase values. So the issue is to remove those first 4 bytes from the read buffer and data is read from 0th location of buffer using SPI+DMA. So is there any way to read it from 0th index after writing command + address or is there any another solution regarding this issue. - Is there anything like we can write the command and address first and we can read or write data. - Or is it possible to write the command and address from separate buffer and data from another buffer and both buffers will work at same time using DMA+SPI. - Is there any way to solve this issue using different method in SPI+DMA. Please if anyone is having any idea, please let us know how to read manipulate data in read buffer.
0 件の賞賛
返信
1 返信

509件の閲覧回数
RaRo
NXP TechSupport
NXP TechSupport

Hello @madhavaishriram,

There is a similar question on this post: LPSPI + DMA Buffer start from 4th index - NXP Community, could you please check it?

Regards, Raul.