Tool/software:
Greetings,
I'm still far away from the start of the project, but now it's the best time to have a good picture of how to approach the development.
As far as I have read in the AM62x academy, there is no way to have some sensors connected via, e.g. i2c or serial that can be managed by both core types (A and R) at the same time, I mean not really at the same time but sort of runtime switchable ownership (Device Manager).
For example let's make a scenario:
Linux boots, initializes all devices (DTB) and drivers, the remote core enabled, prepares and runs the firmware (control application) for the R (MCU) core, and runs the main application on Linux (A core). Let's call the main application on the A core and the control application (firmware) on the R (MCU) remote core. The main core has drivers for all i2c sensors, while the CANFD is connected directly to the MCU core and linux has no idea about it and both applications communicate via IPC (so the main application can read and write to CANFD through IPC and control application).
The control application (firmware) will be in C++/FreeRTOS and it will read/write to CANFD and exchanges information via IPC with the main application that do the data processesing.
In addition to CANFD running all the time, the control application (firmware) also has an inactive part of the code that should only be active when the processor needs to enter low power mode. In this mode (when the main A core shutted down), the MCU should take over the reading of the sensors connected to i2c and based on certain readings it should wake up the main A core, then release the i2c sensor and return to the main CANFD/IPC mode only, so the linux could continue running as nothing happens.
According to the AM62x academy Device Manager (the boss) is either A core or MCU (R) core, is it the only correct way to remove all sensors from the A core (remove from DTB) so that linux does not control any sensor and do all the control within the firmware (control application) and then through IPC exchange all information with the main A core, or is there another way to free up the sensors from the driver within linux before shutting down the A core, switch owership to the R (MCU) core and then, when waking up the main core, return the ownership back to the A core so the drivers can continue normal functioning?
Seems complicated, but then again, I want to build a device that will have all the bang and whistles while running on full power with linux drivers and all those comodities, and when the device stays on battery in power saving mode, control should be given to simple MCU that will rarely control some sensors (turn off power hungry main A core) and if some specific values are on sensors or data is received trough CANFD, the device go back to full bang and whistles.
Best regards,
Robert