Phatline Posted March 14, 2021 Report Share Posted March 14, 2021 i have trouble by initize my SD, Card, in sense of i copy big Files multiple times... and that fails when making a freertos Function for it.... or by adding it into one of the standart Functions like "Background" or by making a new Function in the Program loop... Because of the SD-Card reacts to slow, the files to big, to much of the files.... i already avoidet all "for loops", and copy one file after a nother once a Program-loop-cycle.... when i put the copy function into the "app_init" it is functional, but of course the display is Black -feeled forever- until the program starts the first time... so the user may think the device has failed... what makes me think, of an second App_init Like Function, which is only performed once, and which attribut is: it can run forever, and when its done, MIOS runs without it. but maybe i have not understand some basics again... Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted March 15, 2021 Report Share Posted March 15, 2021 How about multitasking? In app_init you could create a thread/task that updates the user interface and screen and which is responsive, directly after app start. Then, you could create another "heavy lifting" task that does calculations/sd card operations etc as needed by your app. That task will probably need mutex locks, but can do the copy operations in the background while you can show the progress "on screen" in the first task. Best regards, Peter Quote Link to comment Share on other sites More sharing options...
Phatline Posted March 16, 2021 Author Report Share Posted March 16, 2021 thx realized that i can print LCD-Messages in the APP_init itself... -- now i entertain the user a bit with some progress. i have put the heavy copy file thing into the App_init itself (512x84Kb files), this is working now, since i realized that i has only 2,2V on the SD-Card... which was a faulty core PSU.... now its working like a glance. while a SSD1306 is working with no probs on 2,2V a SD-Card is not - good now i know that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.