Not applicable
Nov 02, 2015
02:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 02, 2015
02:27 AM
Hi,
I am working on SPI 4100 module,My aim is to transfer a single byte over a SPI,So what should be the frame length and word length for this motto, & do i need to check & clear both flags,e.i 1) Receive Ending flag 2)Alternate receive ending flag,I want to transfer(read and write) byte by byte only.
Best Regards,
Irfan
I am working on SPI 4100 module,My aim is to transfer a single byte over a SPI,So what should be the frame length and word length for this motto, & do i need to check & clear both flags,e.i 1) Receive Ending flag 2)Alternate receive ending flag,I want to transfer(read and write) byte by byte only.
Best Regards,
Irfan
2 Replies
Nov 02, 2015
06:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 02, 2015
06:39 PM
Hello,
Since the frame length and the word length are the same (1-byte), you can configure both FLE and WLE bit fields in SCTR register to 7.
Or if you are using DAVE4 with XMC lib, you can define:
XMC_SPI_CH_SetWordLength(XMC_SPI0_CH0, 8);
XMC_SPI_CH_SetFrameLength(XMC_SPI0_CH0, 8);
For the detection of the received byte, only the Alternate Receive Interrupt (PSR.AIF), which indicates the reception of the first word in a frame, is needed. Receive interrupt (PSR.RIF), which indicates reception of subsequent words in a mult-word frame, is therefore not relevant.
Regards,
Min Wei
Since the frame length and the word length are the same (1-byte), you can configure both FLE and WLE bit fields in SCTR register to 7.
Or if you are using DAVE4 with XMC lib, you can define:
XMC_SPI_CH_SetWordLength(XMC_SPI0_CH0, 8);
XMC_SPI_CH_SetFrameLength(XMC_SPI0_CH0, 8);
For the detection of the received byte, only the Alternate Receive Interrupt (PSR.AIF), which indicates the reception of the first word in a frame, is needed. Receive interrupt (PSR.RIF), which indicates reception of subsequent words in a mult-word frame, is therefore not relevant.
Regards,
Min Wei
Not applicable
Nov 03, 2015
12:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 03, 2015
12:48 AM
Thanks for the Reply, To receive data I'm sending the Dummy Byte(0xFF) by this API only, but there is no data on MISO pin,
So my question is, Is it possible to send and receive data from SPI using the same API? if possible help me out.
Regards,
Irfan
So my question is, Is it possible to send and receive data from SPI using the same API? if possible help me out.
Regards,
Irfan