Hot!solved WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100

Author
jcandle
Super Member
  • Total Posts : 326
  • Reward points : 0
  • Joined: 2011/09/19 22:01:53
  • Location: 0
  • Status: offline
2017/10/07 14:30:49 (permalink)
0

solved WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100

I wired my board to use a GPIO for the interrupt, planning on a CN.  The config wants an interrupt instance so I have white wired INT2, which close by.
 
...edit - reverted so I don't have to white wire all boards.  see below for Harmony 2.04 bug where it needs the port suffixed on the interrupt source... INT_SOURCE_CHANGE_NOTICE_G but it uses //INT_SOURCE_CHANGE_NOTICE
 
Can I edit the settings below to use G2:
#define SYS_PORT_G_CNPU         0x2000
//INT_SOURCE_CHANGE_NOTICE_G
 
Is SS for the SPI supposed to be controlled by the module (SS2(out)) or just be a GPIO out, high?
 
... edit.  It wants to control it as a GPIO.    RED BOLD below are edited...
 
existing WINC1500:
/*** Wi-Fi Driver Configuration ***/
#define WINC1500_INT_SOURCE INT_SOURCE_CHANGE_NOTICE_G  // change to INT_SOURCE_CHANGE_NOTICE_G?
#define WINC1500_INT_VECTOR INT_VECTOR_CN               // need to find the vector
#define WDRV_SPI_INDEX 0   // quadruple check that Harmony is using the right SPI in instance 0
#define WDRV_SPI_INSTANCE sysObj.spiObjectIdx0
#define WDRV_BOARD_TYPE WDRV_BD_TYPE_CUSTOM
#define WDRV_EXT_RTOS_TASK_SIZE 2048u
#define WDRV_EXT_RTOS_TASK_PRIORITY 2u
// I/O mappings for general control pins, including CHIP_EN, IRQN, RESET_N and SPI_SSN.
#define WDRV_CHIP_EN_PORT_CHANNEL PORT_CHANNEL_G
#define WDRV_CHIP_EN_BIT_POS 12
#define WDRV_IRQN_PORT_CHANNEL PORT_CHANNEL_G   //  change to G14 if I can avoid the white wire
#define WDRV_IRQN_BIT_POS 14                                       // and use the CN IRQ
#define WDRV_RESET_N_PORT_CHANNEL PORT_CHANNEL_F
#define WDRV_RESET_N_BIT_POS 8
#define WDRV_SPI_SSN_PORT_CHANNEL PORT_CHANNEL_C
#define WDRV_SPI_SSN_BIT_POS 2
post edited by jcandle - 2017/10/16 17:09:28
#1

