Call to arms | Teensy + WiFi = true

Do you really need that many ports as seen on the last picture?
Wlan is just something like a tool.
Pico does only need one port as far as I know!
If this is meant for general use, then using only a minimum of ports would be better than top speed!
Sorry, Christof
 
Do you really need that many ports as seen on the last picture?
Wlan is just something like a tool.
Pico does only need one port as far as I know!
If this is meant for general use, then using only a minimum of ports would be better than top speed!
Sorry, Christof
Not sure what you mean by "ports"? Do mean pins? As far as top speed usage, that depends on the application and is subjective. The pico is using one SPI port and the Teensy 4.1 is using one SDIO port out of two;)
 
Meant port pins, but it is 4 of them, while there seem to be 8 port pins blocked in the picture above.
Of course this is my very personal opinion, and this is not at all my project. I only chimed in, because I have been one of those, who voted for WLAN, but this is going into a wrong direction for me. More free port pins are more valuable than the additional speed.


1774079263326.png
 
Meant port pins, but it is 4 of them, while there seem to be 8 port pins blocked in the picture above.
Of course this is my very personal opinion, and this is not at all my project. I only chimed in, because I have been one of those, who voted for WLAN, but this is going into a wrong direction for me. More free port pins are more valuable than the additional speed.


View attachment 39039
SDIO has 6 pins - 4 data line, a clock line and a command line.
Two additional GPIOs are needed to control the sleep state and an interrupt trigger.

IIRC, the murata chip variant that was used for this project does not support SPI.
Those that do from the w43434 series are discontinued.
This is based on closed conversations we had back in 2024/2025
 
Last edited:
@shawn - I have been playing with QNEthernet and T4_WIFI_CYW4343W. Started off with an initial setup in "driver_select.h":
Code:
// SPDX-FileCopyrightText: (c) 2024-2025 Shawn Silverman <shawn@pobox.com>
// SPDX-License-Identifier: AGPL-3.0-or-later

// driver_select.h chooses a driver header to include.
// This file is part of the QNEthernet library.

#pragma once

#include "qnethernet_opts.h"

// --------------------------------------------------------------------------
//  External Driver
// --------------------------------------------------------------------------

// First check for the existence of an external driver
// https://forum.pjrc.com/index.php?threads/new-lwip-based-ethernet-library-for-teensy-4-1.68066/post-345539
#if defined(__has_include)
// https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
#if __has_include(<qnethernet_external_driver.h>)
#include "qnethernet/drivers/qnethernet_external_driver.h"
#define QNETHERNET_INTERNAL_DRIVER_EXTERNAL
#endif  // __has_include(<qnethernet_external_driver.h>)
#endif  // defined(__has_include)

// --------------------------------------------------------------------------
//  No External Driver
// --------------------------------------------------------------------------

// Don't include anything else if an external driver has been included
#ifndef QNETHERNET_INTERNAL_DRIVER_EXTERNAL

#if defined(QNETHERNET_DRIVER_W5500)
#include "qnethernet/drivers/driver_w5500.h"
#define QNETHERNET_INTERNAL_DRIVER_W5500
#endif
#if ARDUINO_TEENSY41_CYW4343W 
#include "qnethernet/drivers/driver_CYW4343W.h"
#define QNETHERNET_INTERNAL_DRIVER_CYW4343W
#elif defined(ARDUINO_TEENSY41)
#include "qnethernet/drivers/driver_teensy41.h"
#define QNETHERNET_INTERNAL_DRIVER_TEENSY41
#else
#include "qnethernet/drivers/driver_unsupported.h"
#define QNETHERNET_INTERNAL_DRIVER_UNSUPPORTED
#endif  // Driver selection

#endif  // QNETHERNET_INTERNAL_DRIVER_EXTERNAL

Then added this to the beginning of "qnethernet_opts.h":
Code:
// Disables T41 native ethernet IF and enables T41 and CYW4343W IF.
#ifndef ARDUINO_TEENSY41_CYW4343W
#define ARDUINO_TEENSY41_CYW4343W 1
#endif
This prevents any conflict with "ARDUINO_TEENSY41" and makes the CYW4343W driver version unique. Set to 0 for native ethernet an set to 1 for CYW4343W usage. I tested both.

I tried going the external driver route but that failed for me.
I then tracked down the initialization sequence and started setting up the QNEthernet driver, "driver_CYW4343W.cpp" and "driver_CYW4343W.h". For right now I want to keep the T4_WIFI_CYW4343W library separate from the QNEthernet library until it is trimmed down to the bare minimum needed.
There is one more layer that has to be added to use the CYW4343W and that is joining the network which also sets up the link status. This uses a poll function in the events class to monitor the state of the link and can be checked any time using "link_check()". I have added evt.pollEvents() to the QNEthernet "driver_poll()" function.

The initialization output:
Code:
Starting...

[Start]
Starting Ethernet with DHCP...

driver_has_hardware

