Call to arms | Teensy + WiFi = true

I kind of like the stacking header method but I think I will utilize @PaulStoffregen's three tier motherboard that way I have everything on one board and an extra tier for access to all pins for testing. I do not have stacking headers at hand but I do have regular pins available.
Something else I was thinking about was an adapter that plugs into the T4.1's SDIO slot. Right now uSDHC2 uses at least one pin that is also used for the audio adapter (MCLK1) I think. A person could then use the USB host port with a SD card reader or USB stick or a USB to NVME SSD adapter (which has some good transfer rates) if needed. Just a thought...
 
Something else I was thinking about was an adapter that plugs into the T4.1's SDIO slot. Right now uSDHC2 uses at least one pin that is also used for the audio adapter (MCLK1) I think. A person could then use the USB host port with a SD card reader or USB stick or a USB to NVME SSD adapter (which has some good transfer rates) if needed. Just a thought...

Could start with something like this
 
Could start with something like this
I have or had one of those. Also made my own adapters
1786193979598.png
1786194067097.png

2nd one don't remember what board the pin numbers were from. (made I think 10 years ago)
 
Last edited:
using PJRC triple header unit - just soldered male pins to SFun board. Got latest recent github.
IDE 1.8.19:

Code:
... "T:\\TEMP\\arduino_build_535646/cyw43_scan.ino.elf"
Using library QNEthernet_WIFI at version 0.37.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

Code:
CPU speed: 600 MHz
cardCommand(31a0000, 0) error isBusyCommandInhibit
cardCommand(71b0000, 0) error isBusyCommandInhibit
cardCommand(341a0000, 80002020) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80002200) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80022040) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80022200) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80042000) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80042202) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 2600) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, e00) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80000e02) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 400) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80000422) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 400) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 600) error isBusyCommandInhibit
CMD52 failed
BUS_IORDY_REG (Ready indication) returned 0
initialization failed!
Setup complete


====== STARTING SCAN ======
 
Ok used the triple header board as well and IDe 2x. Changed IRQ pin to 29 - hard to tell what pins are need - assume wake is still 38


Code:
CPU speed: 600 MHz
===========================
CYW4343W Card::begin: SDIO2
===========================
Attaching OOB interrupt to pin 29
Enabled CYW4343W bus high speed interface
BUS_IORDY_REG (Ready indication) returned OK
SDHC bus set to 4-bit, speed set to 33MHz
*************
CardID: 43439
*************
CMD52 failed
cardCommand(341a0000, 12001c00) error isBusyCommandInhibit
CMD52 failed

Did see what you saw on reboot, but rebooted and saw above again
 
@defragster @mjs513 - Haven't received my board yet so I can't help much. It's probably not going to get much further than reading the card ID.
This is the repo that should be used:
https://github.com/wwatson4506/QNEthernet_WIFI/tree/QNEthernet_WIFI_0.36.0
Here is the section of code that reads the card Id:
Code:
  //Set backplane window
  setBackplaneWindow(BAK_BASE_ADDR);
  u32Data u32d;
  //Read chip ID
  //This was 4 byte read in the Zero code, causes extra bytes in the buffer - only if first CMD53 executed.
  //Changing size to < 4 "fixes" it. Debug code sdio.c 3909 formats value as %4x, so use size 2
  cardCMD53_read(SD_FUNC_BAK, SB_32BIT_WIN, u32d.bytes, 2);
#if INIT_DEBUG_MODE == true
  printf(SER_GREEN "*************\nCardID: %ld\n*************\n" SER_RESET, u32d.uint32 & 0xFFFF);
#endif
#if USE_CYW4343W == false // Do 'wifiSetup' here else do 'wifiSetup' in QNEthernet.
  //============================
  // Setup the WiFi card (1DX)              =
  //============================
  wifiSetup();
#endif
This starts at line #1090 in "cyw43_T4_SDIO.cpp" in the "drivers/cyw4343w/src/ folder.
There is quite a bit of initialization going on before getting the card ID. As we are seeing the correct card ID, it is a good chance that the rest of the initialization is not being setup in the proper sequence. Also the firmware files are for the 1DX and will probably not work with the 1YN chip...
EDIT: Make sure you turn on the debug in "misc_defs.h" file in "drivers/cyw4343w/src/":
Code:
//==============================================================================
// Init Debug Mode. Displays initialization processes.
//==============================================================================
#define INIT_DEBUG_MODE false
Line #43.
EDIT 2: Opps, had the wrong path and filename for "cyw43_T4_SDIO.cpp"...
 
Last edited:
using PJRC triple header unit - just soldered male pins to SFun board. Got latest recent github.
IDE 1.8.19:

Code:
... "T:\\TEMP\\arduino_build_535646/cyw43_scan.ino.elf"
Using library QNEthernet_WIFI at version 0.37.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

