-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CYW43 core not starting on Pico2 W #2152
Comments
I don't have a VGA Demo Board. Does your code work with a "normal" Pico W?
|
Yes, the code works on a Pico W, it only the Pico 2 that it fails on.
The same network source code works on the Pico 2 with a build not making use of the second core. I am not aware of anything in either pico-examples or pico-playground that uses both scanvideo and wifi.
Yes. |
OK, build it this way:
Install the resulting file bbcbasic+filesystem_console_pico2_w.uf2 on a bare Pico2 W. Connect a serial terminal to the Pico USB port. The Pico pins will be busy outputting VGA video and I2S sound, but you can ignore all these. Just interact over the USB connection.
|
It seemed to work.
|
Reliably? I will have to try my other Pico2 W. Just to check, your description of the build does include VGA Display ?
I know that the version without the VGA output works. |
My second Pico2 W fails in exactly the same way. |
Oops, an error on my part :( I gave the build instructions from memory, not copy & paste. Having now tried them they fail to build owing to an entirely unrelated error (building a PIO file related to sound). So I am not quite sure what you tested, possibly a version without VGA output. The following build instructions do work, and produce an executable including VGA output:
That is the version which is failing to connect to the network. |
I fixed the build errors.
|
So I am puzzled. It regularly fails on both my Pico2 W. Although I have seen it work once on one of them. |
That last build command (with my changes reverted) works ok. I'll test some other devices |
Thanks. I have pushed my version of the corrections to the sound build. None of the changes I have made affect the network code. To build with either SOUND=I2S or SOUND=PWM it would be necessary to have a board definition with the relevant pins defined. |
Tried another couple of Pico 2 W devices and they all seem to get an IP address and run that program ok. What country code are you using? I'm attaching my uf2 just in case - can you see if it fails on your devices? |
Stranger and stranger. I am using country code GB. Your UF2 works on one of my Pico2 W. I have not yet tried the other one. I am building on an RP4B, running 64-bit Bookworm, fully updated.
|
My builds all include diagnostic information. Attached is an objdump of my executable. How does this compare with yours? |
Ha. Yes. I was building it on a fairly old x86 ubuntu virtual machine. I can reproduce the problem when I build it on a Pi 5. Reducing the optimisation level to O2 or O1 seems to make it happier. |
I am still getting failures with -O2, but -O1 seems to work on a quick test. |
A call to cyw43_arch_init_with_country is failing.
My program is PicoBB. I am finding that for the Pico2 GUI build, which is using the ScanVideo library to produce VGA output on Core 1, and Core 0 running the BBC BASIC interpreter attempting to open a WiFi connection I am obtaining the following diagnostic messages:
and the WiFi is failing to connect.
Enabling all the diagnostics in the CYW43 driver, and comparing (diff -y) the failing case with a case in which Core 1 is idle gives the attached, where the failing case is on the left and the successful case is on the right.
diff.txt
Looking at the source file pico-sdk/lib/cyw43-driver/src/cyw43_ll.c I see the function device_core_is_up():
This function seems to be testing for two possible failure conditions, but then does nothing about them other than issuing diagnostic messages. Surely it should be returning a true/false status so that subsequent code can handle any failures.
In the diagnostics attached, the following output can be seen:
So one of the tests is failing, but the code continues to execute as if nothing is wrong. The code eventually fails with the "HT not ready" error here.
I don't know enough about the CYW43 to interpret the error.
To produce the failing executable:
Install the software on a Pico2 W on a VGA Demo Board with:
Load "bbcbasic+filesystem_gui_pico2_w_vgaboard_cut.uf2" into the pico2 W. To demonstrate failure, enter the following commands on the Keyboard attached to the pico2 W:
And to produce the functional executable:
For this version no VGA board is required. Attach a USB console to the Pico2 W and run the same BASIC program.
The text was updated successfully, but these errors were encountered: