This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello,
I'm creating a flash kernel for TMS320F28377D. I already created one for TMS320F280039C. It is written to another flash bank of that device and works normally. The application branches to that project after getting a specific message. But it redos all the initialization procedure from the scratch, live Device_init() etc.
Now the main project for TMS320F28377D is a lot more complex than that, so I really don't want to do initializations from the scratch, since the project uses both cores and shared RAMs etc.
My question is that can I keep using the initializations from the main project when it branches to the kernel project? Would branching to the BEGIN of another project mess with my initialized peripherals?
Thanks in advance.
Hi Ege,
When branching to another part of Flash memory, if branching to the kernel project, would you not need to reset/power up the Flash pump as a part of this initialization? I'm assuming that all initializations are taken care of in the application project first before the branch to the kernel project.
Branching to the BEGIN of another project without re-initializing should not affect the previous project's initialized peripherals.
Thanks and regards,
Charles
Hey Charles,
Actually I think I would do all the necessary initialization part for kernel like powering up Flash pump, writing the Flash API code to RAM etc. after branching. But I don't want to mess with rest of them like SCI and such. Would that still work?
Thanks, regards.
Ege
Hi Ege,
Is the previous application using SCI prior to branching to the kernel? If so and the SCI bootloader is still communicating for another process, I don't see it timing out. If the SCI bootloader timeouts after a successful file download, then yes you would have to re-initialize it. I'll need to confirm with the SCI experts if this behavior is valid.
Thanks and regards,
Charles
Hello Charles,
Yes that is true, my main application uses SCI and that is why I'm concerned for this matter, because I want to keep using it after branching to my kernel and designed my whole process on that.
So I can try to explain my main flow like this:
- In the main project, both CPU1 and CPU2 are in use. CPU2 handles communication through SCI port.
- The kernels will be seperate for CPU1 and CPU2 and will in different parts of Flash in their respective cores.
- When CPU2 gets a specific command, it will raise a flag in shared RAM and branch to its kernel. After seeing this flag, CPU1 will also branch to its kernel.
- Then CPU2 will start receiving data for the new version of the application for CPU1. Will use a different shared RAM to relay these data.
- After it is done, CPU2 will start receiving data for its own and write to its own Flash. When both be done, after a power cycle I expect them to run the new version of their applications.
So if I can use the initializations from before, I can directly use already initialized SCI to receive data and the ownerships of shared RAMs can be decided during the main application. Also SCI is operating using RS422, so I need to preserve the states of drive enable and receive enable pins.
Thanks and regards.
Ege
Hi Ege,
Some of my team is out due to weather related incident. Will be able to provide a clearer response in the coming days.
Thanks and regards,
Charles
Hi Charles,
Thank you for the update. I'm sorry to hear about the weather-related incident and hope everyone is safe. Please take the time you need, and I look forward to your response in the coming days.
Best regards,
Ege
Hi Ege,
Have received feedback that the initialization from before should stay (barring a branch to code that re-inits the clock configuration and/or SCI settings changing).
Thanks and regards,
Charles
Hey Charles, thanks for the clarification. That cleared a huge question mark for me.
Thanks, regards.
Ege