AnsweredAssumed Answered

Debugger terminates session in middle of initialization

Question asked by Juan Diego Scarini on Apr 9, 2018
Latest reply on Apr 12, 2018 by Juan Diego Scarini

Hi, My name is Juan and I'm having trouble with KDS and Processor Expert, in particular component BitIO_LDD.


I'm using FRDM_KL05Z for one project, i need to read some GPIO Pins, so I've decided to use the component of PE mentioned above. 


But, when I (or processor expert) initialize the component, it terminates automatically the debug session. I've debugged step by step and every time crashes in the middle of Init. Sometimes it even crash KDS IDE.


The function is: GPIO_DIR0_Init(DIR0);

And is defined: 


LDD_TDeviceData* GPIO_DIR0_Init(LDD_TUserData *UserDataPtr)
/* Allocate device structure */
GPIO_DIR0_TDeviceDataPtr DeviceDataPrv;

/* {Default RTOS Adapter} Driver memory allocation: Dynamic allocation is simulated by a pointer to the static object */
DeviceDataPrv = &DeviceDataPrv__DEFAULT_RTOS_ALLOC;
DeviceDataPrv->UserDataPtr = UserDataPtr; /* Store the RTOS device structure */
/* Configure pin as input */
/* GPIOA_PDDR: PDD&=~1 */
GPIOA_PDDR &= (uint32_t)~(uint32_t)(GPIO_PDDR_PDD(0x01));
/* Initialization of Port Control register */
/* PORTA_PCR0: ISF=0,MUX=1 */

// Terminates debug session when running next line
PORTA_PCR0 = (uint32_t)((PORTA_PCR0 & (uint32_t)~(uint32_t)(
)) | (uint32_t)(
/* Registration of the device structure */
return ((LDD_TDeviceData *)DeviceDataPrv);

Anyone have an idea on what can I do?