Jun 01, 2016
12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2016
12:34 AM
Dear,
our target design has one SPI master in XMC4500 connected to two SPI slaves. The frame length of one slave is 16bit, the other is 24bit.
I think that DAVE generator cannot support different frame length for one SPI master.
I'd like to implement it by user coding in application level without DAVE generator.
If you have recommended method, please let me know.
Regards,
Kazunari Hayashi
TOMEN Electronics Corp.
our target design has one SPI master in XMC4500 connected to two SPI slaves. The frame length of one slave is 16bit, the other is 24bit.
I think that DAVE generator cannot support different frame length for one SPI master.
I'd like to implement it by user coding in application level without DAVE generator.
If you have recommended method, please let me know.
Regards,
Kazunari Hayashi
TOMEN Electronics Corp.
- Tags:
- IFX
2 Replies
Jun 01, 2016
10:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2016
10:16 PM
Hello Kazunari,
Since both 16-bit and 24-bit frames are multiples of an 8-bit word, one way is to:
- configure frame length in DAVE APP to infinite frame, i.e. 64; word length remains at 8
- disable frame end mode (this means that slave select is automatically deasserted when there is no more data received in the buffer for transmission)
- send 16-bit data to slave_0 by defining data count as 2
- switch slave select signal to slave_1 accordingly
- send 24-bit data to slave_1 by defining data count as 3
Another way is to insert a code to change the frame length, for example using XMC Lib (add #include "xmc_usic.h"):
Of course if you would like to do away with DAVE generated code, this is also possible.
Regards,
Min Wei
Since both 16-bit and 24-bit frames are multiples of an 8-bit word, one way is to:
- configure frame length in DAVE APP to infinite frame, i.e. 64; word length remains at 8
- disable frame end mode (this means that slave select is automatically deasserted when there is no more data received in the buffer for transmission)
- send 16-bit data to slave_0 by defining data count as 2
- switch slave select signal to slave_1 accordingly
- send 24-bit data to slave_1 by defining data count as 3
Another way is to insert a code to change the frame length, for example using XMC Lib (add #include "xmc_usic.h"):
XMC_USIC_CH_SetFrameLength(SPI_MASTER_0.channel, 24);
Of course if you would like to do away with DAVE generated code, this is also possible.
Regards,
Min Wei
Jun 03, 2016
11:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 03, 2016
11:09 PM
Min-san
the answer has been very helpful for me.
Please close this thread.
Thanks.
the answer has been very helpful for me.
Please close this thread.
Thanks.