Page 1 of 1

"Driver Initiation Tasks"

Posted: Thu Nov 09, 2017 7:56 pm
by Gfast2
Hi ESP-IDF,

since I posted many questions here. Sometimes I just wunder, how many things I still not clear! :o
(I'm a Arduino hobbist & Javascript Developer).

Right now I'm hanging around to merge some of the examples shipped with ESP-IDF.
I did got some issues. Most of them get fixed pretty quick, some of them really depends on my luck of the day though :arrow: :|

Since I need to control some GPIO, Use WIFI/Ethernet , And event need to access SD card. And all of them need actually at their task beginning do some "Driver/Interface/Call Stack Initialization Jobs". How... What is the best practice to do them in the best way for ESP32?

  • 1. Should I define a extra Task called say "driverMountBatchTask", and let all the driver initializations in a much controllable way?
    ----The Original Problem I think, is that, I figured out the initialization of SD card driver and ETH one can not happen at the same time.
    2. If I use CPU core0 to initialize a spefific driver for something. The whole calling mechanisum of this driver would be always happend on that core? How the tasks that calls these drivers. Are they have to be pinToCore to its responding cores as their drivers for their jobs does?
    ----Some nestet task creation are some how ignored by freeRTOS, I'm still bug-shooting these miserable issues

Re: "Driver Initiation Tasks"

Posted: Fri Nov 10, 2017 6:10 am
by kolban
I'm not sure I see the problem. If you are using subsystems A, B and C and they all need initialized, why not initialize them one after the other in a serial fashion:

Code: Select all

void myInit() {
   initSubsystemA();
   initSubsystemB();
   initSubsystemC();
}

Re: "Driver Initiation Tasks"

Posted: Wed Nov 15, 2017 9:00 am
by Gfast2
kolban wrote:I'm not sure I see the problem. If you are using subsystems A, B and C and they all need initialized, why not initialize them one after the other in a serial fashion:

Code: Select all

void myInit() {
   initSubsystemA();
   initSubsystemB();
   initSubsystemC();
}
Thanks Kolban,

I solve the really mysterious problem here. All the problem started from here.

cheers

Gfast2