Other Parts Discussed in Thread: C2000WARE
I am running a piece of code that uses an SPI module to get readings from sensors. The SPI data transaction, even when optimised takes considerable time.
I want to write a piece of code that uses the IPC module to trigger the SPI data transaction on CPU2 and then send the data back through to CPU1 where it is used in the ISR running on CPU1.
Currently, my code is structured as follows:
Main code (CPU1)
--------------------------
* Setup GPIOs
* Setup peripherals (SPI, ADC ePWM, etc...)
* Setup ISR (triggers every ePWM carrier period)
ISR
---------------------------
* Read sensor data
* Read current
* Execute control algorithm
* Acknowledge ISR, enabling further interrupts
I had a few questions to how I'd be able to do this. It seems as though I can't set up GPIOs on CPU2?