WINC1500 problem

I have a problem with WINC1500 (model is the same you mount on the Feather with same firmware) using as control signals:

core SC20100
SPI interface 3
CS PE0
INT PB6
RST PD6.

At the execution at the Enable command I have an invalid io exception.
Is there any limitation in using the PB6 that is assigned as the QSPI chip select? ( which however on this board I don’t use ).
I’m using the same example posted on the documentation site which works great for me with the Fez Feather.

Do you use interrupt pin Px6 anywhere on your board?

NO,
using PD6 as RST for this device,
is on a prototype board and I have not wired any other interface. Only WINC is connected on the SPI3 at this time and no other GPIO is used and configured.
The CHIP_EN of the WINC is also driven with a delay circuit to keep it low at power up for 3 seconds … then bring it to 3V3 with a 10K is enough to bring the device active or need a drive current ?
…is very very strange.

Can you run this quick test please? On a new project, create a GPIO input pin on PB6 and enable interrupt. You do not have to physically try it, just see if you get an exception.

Of course I am assuming you did not extend flash and you are not using QSPI in your design.

I use this :

            var _interruptPort = GpioController.GetDefault().OpenPin(SC20100.GpioPin.PB6); 
            _interruptPort.SetDriveMode(GpioPinDriveMode.InputPullUp);
            _interruptPort.ValueChangedEdge = GpioPinEdge.FallingEdge | GpioPinEdge.RisingEdge;

… with no exception.
However, I first tried the same board wiring SPI3 with an ENC28J60 and with a WIZ5500 using practically the same lines for the same functions.

… sorry I forgot,

  1. QSPI is not implemented on the board.
  2. there are no other IO settings on the PB6 or other GPIO before and after I try to set WINC1500

Can it be a 100K pullup resistor on the INT line (the PB6) at VCC before its definition as an INT line of the module ?
Is there a check on its logical state before its use ?
If so, the exception is thrown correctly

NOTHING TO DO.
Model ATWINC1500-MR210PB1952 there is no way to make it work !!!.
I have come to the conclusion that the problem is the firmware on this model because I took apart the WINC of a Fez Feather and mounted it on my board and it works great as other two Click 7 from Mikroe.
As long as it’s just a firmware problem … the strange thing is that the error appears whether the module is connected or not and I have tried 3 modules of this serie.
I’ll try to flash one with the updated FW and I’ll be able to tell you.
Does anyone have my same problems with the latest WINC1500 modules on the market?
These are modules that I ordered in November 2021 and they arrived in March of this year.

I think you have two things need to be corrected:

  • There is pin EN that I don’t see you mention about this. Make sure this pin is ON or your module.
  • All pin: Reset, Interrupt, CS => you only need open the pin and pass to wifi setting, user don’t config them.

As I see, Interrupt need falling edge, but you config Falling and Rising. Anyway, no config any of these pins, just Open(…) enough. Take a look below:

            var interrupt = GpioController.GetDefault().OpenPin(SPI_INT);
            var reset = GpioController.GetDefault().OpenPin(RESET);
            var cs = GpioController.GetDefault().OpenPin(SPI_CS);

            SpiNetworkCommunicationInterfaceSettings networkCommunicationInterfaceSettings = new SpiNetworkCommunicationInterfaceSettings();
            var settings = new GHIElectronics.TinyCLR.Devices.Spi.SpiConnectionSettings()
            {
                ChipSelectLine = cs,
                ClockFrequency = 2000000,
                Mode = GHIElectronics.TinyCLR.Devices.Spi.SpiMode.Mode0,
                ChipSelectType = GHIElectronics.TinyCLR.Devices.Spi.SpiChipSelectType.Gpio,
                ChipSelectHoldTime = TimeSpan.FromTicks(10),
                ChipSelectSetupTime = TimeSpan.FromTicks(10)
            };

            networkCommunicationInterfaceSettings.SpiApiName = SPI_API_NAME;
            networkCommunicationInterfaceSettings.GpioApiName = GPIO_API_NAME;
            networkCommunicationInterfaceSettings.SpiSettings = settings;
            networkCommunicationInterfaceSettings.InterruptPin = interrupt;
            networkCommunicationInterfaceSettings.InterruptEdge = GpioPinEdge.FallingEdge;
            networkCommunicationInterfaceSettings.InterruptDriveMode = GpioPinDriveMode.InputPullUp;
            networkCommunicationInterfaceSettings.ResetPin = reset;
            networkCommunicationInterfaceSettings.ResetActiveState = GpioPinValue.Low;

