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
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