SPRAD62 February 2023 F29H850TU , F29H859TU-Q1 , TMS320F280023C , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280037C , TMS320F280037C-Q1 , TMS320F280038C-Q1 , TMS320F280039C , TMS320F280039C-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
Trigger bits allow the CPU enable or disable logic in the tile or to trigger a specific action. For example, a receiver enable bit can be implemented to selectively enable or disable receive logic in the CLB at run time. These trigger bits can be implemented using the CLB_GP_REG register.
The CLB_GP_REG bits can be directly connected to the eight CLB tile inputs. The CPU can set any bit in the CLB_GP_REG to trigger an action in the CLB logic. For example, a receiver enable/disable bit can be implemented to enable or disable receive logic in the CLB at run-time. An example of an enable/disable bit implementaion is shown in the following code block. The code block uses C2000ware driverlib.
#define GPREG_ENABLE_RCVR 3U
void CCSI_HAL_enableClbReceiver()
{
uint32_t gpRegVal = CLB_getGPREG(CCSI1_RX_TILE_BASE);
// First check that receiver is in IDLE state
while(HWREG(CCSI1_RX_TILE_BASE + CLB_LOGICCTL + CLB_O_DBG_OUT) &
(CLB_DBG_OUT_FSM0_S1 | CLB_DBG_OUT_FSM0_S0)) {}
// Enable receiver
gpRegVal |= (1U << GPREG_ENABLE_RCVR);
CLB_setGPREG(CCSI1_RX_TILE_BASE, gpRegVal);
}
void CCSI_HAL_disableClbReceiver()
{
uint32_t gpRegVal = CLB_getGPREG(CCSI1_RX_TILE_BASE);
// First check that receiver is in IDLE state
while(HWREG(CCSI1_RX_TILE_BASE + CLB_LOGICCTL + CLB_O_DBG_OUT) &
(CLB_DBG_OUT_FSM0_S1 | CLB_DBG_OUT_FSM0_S0)) {}
// Disable receiver
gpRegVal &= ~(1U << GPREG_ENABLE_RCVR);
CLB_setGPREG(CCSI1_RX_TILE_BASE, gpRegVal);
}