I'm seeing similar things here. Sometimes a file is written and sometimes it hangs in the SDIO driver.
A quick look shows that for some reason the IRQ prio isn't set (or I can't find it)
You can put it in the app init function for testing: NVIC_InitStructure.NVIC_IRQChannel = SDIO_IRQChannel; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);
Perhaps Timer2 causes some problems here as well (also in USB MS). I haven't tried disabling Timer2.. will do that asap
FS_WriteFile(&file_info,header, &i, strlen(header)); DRAW_DisplayString(0,10,header,strlen(header)); } I'd like to write the header on my file but it doesn't works on my primer 2
When i comment the test function it works but when i use it, TEXT2 file is created but it cannot be open and the application crashes. Do you think it's a problem of SDCard? I use CircleOS 3.6 too