CHIP_EN is on a GPIO as in your wifi example… the problem is that I have 10 WINC modules purchased in March which are not working.
The program (the WiFi example of your site) and the self-built card works with :

  1. a WINC removed from your Fez Feather
  2. a WINC removed from a Mikroe Click 7
    … but not with 2 of the 10 ATWINC1500-MR210PB1952 just purchased.
    The error is generated with or without the module as if the bus were disconnected.
            var en = GpioController.GetDefault().OpenPin(SC20100.GpioPin.PC7);
            en.SetDriveMode(GpioPinDriveMode.Output);        en.Write(GHIElectronics.TinyCLR.Devices.Gpio.GpioPinValue.High);
            SpiNetworkCommunicationInterfaceSettings netInterfaceSettings = new SpiNetworkCommunicationInterfaceSettings();
            var cs = GpioController.GetDefault().OpenPin(SC20100.GpioPin.PE0);
            var settings = new SpiConnectionSettings()
            {
                ChipSelectLine = cs,
                ClockFrequency = 4000000,
                Mode = SpiMode.Mode0,
                ChipSelectType = SpiChipSelectType.Gpio,
                ChipSelectHoldTime = TimeSpan.FromTicks(10),
                ChipSelectSetupTime = TimeSpan.FromTicks(10)
            };

            netInterfaceSettings.SpiApiName = SC20100.SpiBus.Spi3; 

            netInterfaceSettings.GpioApiName = SC20100.GpioPin.Id;

            netInterfaceSettings.SpiSettings = settings;
            netInterfaceSettings.InterruptPin =  GpioController.GetDefault().OpenPin(SC20100.GpioPin.PB6); // HWPINS.ETH_INT_Pin;
            netInterfaceSettings.InterruptEdge = GpioPinEdge.FallingEdge;
            netInterfaceSettings.InterruptDriveMode = GpioPinDriveMode.InputPullUp;
            netInterfaceSettings.ResetPin = GpioController.GetDefault().OpenPin(SC20100.GpioPin.PD6); // HWPINS.ETH_RST_Pin;
            netInterfaceSettings.ResetActiveState = GpioPinValue.Low;
            var networkController = NetworkController.FromName(SC20100.NetworkController.ATWinc15x0);
            WiFiNetworkInterfaceSettings wifiSettings = new WiFiNetworkInterfaceSettings()
            {
                Ssid = "mynetworksid",
                Password = "mynetworkpass",
            };
            wifiSettings.Address = new IPAddress(new byte[] { 192, 168, 1, 122 });
            wifiSettings.SubnetMask = new IPAddress(new byte[] { 255, 255, 255, 0 });
            wifiSettings.GatewayAddress = new IPAddress(new byte[] { 192, 168, 1, 200 });
            wifiSettings.DnsAddresses = new IPAddress[] { new IPAddress(new byte[]{ 75, 75, 75, 75 }),
                                                          new IPAddress(new byte[] { 75, 75, 75, 76 }) };
            wifiSettings.MacAddress = new byte[] { 0x0C, 0x4, 0x0B, 0x10, 0x20, 0x00 };
            wifiSettings.DhcpEnable = true;
            wifiSettings.DynamicDnsEnable = true;
            networkController.SetInterfaceSettings(wifiSettings);
          networkController.SetCommunicationInterfaceSettings(netInterfaceSettings);
            networkController.SetAsDefaultController();
            networkController.NetworkAddressChanged += NetworkController_NetworkAddressChanged;
            networkController.NetworkLinkConnectedChanged += NetworkController_NetworkLinkConnectedChanged;
            networkController.Enable();

