How to use test_sd.c
Re: How to use test_sd.c
Maybe you can run some other example (which runs) on the same hardware and compare bootloader log (up to 'entry' line) to see if there is any difference in SPI flash parameters?
Re: How to use test_sd.c
Did you try 'make erase_flash'?
It looks like you may have an otadata partition which selects ota_0
It looks like you may have an otadata partition which selects ota_0
Re: How to use test_sd.c
SDMMC test
Blink example
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0010,len:4
load:0x3fff0014,len:4124
load:0x40078000,len:0
load:0x40078000,len:11968
entry 0x40078cd8
Blink example
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0010,len:4
load:0x3fff0014,len:5108
load:0x40078000,len:0
load:0x40078000,len:12652
entry 0x40078f44
Re: How to use test_sd.c
Sorry, i haven't read your post. And yes, that was the right clue.WiFive wrote:Did you try 'make erase_flash'?
It looks like you may have an otadata partition which selects ota_0
I tried again
Code: Select all
make flash monitor TEST_COMPONENTS=sdmmc ESPPORT=/dev/ttyUSB0
"0 Tests 0 Failures 0 Ignored
OK
Here's the test menu, pick your combo:"
Re: How to use test_sd.c
Ok, tried this on my second computer. Weird, it's working there (esp idf versions are the same):
But now i can't select of one those combos with a number. Basically, i can't enter any number/text
Edit: Ah, well, it seems that mingW doesn't view my inputs. For example, when i just type * and press Enter, the test is running.
Code: Select all
Here's the test menu, pick your combo:
(1) "can probe SD" [sd][ignore]
(2) "can probe SD (using SPI)" [sdspi][ignore]
(3) "can write and read back blocks" [sd][ignore]
(4) "can write and read back blocks (using SPI)" [sdspi][ignore]
(5) "reads and writes with an unaligned buffer" [sd][ignore]
Edit: Ah, well, it seems that mingW doesn't view my inputs. For example, when i just type * and press Enter, the test is running.
:can probe SD:FAIL: Expected 0 Was 259
Test ran in 11ms
can write and read back blocks:FAIL: Expected 0 Was 2
59
Test ran in 14ms
can write and read back blocks (using SPI):FAIL: Expe
cted 0 Was 259
Test ran in 23ms
Do i have to consider something in the code? I want to test 1 line modereads and writes with an unaligned buffer:FAIL: Expec
ted 0 Was 259
Test ran in 16ms
Re: How to use test_sd.c
By default these tests use 4-line mode. You can edit test_sd.c and change peripheral configuration to 1-line mode.
Re: How to use test_sd.c
Its working. But i also added highspeed mode to a test case, but its still always default speed.
Name: SS08G
Type: SDHC/SDXC
Speed: default speed
Size: 30436MB
Code: Select all
TEST_CASE("can write and read back blocks", "[sd][ignore]")
{
sdmmc_host_t config = SDMMC_HOST_DEFAULT();
config.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
config.flags = SDMMC_HOST_FLAG_1BIT;
TEST_ESP_OK(sdmmc_host_init());
sdmmc_slot_config_t slot_config = SDMMC_SLOT_CONFIG_DEFAULT();
TEST_ESP_OK(sdmmc_host_init_slot(SDMMC_HOST_SLOT_1, &slot_config));
sdmmc_card_t* card = malloc(sizeof(sdmmc_card_t));
TEST_ASSERT_NOT_NULL(card);
TEST_ESP_OK(sdmmc_card_init(&config, card));
read_write_test(card);
free(card);
TEST_ESP_OK(sdmmc_host_deinit());
}
Re: How to use test_sd.c
In Github master version, high speed support is not implemented. Actually, we have just merged the change internally, which adds high speed mode support. We have some issues with tests now, but once they are resolved, you should be able to get new code from Github and it will support high speed mode.
Who is online
Users browsing this forum: Google [Bot] and 86 guests