AnsweredAssumed Answered

stm32f103  sdio problem

Question asked by vahid javadi on Jun 11, 2018
Latest reply on Jun 12, 2018 by Clive Two.Zero

Hi 

i use stm32f103rct6 for w/r sd card but it not work exactly , it just work once and dont work again . i look to logic analyzer and i think it not  work true . what can i do ?

 my code :

 

if (f_mount(&myFat,SDPath, 1) == FR_OK) {
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3,GPIO_PIN_SET);
res=1;
f_open(&fil,"javvah2.txt",FA_WRITE|FA_CREATE_ALWAYS);
f_write(&fil,"xxxx hellow world",20,&byteCount);
f_close(&fil);
}else{
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_4,GPIO_PIN_SET);
f_open(&fil,"javvah2.txt",FA_WRITE|FA_CREATE_ALWAYS);
f_write(&fil,"xxxxhellow worldzzzz",20,&byteCount);
f_close(&fil);
}

Attachments

Outcomes