you may need to setup uart to:

  • Verfify the module still work
  • Firmware version. Officially, support is 19.5.4.xxx. Tested 19.6.xxx (first releases), work no issue known. But I think latest now is 19.7 or higher that we never tested.

Well… then let’s start connecting the serial pins to the TTL adapter to see if it responds and tells me what version it is.
From the item number I think it could be a 19.52 … then the discussion of the firmware update opens that will involve Harmony or other devilry.
It’s not that you have any reference to a magical exe that does its due without having to install a full development system.

Before switching to UART, could you follow this page and get version number only?

WiFi (ghielectronics.com)

Follow section " WINC1500 Utilities" of the page, and remember still initialize SPI first as mentioned in the page.

Just need version number to see if we can communicate to module over spi.

After

            networkController.SetInterfaceSettings(wifiSettings);
            networkController.SetCommunicationInterfaceSettings(netInterfaceSettings);
            networkController.SetAsDefaultController();

Insert this:

            //Get the version of the installed WiFi firmware:
            string fwVersion = Winc15x0Interface.GetFirmwareVersion();

and at GetFirmwareVersion throw a System.InvalidOperationException

that enough to say the module doesn’t response.

I think use Uart to see if you can check the fw version.

After an
download_all UART 1500 0 5

......
Call winc_programmer_uart.exe  -p \\.\COM5 -d winc1500 -i m2m_image_3A0.bin -if prog -e -w -r -pfw ..\programmer_firmware\release3A0\programmer_release_text.bin
WINC Programming Tool 2.0.0 [r719] (Aug 13 2021)
Copyright (C) Microchip Technology Inc. 2021

error(uart_read:61): incomplete read from UART
error(winc_bus_sync_cmd:483): failed to read serial bridge ID query response
error: failed to initialise programming firmware '..\programmer_firmware\release3A0\programmer_release_text.bin' on device
*************** Failed to download *****************

… so I have a very very module problem.

When I send the HEX sequence:
A501F200000C000C00612F52EF
I get the answer:

(0)NO CORTUS app
(0)(M2M)DriverInfo: None. Assuming 19.3.0
(0)Chip ID = 1503a0
(0)Flash ID = c21320c2, Size = 4 MBit
(10)EFUSE:MAC
(10)MAC_ADDR  = **<valid mac address masked for privacy>**
(10)Shared buff static: 0, 5, 5, 22, 9, 10
(20)NMI M2M SW  VERSION 19.5.2 SVNREV 14274
(30)NMI MIN DRV VERSION 19.3.0
(30)Firmware SVN URL branches/WIFIIOT-1660_19_5_2_RC7
(30)Built at Jan 26 201722:13:34
(40)ROM LIB VER_2
(40)__AES_HW_ENGINE__
(40)(M2M)LOAD SEC
(50)(TLS)TLS Session Size= 1884
(70)PSM_OFF

… so the module would respond to 115200 but has problems with the updater.

I understand that it is a 1952 but my problem is how do I update it?
Do I have to switch to some intermediate version to get to that required?

… it is the initialization sequence that prevents the update.
On the net I found this sequence :

  1. CHIP_EN and RST low
  2. wait 1ms
  3. CHIP_EN high
  4. wait 10ms
  5. RST high
  6. loop for ever
  7. at this point lunch download_all UART 1500 0 n where n is COM number.
    If anyone is interested I will let you know in the near future how it turned out

I remember when I use Uart, no need about those sequence, but good to know.

My module is 19.5.4 and exhibiting the same behavior - I cannot for the life of me figure out why this isn’t working.

Even with a similar startup process, I can get a UART response from the module but the SPI will not work.