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.
GPIO pin values that are set to HIGH (1) get reset to LOW (0) immediately after being assigned to CPU2 using the function GPIO_setMasterCore(pin, GPIO_CORE_CPU2). For example with GPIO33 (although I observed the same behavior on other GPIOs as well):
1) on CPU1 I setup GPIO33 for GPIO_CORE_CPU1 with GPIO_DIR_MODE_OUT and GPIO_PIN_TYPE_STD with output value of 1 and GPIO_QUAL_SYNC
2) I call GPIO_setMasterCore(GPIO33, GPIO_CORE_CPU2)
3) GPIO33 is now 0?? (observed through GPxDAT reg)
What happened between step 1 and 3 that resets the GPIO value? Since it's a floating output is the value lost or somehow reset to 0 as soon as it changes master cores from CPU1 to CPU2? This doesn't seem to be documented anywhere, could use some clarification. Ideally I would like the GPIO value to persist when changing master cores. Thanks!
The GPIO_setMasterCore() function writes to a GPIO GPyCSEL1-4 "Core Select Register", which is documented as selecting which master's GPIODAT/SET/CLEAR/TOGGLE registers control this GPIO pin in TMS320F2837xD Dual-Core Microcontrollers Technical Reference Manual (Rev. I) :
And the following shows that CPU1, CPU1.CLA, CPU2 and CPU2.CLA each have their own set of GPySET/GPyCLEAR/GPyTOGGLE/GPyDAT (W) registers
Therefore, when the Core Select Register is used to change which master controls the GPIO pin if the GPyDAT registers have different values on each CPU then the pin will change state.
I believe you can write to GPyDAT on CPU2 before switching the pin owner to CPU2 to latch the value that you want it to drive when the switch is made.
Whitney