Code:
CPU speed: 600 MHz
cardCommand(31a0000, 0) error isBusyCommandInhibit
cardCommand(71b0000, 0) error isBusyCommandInhibit
cardCommand(341a0000, 80002020) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80002200) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80022040) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80022200) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80042000) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80042202) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 2600) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, e00) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80000e02) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 400) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 80000422) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 400) error isBusyCommandInhibit
CMD52 failed
cardCommand(341a0000, 600) error isBusyCommandInhibit
CMD52 failed
BUS_IORDY_REG (Ready indication) returned 0
initialization failed!
Setup complete


====== STARTING SCAN ======
Does not look like you are using the correct repo. QNEthernet 0.37.0 is only available at @shawn's GitHub QNEthernet repo.
Use this instead:
https://github.com/wwatson4506/QNEthernet_WIFI/tree/QNEthernet_WIFI_0.36.0
The QNEthernet_WIFI is only available at my GitHub repo.
Check out post #259 above if you have not done so already :D
 
Last edited:
I did not realize that the "INT" pin # changed to 29 from 34. That is used in two files, "WIFI_init.cpp" and "cyw43_scan.ino". Those numbers are hardcoded in those files. I will change them to defines in "misc_defs.h" file.
Looks like this:
Code:
  //////////////////////////////////////////
  //Begin parameters:
  //SDIO1 (false), SDIO2 (true)
  //WL_REG_ON pin
  //WL_IRQ pin (-1 to ignore)
  //EXT_LPO pin (optional, -1 to ignore)
  //////////////////////////////////////////
  if (WIFIcard.begin(true, 33, 34, -1) == true) {
  ...
 
My github is yours and and branch has that name?
Just to be sure can you edit the version #.#.0 to something unique in that last digit?
1786229373035.png
 
Recopied from github folder to sketchbook libraries and same report in the IDE build:
Using library QNEthernet_WIFI at version 0.37.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

Got those two edits:
Using library QNEthernet_WIFI at version 0.37.1-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

Edited the INT from 34 to 29 as noted and "errors" same result.

NOTE: I did Rush/Cheat and only soldered the LABELED pins - I don't see any missing - didn't want to mess it up doing all the pins - and it was pushing lunchtime.
 
Recopied from github folder to sketchbook libraries and same report in the IDE build:
Using library QNEthernet_WIFI at version 0.37.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

Got those two edits:
Using library QNEthernet_WIFI at version 0.37.1-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

Edited the INT from 34 to 29 as noted and "errors" same result.

NOTE: I did Rush/Cheat and only soldered the LABELED pins - I don't see any missing - didn't want to mess it up doing all the pins - and it was pushing lunchtime.
Understandable :D Just to be sure, you changed the WL_INT pin number in "cyw43_scan.ino" to 29?
Code:
  //////////////////////////////////////////
  //Begin parameters:
  //SDIO1 (false), SDIO2 (true)
  //WL_REG_ON pin
  //WL_IRQ pin (-1 to ignore)
  //EXT_LPO pin (optional, -1 to ignore)
  //////////////////////////////////////////
58   if (WIFIcard.begin(true, 33, 29, -1) == true) { <--------------- changed
Looks like FEDEX just showed up:love:

Just updated the QNEthernet_WIFI library to use pin defines. These can be changed in the "QNEthernet/src/qnethernet/drivers/cyw4343w/src/misc_defs.h" file:
Code:
//==============================================================================
// Begin parameters defines:
// SDIO1 (false), SDIO2 (true) which uSDHC IF to use.
// WL_REG_ON pin
// WL_IRQ pin (-1 to ignore)
// EXT_LPO pin (optional, -1 to ignore)
// WIFIcard.begin(true, REG_ON, WL_IRQ, -1)
//==============================================================================
#define REG_ON 33
#define WL_IRQ 34
#define EXT_LPO -1
//#define BT_ON ??
Hopefully that makes things easier...
 
@wwatson noticed some difficulties getting a DHCP address with the latest QNEthernet from GitHub. Could a few other people get that version, try out the SNTPClient example, and see if you see the same DHCP problem?
 
see the same DHCP problem

Starting...
MAC = 04:e9:e5:0e:cf:8d
Starting Ethernet with DHCP...
Waiting for local IP...
Failed to get IP address from DHCP

Is there a quick easy way to have the WiFi version hit on a different header\QNEthernet_WIFI so both could be present?
 
Thanks, @defragster. I haven't been able to reproduce this on my end yet. :/
It's easy :) ???
IDE 1 and latest TDuino and updated copy of QNEth code
Don't have a device on desk with old code to show it worked - three @KenHahn mini's all running something other than ethernet test :( But the Activity light comes on to/from switch.
 
Ok, It's working:
Code:
CPU speed: 600 MHz
===========================
CYW4343W Card::begin: SDIO2
===========================
Attaching OOB interrupt to pin 29
Enabled CYW4343W bus high speed interface
BUS_IORDY_REG (Ready indication) returned OK
SDHC bus set to 4-bit, speed set to 33MHz
Backplane Window set to 0x18000000
*************
CardID: 43439
*************
Just had to get the pin numbers right. @defragster If you did not get your board working do this in "cyw43_scan.ino":
Code:
  //////////////////////////////////////////
  //Begin parameters:
  //SDIO1 (false), SDIO2 (true)
  //WL_REG_ON pin <-------------- is pin #30
  //WL_IRQ pin (-1 to ignore) <-- is pin #29
  //EXT_LPO pin (optional, -1 to ignore)
  //////////////////////////////////////////
  if (WIFIcard.begin(true, 30, 29, -1) == true) { <-- correct pin numbers for CYW43439.
WL_REG_ON pin <-------------- is pin #30
WL_IRQ pin <---------------------- is pin #29
I will post an update when I get the scan sketch working. Hopefully soon:unsure:
 
It was not working. I soldered and retouched all pins.

With: if (WIFIcard.begin(true, 30, 29, -1) == true) {

I am getting diff result - but only this with github current:
Code:
CPU speed: 600 MHz
Set BAK_CHIP_CLOCK_CSR_REG issue, response: 0x50
*Note unprintable "FIRST" char in output removed

INIT_DEBUG_MODE TRUE:
Code:
CPU speed: 600 MHz
===========================
CYW4343W Card::begin: SDIO2
===========================
Attaching OOB interrupt to pin 29
Enabled CYW4343W bus high speed interface
BUS_IORDY_REG (Ready indication) returned OK
SDHC bus set to 4-bit, speed set to 33MHz
Backplane Window set to 0x18000000
*************
CardID: 43439
*************
Backplane Window set to 0x18100000
Set SRAM_IOCTRL_REG validated
Backplane Window set to 0x18000000
Backplane Window set to 0x18100000
Set SRAM_IOCTRL_REG second validation
Set SRAM_RESETCTRL_REG validated
Backplane Window set to 0x18000000
BUS_BRCM_CARDCTRL returned 1
BAK_CHIP_CLOCK_CSR_REG returned 0x48
Backplane Window set to 0x00058000
Uploading firmware data
Backplane Window set to 0x00000000
Backplane Window set to 0x00008000
Backplane Window set to 0x00010000
Backplane Window set to 0x00018000
Backplane Window set to 0x00020000
Backplane Window set to 0x00028000
Backplane Window set to 0x00030000
Backplane Window set to 0x00038000
Backplane Window set to 0x00040000
Backplane Window set to 0x00048000
Backplane Window set to 0x00050000
Backplane Window set to 0x00058000
Backplane Window set to 0x00060000
Uploaded firmware, 419798 of 419798 bytes
Uploading NVRAM data
Backplane Window set to 0x00078000
Uploaded NVRAM, 586 of 586 bytes
Backplane Window set to 0x18100000
Backplane Window set to 0x18000000
Backplane Window set to 0x18100000
Backplane Window set to 0x18000000
Set BAK_CHIP_CLOCK_CSR_REG issue, response: 0x50
 
Last edited:
Quick update. Swapped base boards and now:

Code:
CPU speed: 600 MHz
===========================
CYW4343W Card::begin: SDIO2
===========================
Attaching OOB interrupt to pin 29
Enabled CYW4343W bus high speed interface
BUS_IORDY_REG (Ready indication) returned OK
SDHC bus set to 4-bit, speed set to 33MHz
Backplane Window set to 0x18000000
*************
CardID: 43439
*************
Backplane Window set to 0x18100000
Set SRAM_IOCTRL_REG validated
Backplane Window set to 0x18000000
Backplane Window set to 0x18100000
Set SRAM_IOCTRL_REG second validation
Set SRAM_RESETCTRL_REG validated
Backplane Window set to 0x18000000
BUS_BRCM_CARDCTRL returned 1
BAK_CHIP_CLOCK_CSR_REG returned 0x48
Backplane Window set to 0x00058000
Uploading firmware data
Backplane Window set to 0x00000000
Backplane Window set to 0x00008000
Backplane Window set to 0x00010000
Backplane Window set to 0x00018000
Backplane Window set to 0x00020000
Backplane Window set to 0x00028000
Backplane Window set to 0x00030000
Backplane Window set to 0x00038000
Backplane Window set to 0x00040000
Backplane Window set to 0x00048000
Backplane Window set to 0x00050000
Backplane Window set to 0x00058000
Backplane Window set to 0x00060000
Uploaded firmware, 419798 of 419798 bytes
Uploading NVRAM data
Backplane Window set to 0x00078000
Uploaded NVRAM, 586 of 586 bytes
Backplane Window set to 0x18100000
Backplane Window set to 0x18000000
Backplane Window set to 0x18100000
Backplane Window set to 0x18000000
Set BAK_CHIP_CLOCK_CSR_REG issue, response: 0x50

Based on the error messages looks like definitely firmware needs updating
 
Back
Top