Image
Image

junpeng324

+ 关注

粉丝 8     |     主题 37     |     回帖 1130

F407 初始化SD卡
2021-1-29 21:05
  • 雅特力AT32 MCU
  • 35
  • 1251
  void SD_DMA_Config(u32*mbuf, u32 bufsize, u32 DMA_DIR) { DMA_InitType DMA_InitStructure; RCC_AH ...  
  u8 convert_from_bytes_to_power_of_two(u16 NumberOfBytes) { u8 count = 0; while(NumberOfBytes != ...  
  SD_Error ChangeSpeed(u8 speed) { SD_Error errorstatus = SD_OK; u8 SwitchSts[64]; if (speed > ...  
  SD_Error FindSCR(void) { u32 index = 0; SD_Error errorstatus = SD_OK; u32 *tempscr; tempscr ...  
  SDCardState SD_GetState(void) { u32 resp1 = 0; if(SD_SendStatus(&resp1) != SD_OK) { retur ...  
  SD_Error SD_SendStatus(u32 *pcardstatus) { SD_Error errorstatus = SD_OK; if(pcardstatus == NULL ...  
  SD_Error IsCardProgramming(u8 *pstatus) { vu32 respR1 = 0, status = 0; SDIO_CmdInitStructure.S ...  
  SD_Error SD_Switch(u32 mode, u32 group, u8 value, u8 *resp) { SD_Error errorstatus = SD_OK; u8 p ...  
  SD_Error MMC_Switch(u8 set, u8 index, u8 value) { SD_Error errorstatus = SD_OK; u32 cardstatus = ...  
  SD_Error SDEnWideBus(u8 enx) { SD_Error errorstatus = SD_OK; u8 arg = 0X00; if(enx) { a ...  
  SD_Error CmdResp6Error(u8 cmd, u16*prca) { SD_Error errorstatus = SD_OK; u32 status; u32 rspr1 ...  
  SD_Error CmdResp5Error(u8 cmd) { u32 status; while(1) { status = SDIO1->STS; if(stat ...  
  SD_Error CmdResp4Error(u8 cmd) { u32 status; while(1) { status = SDIO1->STS; if(stat ...  
  SD_Error CmdResp2Error(void) { SD_Error errorstatus = SD_OK; u32 status; u32 timeout = SDIO_CM ...  
  SD_Error CmdResp3Error(void) { u32 status; while(1) { status = SDIO1->STS; if(status ...  
  SD_Error CmdResp1Error(u8 cmd) { u32 status; while(1) { status = SDIO1->STS; if(stat ...  
  SD_Error CmdResp7Error(void) { SD_Error errorstatus = SD_OK; u32 status; u32 timeout = SDIO_CM ...  
  SD_Error SD_ProcessIRQSrc(void) { if(SDIO1->STS & (1 INTCLR |= 1 INTEN &= ~((1  
  SD_Error MMC_StreamWrite(u8 *buf, long long addr, u32 tlen) { SD_Error errorstatus = SD_OK; u8 c ...  
  SD_Error MMC_StreamRead(u8 *buf, long long addr, u32 tlen) { SDIO1->DTCTRL = 0x0; //数据控制寄存器 ...  
2
3
近期访客