• AVR Freaks

AnsweredHot!Harmony V3 SPI Config

Author
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
2019/12/15 16:09:32 (permalink)
0

Harmony V3 SPI Config

Just getting started with SPI on a PIC32MZ EF Starter Kit. Haven't had any luck with changing Harmony 2 sample apps to use  use SPI3 pins available on the starter kit. Harmony 3 spi loopback app works fine, but is configured for audio mode only and SPI config in Harmony 3 doesn't support non-audio currently, or slave mode for that matter, but I'll burn that bridge later. When I edit settings manually (auden=1 in spi3con2 resulting in spi3con=0x0C80) spi no longer works, as in no longer produces clocks. I know this is light on details, but I'm not finding any documentation that hints as to what else needs to change to disable audio modes. This is working for basic testing but I need non audio mode for the project.
#1
arpananand
Super Member
  • Total Posts : 453
  • Reward points : 0
  • Joined: 2009/11/18 04:35:42
  • Location: 0
  • Status: offline
Re: Harmony V3 SPI Config 2019/12/17 21:19:01 (permalink) ☼ Best Answerby ibbro 2019/12/19 07:18:13
5 (1)
i agree that in Harmony 3, SPI PLIB "32/16-Bit Communication select bits" options are bit confusing. it gives following four options inside the drop down menu with the mention of AUDEN = 1 and AUDEN = 0.
 
"(AUDEN = 1) 24-bit Data, 32-bit FIFO, 32-bit Channel/64-bit Frame / (AUDEN = 0)32-bit"
"(AUDEN = 1) 32-bit Data, 32-bit FIFO, 32-bit Channel/64-bit Frame / (AUDEN = 0)32-bit"
"(AUDEN = 1) 16-bit Data, 16-bit FIFO, 32-bit Channel/64-bit Frame / (AUDEN = 0)16-bit"
"(AUDEN = 1) 16-bit Data, 16-bit FIFO, 16-bit Channel/32-bit Frame / (AUDEN = 0)8-bit"
 
SPI plib supports only AUDEN = 0 mode, so first half of these options should be ignored and these should be read like below:
"(AUDEN = 0)32-bit"
"(AUDEN = 0)32-bit"
"(AUDEN = 0)16-bit"
"(AUDEN = 0)8-bit"
 
we are planning to make this option clearer.
 
if user wants to use SPI Plib in audio mode (also called I2S mode), they need to download audio repo (csp repo doesn't have I2S support) and use I2S driver.
 
 
#2
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
Re: Harmony V3 SPI Config 2019/12/19 07:17:41 (permalink)
0
Thanks, that is clear now and is working as expected.
-IB
#3
Jump to:
© 2020 APG vNext Commercial Version 4.5