WIFI Debug Messages

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
sadok_1912
Posts: 8
Joined: Fri Mar 20, 2020 4:49 pm

WIFI Debug Messages

Post by sadok_1912 » Thu Apr 23, 2020 5:15 pm

Hello everyone,

I have an issue with starting the WIFI for the PYBD-SF2 board after changing the QSPI Flash for a larger one. It does look like it was obviously caused by the flash. The interesting thing is that I can upload the WIFI firmware on the second external flash with good bitrate using the DFU image. Is the configuration for the flash chips different between mboot and the code ?
When I start the WIFi module it throws an error saying:

[CWY43] could not find valid firmware

This goes three times followed with some other Ethernet starting problem. Tracing back the source of error, the libcyw43.a library seems to be the one dealing with the issue.
Is it possible to know what does this mean and when this message is thrown ? I can't seem to analyze the error further as no source code for that library is provided, is there?

Also, I was wondering if the QSPI configuration for the 2nd Flash is hard-coded in the library as I found no correlation with the rest of the code.

Any ideas are welcome. Thank you.

User avatar
jimmo
Posts: 1633
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: WIFI Debug Messages

Post by jimmo » Fri Apr 24, 2020 7:44 am

Which flash did you replace:
- 1. The one used by the filesystem (uses software QSPI on the QSPI1 pins, i.e. CS=PE13)
- 2. The one used for firmware (uses hardware QSPI on the QSPI2 pins, i.e. CS=PB6).

mpconfigboard.h currently sets them both to the same size -- MICROPY_HW_SPIFLASH_SIZE_BITS. So you'll need to change it to use a different value for

It sounds like you changed the second one?

Yes, the cyw firmware is part of the firmware on the external flash, but it's part of the main firmware, not just on its own.

There's a few other thigns you'd need to configure too, but can you answer the questions here first just to mkae sure we're on the same page then we can look at the next steps.
sadok_1912 wrote:
Thu Apr 23, 2020 5:15 pm
The interesting thing is that I can upload the WIFI firmware on the second external flash with good bitrate using the DFU image.
I don't quite know what you mean by this... it sounds like what you've done is just write the cyw firmware blob to the flash, but this won't work.

After replacing the flash part the idea is that you should just be able to use the regular DFU image.

sadok_1912
Posts: 8
Joined: Fri Mar 20, 2020 4:49 pm

Re: WIFI Debug Messages

Post by sadok_1912 » Fri Apr 24, 2020 9:54 pm

Thank you for the answer. What I mean is that I can I upload the entire DFU image on the Internal flash and also the second external Flash.

I'm dealing with the second external flash mainly. Can you please point what must be changed in order to get the wifi fully initialized ?
Last edited by sadok_1912 on Sat Apr 25, 2020 1:48 pm, edited 1 time in total.

User avatar
jimmo
Posts: 1633
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: WIFI Debug Messages

Post by jimmo » Sat Apr 25, 2020 12:51 am

sadok_1912 wrote:
Fri Apr 24, 2020 9:54 pm
What I mean is that I can I upload the entire DFU image on the Internal flash the second external one.
Sorry I don't understand this sentence.

Could you maybe post the output of running dfu-util?
sadok_1912 wrote:
Fri Apr 24, 2020 9:54 pm
I'm dealing with the second external flash mainly.
"mainly" ?

Out of curiosity, what's your goal here? You'd like to have more than 2MiB of compiled firmware? Or do you want a bigger filesystem for storing Python code and user data?

sadok_1912
Posts: 8
Joined: Fri Mar 20, 2020 4:49 pm

Re: WIFI Debug Messages

Post by sadok_1912 » Sat Apr 25, 2020 1:03 pm

This is output of the dfu-util:

Match vendor ID from file: 0483
Match product ID from file: df11
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (2 elements, total size = 970080)
parsing element 1, address = 0x08008000, size = 425184
Download [=========================] 100% 425184 bytes
Download done.
parsing element 2, address = 0x90000000, size = 544880
Download [=========================] 100% 544880 bytes
Download done.
done parsing DfuSe file

Sorry for the misunderstanding. It was a fast writing. So the whole point is to have enough Flash memory space for a large firmware. This is focused mainly on the second external Flash.

Post Reply