P2 WX Adapter Add-on Board (64007) with P2 (ver B) board(s) uploads binaries but doesn't exec them
dgately
Posts: 1,630
in Propeller 2
Spin2 binary appears to upload with P2 WX Adapter Add-on Board SKU 64007, but code does not run.
On either the P2ES, P2Edge Module Breadboard or the P2Edge Mini Breakout, following the directions in the WX Adapter Add-on Board guide, dropping a P2 binary, compiled with flex (spin, or C), seems to upload, but the code does not run. Tried this with the blink1.spin2 sample code, which should blink pin 56…
That code loads and runs from flexgui (5.0.1 Beta) without problems…
Does this WiFi-based upload only work for PNut compiled binaries? (I'll test the theory)
BTW: Latest WX Adapter .ota firmware was installed… (P2_httpd_0902.ota)
dgately
On either the P2ES, P2Edge Module Breadboard or the P2Edge Mini Breakout, following the directions in the WX Adapter Add-on Board guide, dropping a P2 binary, compiled with flex (spin, or C), seems to upload, but the code does not run. Tried this with the blink1.spin2 sample code, which should blink pin 56…
That code loads and runs from flexgui (5.0.1 Beta) without problems…
Does this WiFi-based upload only work for PNut compiled binaries? (I'll test the theory)
BTW: Latest WX Adapter .ota firmware was installed… (P2_httpd_0902.ota)
dgately
Comments
Available here: https://drive.google.com/drive/folders/11KquS93woptxTfJMx8J7WY4tSFkeH9Oq
Also... make sure you have the reset pin set to "CTS" in the WiFi GUI settings tab.
BTW: I get the same results for PNut compiled binaries as well (it likes to name its binaries *.bin). I've run the WX Adapter webpage from Safari, Chrome, Firefox on macOS & Chrome on WIN 10... Same result.
Pretty sure on Edge, I had Led and Flash on, and the two other Dips off.
Try with your PropPlug unplugged too.
If not, I'll try again later. It was working ( I was programming a lot over WiFi last week), but maybe something changed in the shared file versions.
One thing to consider with P2-Eval vs Edge...
The P56 Led shares with the Wifi reset signal, and P57 shares the PGM pin. You can flash led P57 at 1/2 hertz or slower (which that demo binary I linked does). Don't toggle P56 low though! On P2 Eval you have other leds available of course!
.bin or .binary extensions both fine.
Another idea... adjust the baud rates in Settings. Maybe try 2Mbaud or less. 115200 should always work.
PropPlug unplugged: Will test that now!
The P56 Led shares with the Wifi reset signal, and P57 shares the PGM pin: Yes, i noticed that toggling P56 causes P57 to also toggle...
adjust the baud rates in Settings. Maybe try 2Mbaud or less: I tried 230400, 115200... I noticed that the WX Adapter firmware was set for 3000000 baud for uploads, initially. I reset that, trying 230400 & 115200.
I'll test on the P2ES with P58, P59 LEDs.
Thank you
PropPlug unplugged: Yes
adjust the baud rates in Settings. Maybe try 2Mbaud or less: Loader Baud Rate: set to 2Mbaud
After these changes, I am able to load via WiFi on P2 Edge and P23ES! I think it was mainly the unplugging of the PropPlug on the P2 Edge and PC USB on the P2ES. Dropping from 3Mbaud may have also helped...
Thank you!
The Baud setting has an interesting backstory.... The safe upper limit is 2MBaud at boot time- that is the limit Chip recommends to be reliable across all conditions due to the use of the internal clock source during bootup. Once booted and running on the external crystal you can run much faster at the P2 IOs, but the ESP WiFi module is still limited to a lower figure, maybe 3 or 4 MBaud (Can't recall the figure right now).
Prior to having that conversation with Chip I had been using 3Mbaud without issue (why not go for the max, right?!!), and it seems that got left as the default in the WiFi firmware. I'll adjust that back to 2MBaud by default with the next firmware release; thanks for mentioning it.
Slightly OT- The WiFi firmware has been updated to merge in the recent improvements shared by iSeries (and maybe others) to GitHub, to use the latest ESP base-code version, and to combine both P1 and P2 programming options into one firmware image. It should be ready during December sometime so it can be flashed into the next production run of the modules. When that happens I'll let you know. Probably it will come up at a P2 Zoom meet too.