From 7c937c879e359cb54be0d8cb1236edd36ee7b364 Mon Sep 17 00:00:00 2001 From: Shino Amakusa Date: Wed, 25 Nov 2015 18:17:54 +0100 Subject: [PATCH] Added security Pullups --- FATFS/shimatta_sdio_driver/shimatta_sdio-driver.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/FATFS/shimatta_sdio_driver/shimatta_sdio-driver.c b/FATFS/shimatta_sdio_driver/shimatta_sdio-driver.c index 858aeaf..0dc9e50 100644 --- a/FATFS/shimatta_sdio_driver/shimatta_sdio-driver.c +++ b/FATFS/shimatta_sdio_driver/shimatta_sdio-driver.c @@ -67,7 +67,7 @@ void SDIO_DMA_Init(){ DMASTREAM->CR = DMAM2P; //Address Conffiguration //Memory address is set by write and read block functions - //DMASTREAM->M0AR = (uint32_t)&rxtxbuffer; //Has to be set in red/write func + //DMASTREAM->M0AR = (uint32_t)&rxtxbuffer; //Has to be set in read/write func DMASTREAM->PAR = (uint32_t)&SDIO->FIFO; //Not sure if this works //DMASTREAM->CR |= DMA_SxCR_EN; @@ -80,10 +80,14 @@ void SDIO_InitModule(){ //Init Alternate Functions CLKPORT->MODER |= (2<MODER |= (2<PUPDR |= (1<MODER |= (2<PUPDR |= (1<MODER |= (2<PUPDR |= (1<MODER |= (2<PUPDR |= (1<AFR[(CLKPIN < 8 ? 0 : 1)] |= ALTFUNC << ((CLKPIN < 8 ? CLKPIN : (CLKPIN - 8)) * 4); SETAF(CLKPORT, CLKPIN, ALTFUNC); @@ -93,6 +97,8 @@ void SDIO_InitModule(){ SETAF(D2PORT, D2PIN, ALTFUNC); SETAF(D3PORT, D3PIN, ALTFUNC); #endif + + //Init Module //Set CLK Control Register @@ -177,7 +183,7 @@ int SDIO_send_CMD55(){ } int SDIO_send_ACMD41(){ - int retry = 0x200; + int retry = 0x20; if (SDIO_send_CMD55()) return -1; do {