"Driver Initiation Tasks"

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

"Driver Initiation Tasks"

Postby Gfast2 » Thu Nov 09, 2017 7:56 pm

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: "Driver Initiation Tasks"

Postby kolban » Fri Nov 10, 2017 6:10 am

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();
}
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Re: "Driver Initiation Tasks"

Postby Gfast2 » Wed Nov 15, 2017 9:00 am

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

Who is online

Users browsing this forum: No registered users and 140 guests