-
Notifications
You must be signed in to change notification settings - Fork 13
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
RPi 2040 with Maker Pi Pico board #1
Comments
Hi, Normal RPi Pico SPI0 MicroSD Pin Definition for Maker Pico SPI1 but I attached a maker_pico_sd.h for your reference. In your .ino you need to define Also check if you have changed SdFatConfig.h like described at the page And please tell me which version do you use from github? I hope you will get its working... Maybe the SPI-Pinout in the Maker Pi Pico is wrong and you have to use the original Pinout? Let me know :) Kind regards |
There is a Board-definition Cytron Maker Pi in the RP2040 arduino-core package (Board Support), You can try to edit this file - like below... Path: from these lines
that should be changed to
Do you have RP2040 arduino-core v2.5.2 installed? |
@kwpodolsky
|
SPI_FULL_SPEED is 50Mhz - which is too fast :(
because of
|
@kwpodolsky |
Awesome, thanks!
from my Pixel 5a 5G with Android 11
…On Sat, Sep 17, 2022, 4:23 AM Guido Lehwalder ***@***.***> wrote:
@kwpodolsky <https://github.com/kwpodolsky>
here the latest version with the changes for 19Mhz as complete source ;)
RunCPM_MakerPiPico_SPI1_17092022.zip
<https://github.com/guidol70/RunCPM_RPi_Pico/files/9591266/RunCPM_MakerPiPico_SPI1_17092022.zip>
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWDP4XY64MQALNLL566S4N3V6V5XBANCNFSM6AAAAAAQJ3BC6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I kept trying different things and FINALLY got the debugging code to show
me that the code was using the CORRECT GPIO pins, BUT...
I still could not get the code to enable the SD interface.
I put a separate uSD card reader on the "default" SPI pins that your code
and I was able to access the SD card.
Not sure if there is something about the Maker board that has to be done to
get the SD card to actually work.
I have looked at their example code and I don't see anything different in
the setup of pins.
I will try one last time, with the code you just supplied and see if it
works.
If not... I'm gonna give up the fight. LOL
I appreciate your help and time researching this matter.
I WOULD like it to work with the Maker sd card, but... I have other things
that could better utilize my time.
BTW, I have an SC2014 Z80 board and I copied the "drives" I have on that SD
card and used them with your code.
Works fine. Haven't seen any issues running TurboPas 1.0 or MixC, Aztec,
MASM80 and a handful of games.
Nice job.
…On Thu, Sep 15, 2022 at 3:50 AM Guido Lehwalder ***@***.***> wrote:
@kwpodolsky <https://github.com/kwpodolsky>
could you please check the following code (you can insert/change it - or
use the zipped complete .ino-source) in the .ino for using your pins with
SPI1
Does compile successfully - but I cant test it -> you got the hardware ;)
// =============================================================
// Set the SPI1 Pins
// =============================================================
SPI1.setRX(11); // MISO
SPI1.setCS(15); // Card Select
SPI1.setSCK(10); // Clock
SPI1.setTX(12); // MOSI
// =============================================================
// Setup SD card writing settings
// =============================================================
#define SPI_SPEED SPI_FULL_SPEED
#define SD_CONFIG SdSpiConfig(15, DEDICATED_SPI, SPI_FULL_SPEED, &SPI1)
// =============================================================
// Start accessing the SD card
// =============================================================
if (SD.begin(SD_CONFIG)) {
RunCPM_Pico_21082025_SD_MakerPiPico.zip
<https://github.com/guidol70/RunCPM_RPi_Pico/files/9573050/RunCPM_Pico_21082025_SD_MakerPiPico.zip>
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWDP4X2GBAVQTBGKVUJUK33V6LIN5ANCNFSM6AAAAAAQJ3BC6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just leaving my thoughts as I did get it to work with the Maker Pi Pico board but I had to make changes to the source code to get the SD card reading / writing to work. I can't remember exactly what I changed but here's some bits from my source folder. The trick is switching to the softSpi driver to get it to work, I think. in RunCPM.ino (or whatever filename you have), change the
The code for softSpi is added after the includes at the top of the same ino file and I used,
Can't seem to find where I defined I commented out the 4 lines beginning |
Thanks for your effort in regards to the Maker board.
I really appreciate your involvement.
I will try again with mine to see if I can get it working.
Regards
Kerry
…On Mon, Oct 17, 2022 at 2:33 PM Jimbob-B ***@***.***> wrote:
Just leaving my thoughts as I did get it to work with the Maker Pi Pico
board but I had to make changes to the source code to get the SD card
reading / writing to work. I can't remember exactly what I changed but
here's some bits from my source folder. The trick is switching to the
softSpi driver to get it to work, I think.
in RunCPM.ino (or whatever filename you have), change the SD_CONFIG
define to,
#define SD_CONFIG SdSpiConfig(SS, DEDICATED_SPI, SD_SCK_MHZ(SDMHZ),
&softSpi)
The code for softSpi is added after the includes at the top of the same
ino file and I used,
SoftSpiDriver<SOFT_MISO_PIN, SOFT_MOSI_PIN, SOFT_SCK_PIN> softSpi;
Can't seem to find where I defined SOFT_MISO_PIN, SOFT_MOSI_PIN and
SOFT_SCK_PIN ... they may be pre-defined in the arduino library somewhere.
I commented out the 4 lines beginning SPI1.setRX(12); // MISO in the ino
file as they didn't work for me - the &SPI1 changes wouldn't compile at
all. Google helped with the changes to get it working.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWDP4X2X3NPME3SF3KLWD3LWDWLXDANCNFSM6AAAAAAQJ3BC6U>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@guidol70 Any chance of an updated source release for this? I can then try again and this time make a proper note of the changes I make for the Maker Pi Pico board ... |
As attachment a v6.0 of my Maker-Pico version, but as I wrote I didnt have a Maker-Pico to test it. Did you change the SdFatConfig.h from the SdFat-Library for SoftSPI like on a STM32-board (which also need SoftSPI)?
I will also attach a SoftSPI STM32 (pyBoard v1.1) Source-version for reference, how I did use SoftSPI on the STM32 RunCPM_v6_0_Maker_Pico_26102022.zip |
No, I didn't do anything like that. Finally found 5 minutes to have another go and I've managed to get it to work on my Maker Pi Pico board with minimal edits to the source code. To get it to work I did the following,
I think that was all the changes I made. This should compile and load files from the micro-sd card, hopefully. Edit: forgot to say thank you :-) |
Fine that it worked for you. I thought I had made the most changes already in the archive RunCPM_v6_0_Maker_Pico_26102022.zip SS could be moved to the hardware/pico/maker_pico_sd_spi1.h For 2) I had no SPI. but SPI1. defined:
Cool that no SoftwareSPI is needed and the PinOut-Numbers are OK (without having this board here) :) |
I am using a stock RPi 2040 board on a Maker Pi Pico breakout.
The Maker board has a built on uSD card reader.
The Maker uSD uses the SD1 pins (SCLK-GP10, MISO-GP11, MOSI-GP13, SS-GP15).
I've tried modifying the "pico_sd.h" file to change the SPI pins, but every time I run, it keeps failing to init the SD card and the debug output tells me it is using the original pins defined in the header file (even tho they are commented out).
Also, in enabling the debug output, the compile fails on the "BOARD" not being defined.
I even added a define for it in the "pico_sd.h" file and... no joy.
WHAT am I doing wrong (or not doing) that is needed to fix this problem?
The text was updated successfully, but these errors were encountered: