You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm trying to include the no-OS-FatFS-SD-SPI-RPI-Pico into the Picoterm project .
Constraint: because of the VGA rendering and USB Host (for Keyboard), I cannot use the UART debugging, Neither USB debugging.
So I do send debugging message over GP28 with a PIO TX based uart (see the debug_print() call below in the code).
As current configuration I'm using the standard hw_config configuration together with an Adafruit microSD breakout (for SPI).
The config & wiring are: SO->GP16, CS->GP17, CLK->GP18, SI->GP19,Detect->GP22, 3.3V & GND.
From my main() I do call the test_sdcard() available here below after the sdio_init_all() call.
I can see the message "SD Card driver initializing" then the Pico stops running!
This means that sd_init_driver() does crashed.
The result is the same with an SD inserted and without SD.
Did I miss something obvious ?
void test_sdcard() {
FRESULT fr;
FATFS fs;
FIL fil;
int ret;
char buf[100];
char filename[] = "test02.txt";
// https://www.digikey.com/en/maker/projects/raspberry-pi-pico-rp2040-sd-card-example-with-micropython-and-cc/e472c7f578734bfd96d437e68e670050
debug_print("------BEGIN SDCARD test----");
debug_print("SD Card driver initializing");
// Initialize SD card
if (!sd_init_driver()) {
debug_print("ERROR: Could not initialize SD card\r\n");
return;
}
debug_print("SD Card driver initialized"),
// Mount drive
fr = f_mount(&fs, "0:", 1);
if (fr != FR_OK) {
sprintf( debug_msg, "ERROR: Could not mount filesystem (%d)\r\n", fr);
debug_print( debug_msg );
return;
}
// Open file for writing ()
fr = f_open(&fil, filename, FA_WRITE | FA_CREATE_ALWAYS);
if (fr != FR_OK) {
sprintf( debug_msg, "ERROR: Could not open file (%d)\r\n", fr);
debug_print( debug_msg );
return;
}
debug_print("------END OF SDCARD test----");
}
The text was updated successfully, but these errors were encountered:
fwiw I'm using main branch and I get the same problem, soon after calling the init function (and doing nothing else), I get this output over usb serial shortly after.
*** PANIC ***
Hard assert
I can get to the point of mounting the drive, but it also panics soon after.
EDIT: I think you may be right about the DMA IRQ conflict; the panic went away after I disabled the video output. Investigating...
EDIT2: Yes, it was the DMA + assumptions about the channels in use; I changed the qvga video code to claim unused channels and use DMA irq1 and it all works with this lib nicely
Hi,
I'm trying to include the no-OS-FatFS-SD-SPI-RPI-Pico into the Picoterm project .
Constraint: because of the VGA rendering and USB Host (for Keyboard), I cannot use the UART debugging, Neither USB debugging.
So I do send debugging message over GP28 with a PIO TX based uart (see the debug_print() call below in the code).
As current configuration I'm using the standard hw_config configuration together with an Adafruit microSD breakout (for SPI).
The config & wiring are: SO->GP16, CS->GP17, CLK->GP18, SI->GP19,Detect->GP22, 3.3V & GND.
From my main() I do call the
test_sdcard()
available here below after thesdio_init_all()
call.I can see the message "SD Card driver initializing" then the Pico stops running!
This means that
sd_init_driver()
does crashed.The result is the same with an SD inserted and without SD.
Did I miss something obvious ?
The text was updated successfully, but these errors were encountered: