PicoW on Waveshare LED2

Hello, I’m trying to get a Pico W working with a Waveshare LED2 Spi display. I can make it operational using the pico drivers but not the rpipicow drivers. I suspect there is some interference between the Pico WiFi board and the Waveshare SPi GPIO pins. Wifi works but not the display unless I use the the board=pico. but then I cant use the WiFi.

The display does no operate if I use the board=rpipicow (in platformIO) however the program does run.

here is the waveshare board:
https://www.waveshare.com/wiki/Template:Pico_LCD_2_Spec

I wonder if there are any workarounds

The Waveshare pins are as follows:

#define TFT_DC 8 // Data Command control pin·
#define TFT_CS 9 // Chip select control pin
#define TFT_SCLK 10
#define TFT_MOSI 11
//#define TFT_MISO 12
#define TFT_RST 12 // Reset pin (could connect to RST pin)
#define TFT_BL 13 // LED back-light

Thanks for any help

Here is my code:

#include <Arduino.h>
#include "SPI.h"
#include "TFT_eSPI.h"
#include <WiFi.h>
#include <WebServer.h>
#include "funcs.h"
TFT_eSPI tft = TFT_eSPI();
const char *ssid = "mySSID";
const char *password = "myPassword";

void SetupWiFi()
{
WiFi.mode(WIFI_STA);

WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected.");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
Serial.print("MAC address: ");
Serial.println(WiFi.macAddress());
Serial.println();
}

void setup(void) {
Serial.begin(115200);
delay(50);
Serial.println("Starting WiFi");
SetupWiFi();
Serial.println("Starting WiFi");
tft.begin();
tft.println("Starting display");
tft.setRotation(1);
}

void loop() {

Serial.println("In Loop "+String(millis()));
delay(50);
Serial.println(WiFi.localIP());
tft.fillScreen(TFT_BLACK);
tft.setTextWrap(false);
tft.setTextFont(7);
tft.setCursor(48,0);
tft.setTextColor(TFT_RED);
tft.setTextSize(2);
tft.println(fmtNum((float)millis()/(float)100,2,2));
tft.fillCircle(10,45,10,TFT_BLUE);

tft.setCursor(48,120);
tft.setTextColor(TFT_GREEN);
tft.setTextSize(2);
tft.println(fmtNum((float)millis()/(float)100,2,2));
tft.fillCircle(10,165,10,TFT_YELLOW);
delay(1000);
}

Here is my platform.ini

[env:rpipicow]
platform = raspberrypi
board = rpipicow
framework = arduino
lib_deps = bodmer/TFT_eSPI@^2.5.43

Per https://datasheets.raspberrypi.com/picow/pico-w-datasheet.pdf the RP2040 is connected via an SDIO protocol to the WiFi chip (CYW43439) via GP23, 24, 25 and 29. So those should not be interfering with the SPI pins for the display.

And reverse, when use board = picow with a code that only uses the display and not the WiFi, the display works or not?

In Reverse it does not work, So just to be clear if I remove all the Wifi code when board=rpipicow. the display does no work however the program does run.

It displays my Serial.println("In Loop "+String(millis()));

so there must be somthing in the libs?

I also tried the olikraus/Ucglib@^1.5.2 and Adafruit_GFX LIBs but with no success. Compile errors, seems like only the bodmer/TFT_eSPI@^2.5.43 LIB will work and only under pico not pipicow