Hi, Robin
Thanks for your reply.
I tihnk this issue is on clock config, but I don't know hot to fix.
I had write a simple test projec and it is just te set 3 GPIO pins
The hardware init function (prvSetupHardware()) is written in main.c and listed as following:
However, a hardware fault will be occured during operation.
This program will be ok, if I active the port enable code (In the Bold font type change #if 0 to #if 1)
This test project is also shown in the attached file.
Could you call me how to fix this clock config issue. Thanks.
static void prvSetupHardware(void)
{
/* Initialize and configure clocks
* - Setup system clocks, dividers
* - see clock manager component for more details
*/
CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
#if 0
PCC-> PCCn[PCC_PORTB_INDEX] = PCC_PCCn_CGC_MASK; /* Enable clock to PORT B */
PCC-> PCCn[PCC_PORTE_INDEX] = PCC_PCCn_CGC_MASK; /* Enable clock to PORT E */
#endif
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0);
/* Initialize LPI2C Master configuration
* - Fast operating mode, 400 KHz SCL frequency
* - See LPI2C components for configuration details
*/
//PINS_DRV_WritePin(ENABLE_V_GPIO, ENABLE_V_PIN, 1); // Enable Power PTE10
//PINS_DRV_WritePin(ENABLE_BL_GPIO, ENABLE_BL_PIN, 1); // Enable Backlit PTE7
//PINS_DRV_WritePin(ENABLE_LCD_GPIO, ENABLE_LCD_PIN, 1); // Backlit PWM PTB12
return;
}