STM32F769I EVAL: Why camera stop streaming when creating a JPEG file into SD card?
Hello everyone.
Sorry for post this question again. But I really need some help.
I am trying to write a program can take picture from camera and save it into SD card when I press a button.
I had finish this, but it had one problem. I don't know why but the program stop after created one picture into SD card.
I had found the cause is because "f_open" command. I try to run program like this below.
..........
..........
Start camera and display on LCD---
loop{
->wait for the button was pressed.
if(FATFS_LinkDriver(&SD_Driver, SDPath) == 0) {
if(f_mount(&SDFatFs, (TCHAR const*)SDPath, 0) == FR_OK) {
f_open(&JPEG_File, "image.jpg", FA_WRITE || FA_CREATE_ALWAYS);
f_close(&JPEG_File);
}
}
} (end loop)
The camera stop even I didn't do anything. Just creating JPEG file and closing it.
Trying to understand the f_open() function, I think it's related to the line "stat = disk.drv[pdrv]->disk_initialize(disk.lun[pdrv]);" into the function disk_initialize() of diskio.c.
When I ignore this line, camera didn't stop. But I still really don't understand what happened.
Anyone know about this problems, please tell me. Why the camera is stop when I create JPEG file, and what should I do for dealing with this problem.
Sorry for my English. Thanks so much.
