Using Pico-PIO-USB with a Pico W board #78
Replies: 2 comments
-
thanks! this confirmed an issue i'm having using PIO for I2C while also trying to connect to wifi. guess i'm going to have to redesign my board or figure out how to multiplex a single PIO unit. @rppicomidi I swear I'm not stalking you ;) |
Beta Was this translation helpful? Give feedback.
-
@burtonrodman You should be able to fit the CYW43 Driver's PIO code in the same PIO as a PIO I2C code. The issue will be how many PIO state machines you need to use. I am basing this statement on the PIO I2C code I use in this library. If you need an example of how to manage using multiple state machines for multiple instances of I2C, check out this project. The MSC Demo project I mentioned in the first post shows an example of how to share PIOs between two different programs. However, if you need to have the Pico-PIO-USB code and the CYW43 driver PIO code and I2C PIO, then you are probably out of PIO code space. |
Beta Was this translation helpful? Give feedback.
-
The Pico W board uses a PIO state machine and DMA to communicate with the CYW43 WiFi/Bluetooth module. The code the Pico W board uses is short and can coexist with the USB Tx PIO code that, by default, runs on PIO 0. However, by default, the pico-sdk places the CYW43 PIO code in PIO 1. If you add the following to your project CMakeLists.txt file, you will force the driver CYW43 driver to use PIO 0 instead (assumes you have set your project's name to
${target}
)This demo shows a working project that uses this technique. I hope this post and the example code helps someone out there.
Beta Was this translation helpful? Give feedback.
All reactions