Tested SDIO functionality. Still works. Rework has to be done urgently code is very bad

This commit is contained in:
Mario Hüttel 2020-01-19 20:47:52 +01:00
parent 104bd65ac0
commit 4b07178f3d
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ Debug
*.files
*.includes
*.jdebug

View File

@ -118,6 +118,7 @@ sdio_write_buffer(uint32_t dlen, uint32_t blklen, uint8_t *buff)
}
/*
uint8_t data1[512] = {(1<<1), 16, 0xC9, 0x9A, 0x20, 0x84, 0x3E, 0xD7, 0xD9, 0x0B, 0x68, 0x01,
0xE4, 0x9F, 0x2B, 0xC8, 0x02, 0x77};
sdio_unlock_card()
@ -133,6 +134,7 @@ sdio_unlock_card()
sdio_write_buffer(512, 9, data1);
}
*/
DSTATUS SDIO_initialize(){
int timeout = 0x3000;
@ -203,7 +205,7 @@ DSTATUS SDIO_initialize(){
if (SDIO_send_block_length_CMD16((uint32_t)(1<<BLOCKSIZE)))
return STA_NOINIT;
sdio_unlock_card();
//sdio_unlock_card();
if (SDIO_send_bus_width_ACMD6(BUSWIDTH))

View File

@ -10,7 +10,7 @@
#define HW_FLOW 0 //0
//1 bit: !=4
//4 bit: 4
#define BUSWIDTH 1 //4
#define BUSWIDTH 4 //4
//Initial Transfer CLK (ca. 400kHz)
#define INITCLK 130 //120
//Working CLK (Maximum)