Hi jeremyzhou,
thanks for the reply,
answering your questions:
1- to know that crashed after the function, I set up an LED on the board. And I can see that executes the code, but the impression I have is that run only once the main loop
3- I think the major difference is the MCU, i'm using kl27z256, and FRDM uses kl27z64, but at the same time I think that difference is only flash memory capacity. Obviously I have a whole set of hardware necessary for my project, but with reference to the CPU, this is the main difference.
I was checking out, and I noticed that the versions of the bootloader are different, this interferes?
FRDM:
command executed:
blhost.exe -u 0x15a2,0x0073 get-property 1
response:
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1258356992 (0x4b010100)
Current Version = K1.1.0
On my board:
command executed:
blhost.exe -u 0x15a2,0x0073 get-property 1
response:
Inject command 'get-property'
Response status = 0 (0x0) Success.
Response word 1 = 1258356736 (0x4b010000)
Current Version = K1.0.0
2- PE_low_level_init() is automatically generated from Processor Expert,to initialize added components
void Components_Init(void)
{
/*! lpTmr1 Auto initialization start */
OSA_InstallIntHandler(LPTMR0_IRQn, LPTMR0_IRQHandler);
LPTMR_DRV_Init(FSL_LPTMR1,&lpTmr1_State,&lpTmr1_lptmrCfg0);
LPTMR_DRV_InstallCallback(FSL_LPTMR1,lpTmr1_OnTimerCompare);
/*! lpTmr1 Auto initialization end */
/*! UART Auto initialization start */
OSA_InstallIntHandler(UART2_FLEXIO_IRQn, UART_IRQHandler);
UART_DRV_Init(FSL_UART,&UART_State,&UART_InitConfig0);
UART_DRV_InstallRxCallback(FSL_UART, UART_RxCallback, &dadoRX, NULL, true);
/*! UART Auto initialization end */
/*! PIT Auto initialization start */
OSA_InstallIntHandler(PIT_IRQn, PIT_IRQHandler);
PIT_DRV_Init(FSL_PIT,true);
PIT_DRV_InitChannel(FSL_PIT,FSL_PIT_CHANNEL,&PIT_256Hz);
PIT_DRV_StartTimer(FSL_PIT,FSL_PIT_CHANNEL);
/*! PIT Auto initialization end */
/*! hid1 Auto initialization start */
(void)USB_Class_HID_Init(USBFMW1_USB_CONTROLLER_ID, &hid1_HidConfigStructure, &hid1_HidHandle);
/*! hid1 Auto initialization end */
/*! SPI Auto initialization start */
SPI_DRV_MasterInit(FSL_SPI, &SPI_MasterState);
SPI_DRV_MasterConfigureBus(FSL_SPI, &SPI_MasterConfig0, &SPI_calculatedBaudRate);
/*! SPI Auto initialization end */
/*! ADC Auto initialization start */
ADC16_DRV_Init(FSL_ADC, &ADC_InitConfig0);
ADC16_DRV_ConfigConvChn(FSL_ADC, 0U, &ADC_ChnConfig0);
/*! ADC Auto initialization end */
/*! SPI_ADS Auto initialization start */
SPI_DRV_MasterInit(FSL_SPI_ADS, &SPI_ADS_MasterState);
SPI_DRV_MasterConfigureBus(FSL_SPI_ADS, &SPI_ADS_MasterConfig0, &SPI_ADS_calculatedBaudRate);
/*! SPI_ADS Auto initialization end */
/*! GPIO Auto initialization start */
OSA_InstallIntHandler(PORTCD_IRQn, GPIO_PORTC_IRQHandler);
GPIO_DRV_Init(GPIO_InpConfig0,GPIO_OutConfig0);
/*! GPIO Auto initialization end */
/*! pwrMan1 Auto initialization start */
OSA_InstallIntHandler(LLWU_IRQn, pwrMan1_llwuIRQHandler);
POWER_SYS_Init(powerConfigsArr, 2U, powerStaticCallbacksConfigsArr, 2U);
POWER_SYS_SetWakeupPin(kPowerManagerWakeupPin6, kLlwuExternalPinFallingEdge, NULL);
INT_SYS_EnableIRQ(LLWU_IRQn);
/*! pwrMan1 Auto initialization end */
/*! lpuartCom1 Auto initialization start */
OSA_InstallIntHandler(LPUART0_IRQn, lpuartCom1_IRQHandler);
LPUART_DRV_Init(FSL_LPUARTCOM1,&lpuartCom1_State,&lpuartCom1_InitConfig0);
LPUART_DRV_InstallRxCallback(FSL_LPUARTCOM1, lpuartCom1_RxCallback, &dado_gps_RX, NULL, true);
/*! lpuartCom1 Auto initialization end */
}