app_main and APP_CPU

JoaoLopesF
Posts: 59
Joined: Thu Aug 17, 2017 5:40 pm

app_main and APP_CPU

Postby JoaoLopesF » Fri Sep 29, 2017 3:33 pm

Hi,

I have a question:

How to change app_main and all app code to run in APP_CPU (without FreeRTOS task), instead the default PRO_CPU,
if ESP32 is dual core ?

Its is possible, or have any reason to app_main stay in PRO_CPU ?

Regards

Joao Lopes

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: app_main and APP_CPU

Postby WiFive » Fri Sep 29, 2017 9:51 pm

app_main is already inside freertos task so not sure why you want to avoid a new task pinned to cpu1

JoaoLopesF
Posts: 59
Joined: Thu Aug 17, 2017 5:40 pm

Re: app_main and APP_CPU

Postby JoaoLopesF » Sat Sep 30, 2017 4:42 pm

WiFive wrote:app_main is already inside freertos task so not sure why you want to avoid a new task pinned to cpu1
Hi WiFive, I agree that, and after I post it, I migrate all code in app_main to an task in CPU 1, and works very well
but a question still in the air, what app_main is not in cpu 1, the APP_CPU ?
I think for novices, including me, it is confuse.

Thanks for response

Regards

Joao Lopes

ESP_Sprite
Posts: 9025
Joined: Thu Nov 26, 2015 4:08 am

Re: app_main and APP_CPU

Postby ESP_Sprite » Sun Oct 01, 2017 2:08 am

This is because effectively, APP_CPU and PRO_CPU are legacy names, from back when the ESP32 was envisioned as an AMP processor (a processor which runs two entirely separate programs, with only limited interaction between the two). When we switched to SMP, the processors effectively became interchangable, but because the nomenclature already was in everything (register sets, startup code, ...) we decided it was easier to just keep it.

JoaoLopesF
Posts: 59
Joined: Thu Aug 17, 2017 5:40 pm

Re: app_main and APP_CPU

Postby JoaoLopesF » Mon Oct 02, 2017 2:54 pm

Hi ESP_Sprite,

Thanks for this response

Regards

Joao Lopes

Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 135 guests