AnsweredAssumed Answered

PE generated RTC_Enable(NULL) issue

Question asked by Neil Hancock on Oct 23, 2014
Latest reply on Oct 24, 2014 by Neil Hancock

I seem to have come across an issue in KDS 1.1.0 with RTC_LDD component.

Am I missing something?


My target is MK20DX50 on FRDM-K20D50, and I've add component RTC_LDD.

It requires the RTC1 to be enabled, and in ComponentInspector.Methods, I click Enable - GenerateCode

The code it generates in RTC1.c looks like it is cut and pasted from another module and can;t work.

If I use RTC1_Enable(NULL); then it will use the NULL pointer without checking it.

If I try and create a  RTC1_TDeviceDataPtr its not declared in an available .h file


Instead I use


which works.



LDD_TError RTC1_Enable(LDD_TDeviceData *DeviceDataPtr) {

  RTC1_TDeviceDataPtr DevDataPtr = (RTC1_TDeviceDataPtr)DeviceDataPtr;


  /* Device clock configuration test - this test can be disabled by setting

     the "Ignore speed mode test" property to the "yes" value in the "Configuration inspector" */

  if (!DevDataPtr->EnMode) {           /* Is the device disabled by user? */

    return ERR_SPEED;                  /* If yes then error */



  return ERR_OK;