Hot!SPI Loop Back

Author
jcandle
Super Member
  • Total Posts : 207
  • Reward points : 0
  • Joined: 2011/09/19 22:01:53
  • Location: 0
  • Status: offline
2017/10/14 21:51:20 (permalink)
0

SPI Loop Back

I just spent a few hours (and probably days before this) over an issue that should not happen.  I'd love to hear it is operator error so i can stop running into it...
 
Harmony 2.04
 
SPI Loop Back example, PIC32MZ-EF starter kit.
Using it on an EFG100, so changed the processor, checked the config bits, went through the pin settings, made everything an input available except SDI2 (RG7), SCK2 (RG6), and SDO2 (RC4).
 
The program built as soon as I conditionally compiled out the BSP specific app code.
Ran, but rxdata was all zeros.
I had a scope on SCK and one on a joined SDO/SDI pair.
I assumed there must be a short on my board at SDI, so I soldered a 1K between the wires, and monitored both sides of the 1K... no short, stall all zeros.
 
Long and frustrating story short, ANSELG<7> was set.  I modified SYS_PORT_G_ANSEL and the demo works...
Of course I was using the demo because WINC1500 demo did not for several days...
I gut the traces to the module to back up to this test, so now I get to white wire those back.
 
Bottom line is that the Harmony 2.04 system port object pretty much ignores changes made in pin settings or pin diagram windows.  It also still likes to reset my clock and ICD settings...
 
 
post edited by MikeinAZ - 2017/10/16 09:45:13
#1

5 Replies Related Threads

    arpananand
    Super Member
    • Total Posts : 362
    • Reward points : 0
    • Joined: 2009/11/18 04:35:42
    • Location: 0
    • Status: offline
    Re: SPI Loop Back 2017/11/13 06:43:09 (permalink)
    3 (1)
    did you face this problem only when you changed from one processor to another or even when you were always working on one processor?
    #2
    jcandle
    Super Member
    • Total Posts : 207
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: SPI Loop Back 2017/11/13 07:49:56 (permalink)
    5 (2)
    different package (100 TQFP vs EF starter kit).
     
    If you use an existing MHC config and modify it, there are directives in the scripts that reset pins regardless of what changes were made in the editors.  The solution - even for a small edit from the starter kit - is to save the changes as a custom BSP and then use that BSP.
    #3
    RISC
    Super Member
    • Total Posts : 4593
    • Reward points : 0
    • Status: offline
    Re: SPI Loop Back 2017/11/13 09:02:37 (permalink)
    3 (1)
    Hi,
    Agreed, if you (try) to modify an existing BSP you must save it / export it under another name to keep the changes
    Regards
     
    #4
    arpananand
    Super Member
    • Total Posts : 362
    • Reward points : 0
    • Joined: 2009/11/18 04:35:42
    • Location: 0
    • Status: offline
    Re: SPI Loop Back 2017/11/13 10:49:13 (permalink)
    0
    yes, thats the thing. when you switch the device in the same Harmony project, you must save the changes made in pin manager and all and export it to the new device. otherwise it is not suppose to work as all the devices have different pin and other settings.
    #5
    jcandle
    Super Member
    • Total Posts : 207
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: SPI Loop Back 2017/11/13 21:47:52 (permalink)
    3 (1)
    RISC & arpanand, makes sense in hindsight, but was clear as mud when i was struggling with it.
    #6
    Jump to:
    © 2017 APG vNext Commercial Version 4.5