12 Replies Related Threads

    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/07 23:11:47 (permalink)
    0
    After yet again completely messing up the project trying to convert EF starter config to my board, I got to here:
    USBHS CDC still included since i need it later.
    USARTs 1&2 defined and reserved for later, as is Comparator 1 and CVREF1.
    USART4 is defined for WINC1500 debug if needed.  Not used in app
    USART5 is the console via an on board FTDI.  I need a stable COM port and not the application CDC.  Console works.
    Had to rip out the BSP and define my pins.
    Had to spackle over a couple broken includes 
     
    I see that I can use CN, but using INT2 for now.
     
    The bad news is I guess I need to step back to just testing SPI?
    Any hints on where to debug and step through?  
    To weed out the obvious HW, SPI_CFG is high (via a GPIO that starts high.)
    WAKE is high (again, GPIO)
    EN boots low and the module has taken it high
    RESET starts low and ... is still low...
     
     
     

    ========================
    WINC1500 AP Scan Example
    ========================
    WINC1500: Initializing...


    >[spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 10 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 9 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 8 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 7 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 6 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 5 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 4 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 3 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 2 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 1 e824
    [nm_spi_init][816][nmi spi]: Failed internal read protocol with CRC on, retyring with CRC off...
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 10 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 9 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 8 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 7 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 6 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 5 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 4 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 3 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 2 e824
    [spi_data_read][394][nmi spi]: Failed data response read...(00)
    [spi_read_reg][663][nmi spi]: Failed data read...
    [spi_read_reg][678]Reset and retry 1 e824
    [nm_spi_init][819][nmi spi]: Failed internal read protocol...
    Found where I could use CN... but using INT2.

    Attached Image(s)

    #2
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/07 23:21:48 (permalink)
    0
    TRISF<8> == 0
    LATF<8> == 1
    PORTF<8> == 0
    scope says low.
     
    time to look for the short... (Wednesday when I get back), but a bare board has a short, so it is PCB.  It is not shorted in the Gerbers, so "thank you, Seeed..."
    post edited by jcandle - 2017/10/07 23:24:20
    #3
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/08 00:18:24 (permalink)
    0
    Couldn't let it go.  GND via near RESETw2 was shorted.  Cut & wire.  Now, PORT, LAT, & scope agree, RESETw2 goes high.  Chips are much cooler as well.
     
    Either I need to let SPI control SS* (but why does WINC1500 driver ask for it then?) or I need to put the scope on SPI...
     
    #4
    DarioG
    Allmächtig.
    • Total Posts : 53410
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: online
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/08 02:12:51 (permalink)
    0
    I only had one single problem out of some 10 parts with Seeed: and it was Eagle which, without any thought (nor warning) let me cross VCC and GND (in hand routing)... and so it went printed!

    earthquake, but in wrong place.

    #5
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/08 05:09:18 (permalink)
    4 (1)
    to be fair, the via was ill placed.  
     
    It also cost me less time that the quicksand of system definition random numbers ...
    The next time I reinstall Harmony I will rename the folder 'discord'.
     
    Are there WinC1500 and USB device stacks for the MZ-EF outside Harmony?  I am sure it is mostly me, but this has been a painful learning curve.
    #6
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/11 18:10:28 (permalink)
    3 (1)
    Still no luck on this, but there were other PCB issues, so I'll make the cumulative white wire to a second board before pressing on here.  I have also ordered the breakout for the EF starter kit and have a WINC1500 xplained, but once I have SPI and a good clock, this demo should just work, right?
    #7
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/15 13:17:55 (permalink)
    0
    With CN Interrupt selected Harmony has a wrong system_config.h entry:
     
    #define WINC1500_INT_SOURCE INT_SOURCE_CHANGE_NOTICE
    #define WINC1500_INT_VECTOR INT_VECTOR_CN
     
    The compiler requires "INT_SOURCE_CHANGE_NOTICE_G"
     
    #8
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2017/10/16 17:03:18 (permalink)
    0
    Harmony would be so much easier to use if I could stick a pin in settings...  WINC1500 driver was trying to use SPI1 despite my setting it to 2...
     
    Now to integrate it into my other app...
    #9
    ANKELA
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2016/07/13 11:29:48
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2018/02/12 14:53:55 (permalink)
    0
    Hi,
     
    How were you able to update the WINC1500 firmware through Harmony? I'm guessing this is how you did it, but I'm having problems and there aren't many threads on here addressing this issue. 
     
    post edited by ANKELA - 2018/02/12 14:55:18
    #10
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2018/02/12 22:11:44 (permalink)
    0
    No, I ordered modules with current FW, so I have not needed to.
    #11
    ANKELA
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2016/07/13 11:29:48
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2018/02/13 07:26:45 (permalink)
    0
    My modules came with FW that was built in 2015, I wish I had known that was an option. 
    Thanks for the reply, please let me know if you come across anything. 
     
    -Andy
    #12
    jcandle
    Super Member
    • Total Posts : 326
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: WINC1500 questions (IRQ source and Slave select implementation) PIC32MZ2048EFG100 2018/02/14 05:03:18 (permalink)
    0
    ANKELA,
     
    https://community.atmel.com/forum/how-can-i-update-firmware-winc1500-without-edbg#comment-2394456 has a broken link in one of the answers, but if it sounds like a solution, the file can be found somewhere in downloads on Microchip.com or you can put in a ticket.
     
    I think they should have shadowed the old Atmel site longer, just to avoid a lot of this...
    #13
    Jump to:
    © 2018 APG vNext Trial Version 4.5