Loading to two CPUs on F28379D and using the same GPIOs... CPU2 seems to be a 'master' and 'takes over' GPIOs?
2 views (last 30 days)
Show older comments
Hi,
I have loaded a code to CPU2 (rectangular pulse signal with a duration
and frequency
on GPIO31 and GPIO34). On the oscilloscope, I can see the signals.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483808/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483813/image.png)
When I load a different code to CPU1 (rectangular pulse signal with a duration
(
) and frequency
(
) on GPIO31 and GPIO34 (same GPIOs!)) I can still see the signals from CPU2. Additionally, on CPU1 I am sending a rectangular pulse signal to GPIO28 and can see it on the oscilloscope, so I know the code is running, but as if CPU2 has 'taken over' shared GPIOs?!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483818/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483823/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483828/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483833/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483918/image.png)
I have tried to reset the CPUs in Code Composer Studio, but after "CPU Reset", is still runs a CPU2 code.
- How to 'release' GPIOs from CPU2?
- What exactly happened when I loaded the code on CPU2 and CPU1 using the same GPIOs. Why didn't the last one (CPU1) overwritten the signals sent to GPIOs? Is CPU2 master and CPU1 slave?
- Is there an option to format CPUs from Simulink, i.e. delete everything and make them as from the factory? I tried compiling and loading an empty Simulink model, but it does not allow to compile an empty sheet.
As a way forward I have created a dummy code and loaded to the CPU2. This seems to do the trick and 'release' shared GPIOs. But I am not sure if this is the right solution.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/483923/image.png)
Thank you in advance
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!