===========================
CYW4343W Card::begin: SDIO2
===========================
Attaching OOB interrupt to pin 34
Enabled CYW4343W bus high speed interface
BUS_IORDY_REG (Ready indication) returned OK
SDHC bus set to 4-bit, speed set to 33MHz
*************
CardID: 43430
*************
Set SRAM_IOCTRL_REG validated
Set SRAM_IOCTRL_REG second validation
Set SRAM_RESETCTRL_REG validated
Uploading firmware data
Uploaded firmware, 419798 of 419798 bytes
Uploading NVRAM data
Uploaded NVRAM, 680 of 680 bytes
Set BAK_CHIP_CLOCK_CSR_REG validated
Set BUS_IORDY_REG validated
Configuring WL_IRQ OOB
==============================
End W4343WCard::begin: SDIO2
==============================
EthernetClass::start()
enet_init()
driver_init
Uploading CLM, size: 7222
CLM uploaded 7222/7222 result: 1
CLM version API: 12.2
Data: 9.10.39
Compiler: 1.29.4
ClmImport: 1.36.3
Creation: 2020-02-16 22:32:13

Initialization Done
In joinNetworks
WiFi CPU running
Set country succesfully
Join events enabled
Joining network wswn
driver_set_mac
driver_get_mac
driver_get_mac
MAC = 70:87:a7:10:64:b5

********************* LINK Established *********************

********************* Joined Network ***********************

The MAC address is hard coded in the CYW4343W chip and is only available after the chip has been initialized, but as you can see it is working.
There is a lot more to learn and setup in the rest of the driver and I am not sure about how to do it :confused:

I'll keep playing with it:D
The library I am using for the CYW4343W is here...
 
@wwatson thanks for starting that. One note is that the initialization for Wi-Fi might be a little different because there's an extra connection step with SSID's and things like that. I think I'm going to have to modify how that works in the library.

At some point soon, I'll have a look at what an API might look like if Wi-Fi is added.

There's also some assumptions I might be making regarding the order of chip initialization and MAC address detection. I'll have to look into that too.
 
Last edited:
I'd love to help more, but I think I need some hardware. Could someone send me something or tell me what to acquire? (If I don't already have what's needed.) Here's what I already have: (image attached). One board has the chip on one side, and the other board has the chip on the other side; the silver chip is labelled SS2211007 1DX. There's also an antenna. Is this the correct stuff?
 

Attachments

  • IMG_0369.jpg
    IMG_0369.jpg
    164 KB · Views: 23
Last edited:
correct stuff
Yes, that is the right '1DX' chip. You have TWO variants it seems. One wired to SD Socket adapter - ignore that for now. [this could work but would require altering the code to move to alternate SDIO and adding the INT wire IIRC]

With the Other look to post #73 : https://forum.pjrc.com/index.php?threads/call-to-arms-teensy-wifi-true.77099/post-366611

Photo there and wiring notes should find matching small print names on the silkscreen bottom side with no components.

Code:
 // wiring used from prior post: Viewed chipside up header connector to the left
INT (34)    WL_ON (33)
CMD (22)    CLK (23)
D0 (40)     D2 (17)
D1 (41)     D3 (16)
GND         3.3v

In that photo is a set of 10 4" jumper wires MALE on one end and Female on the other. Using that Male '1DX' board socket the Female wire ends went to Male pins on an otherwise bare T_4.1.

Progress down the T_4.1 from GND, then 3.3V and so on connecting wires to the indicated pins.

Then one wire at a time connect the Male wire ends into the properly identified Female header pins as indicated.

Carefully attach/Press the Antenna on the small round connector.

With that complete: The @wwatson github code examples should run as indicated in posts on the page prior to #73.

The only added hardware parts you might need for that are a Male pinned T_4.1 and the M<>F jumper wires - shorter is better.
Of course, a Female headered T_4.1 works as well with M<>M set of jumper wires.
 
Last edited:
I think I sent you the one with the SDcard connector, allows you to use SDHC1 via the SDcard slot on a T41 instead of wiring SDHC2 to pins. Just needs one wire in the header to a pin for sleep, IIRC. That's the device I used to get the first one of these things to work. But @defragster seems to have all the info you need for the other one, you have all the hardware you need, assuming you have a T41 and M->F jumpers!
 
I know there's source code in various projects that show how to communicate with the CYW43439, but does anyone know of a protocol document I could read? I'm having trouble finding one. Note that the datasheet only shows a few "setup" and "test" registers.
 
@defragster - Do you still have all of the docs for the CYW4343W/9 that we collected on your GitHub? I am checking mine to see if I forked it from yours...
 
protocol document
Finding docs isn't easy and the effort not entirely fruitful to date in any way - until @wwatson posted latest!
The WWatson github links to this: https://iosoft.blog/2022/12/06/picowi/
> there are lots of nested links from there that might get you to something usable?
all of the docs for the CYW4343W/9 that we collected on your GitHub?
Collection from prior efforts here in DOCS: https://github.com/Defragster/NXP_1062_MurataWiFi
That came from following nested links like above.
 
Finding docs isn't easy and the effort not entirely fruitful to date in any way - until @wwatson posted latest!
The WWatson github links to this: https://iosoft.blog/2022/12/06/picowi/
> there are lots of nested links from there that might get you to something usable?

Collection from prior efforts here in DOCS: https://github.com/Defragster/NXP_1062_MurataWiFi
That came from following nested links like above.
Thanks @defragster. I found all of it on one of my desktops. It is a huge amount of useful and probably not so useful info. I'll try to get it all in a repo on GitHub...
 
Back
Top