PE component TimerUnit_LDD and argument error TU1_OnCounterRestart() into cpu.c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PE component TimerUnit_LDD and argument error TU1_OnCounterRestart() into cpu.c

Jump to solution
737 Views
MarkP_
Contributor V

Hi,

Created TU1:TimerUnit_LDD (FTM0) and four PWM components PWM1..PWM4 to it.

The generated code in cpu.c causes build error:

void TU1_OnCounterRestart(void)
{
  TU1_OnCounterRestart3();             /* Call a shared event. This event is generated into PwmLdd4 module */
  TU1_OnCounterRestart2();             /* Call a shared event. This event is generated into PwmLdd3 module */
  TU1_OnCounterRestart1();             /* Call a shared event. This event is generated into PwmLdd2 module */
  TU1_OnCounterRestart0();             /* Call a shared event. This event is generated into PwmLdd1 module */
}

The functions TU1_OnCounterRestartx() requires argument, can be fixed by change:

void TU1_OnCounterRestart(void *x)
{
  TU1_OnCounterRestart3(x);             /* Call a shared event. This event is generated into PwmLdd4 module */
  TU1_OnCounterRestart2(x);             /* Call a shared event. This event is generated into PwmLdd3 module */
  TU1_OnCounterRestart1(x);             /* Call a shared event. This event is generated into PwmLdd2 module */
  TU1_OnCounterRestart0(x);             /* Call a shared event. This event is generated into PwmLdd1 module */
}

Is this (known) PE bug or is my PE configuration wrong?

Build errors and warnings:

Description Resource Path Location Type
function call 'TU1_OnCounterRestart1()' does not match 'TU1_OnCounterRestart1(void *)' Cpu.c /proj_eval/Generated_Code line 121 C/C++ Problem
function call 'TU1_OnCounterRestart0()' does not match 'TU1_OnCounterRestart0(void *)' Cpu.c /proj_eval/Generated_Code line 122 C/C++ Problem
function call 'TU1_OnCounterRestart2()' does not match 'TU1_OnCounterRestart2(void *)' Cpu.c /proj_eval/Generated_Code line 120 C/C++ Problem
function call 'TU1_OnCounterRestart3()' does not match 'TU1_OnCounterRestart3(void *)' Cpu.c /proj_eval/Generated_Code line 119 C/C++ Problem
mingw32-make: *** [Generated_Code/Cpu_c.obj] Error 1 proj_eval    C/C++ Problem


Mismatch between the condition and the previous IT instruction dispatch.S /proj_eval/MQXLITE/psp/cortex_m/core/M4 line 841 C/C++ Problem
Warning: Referenced TimerUnit "TU1" contains another channel that is not used by "PwmLdd1". This channel(s) may be affected by method Enable/Disable of component "PwmLdd1". proj_eval  PwmLdd1 Processor Expert Problem
Warning: Referenced TimerUnit "TU1" contains another channel that is not used by "PwmLdd2". This channel(s) may be affected by method Enable/Disable of component "PwmLdd2". proj_eval  PwmLdd2 Processor Expert Problem
Warning: Referenced TimerUnit "TU1" contains another channel that is not used by "PwmLdd3". This channel(s) may be affected by method Enable/Disable of component "PwmLdd3". proj_eval  PwmLdd3 Processor Expert Problem
Warning: Referenced TimerUnit "TU1" contains another channel that is not used by "PwmLdd4". This channel(s) may be affected by method Enable/Disable of component "PwmLdd4". proj_eval  PwmLdd4 Processor Expert Problem

CW version is 10.4 Special Edition, other information:

/* ###################################################################
**     THIS COMPONENT MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
**     Filename    : Cpu.c
**     Project     : ProcessorExpert
**     Processor   : MK10FN1M0VLQ12
**     Component   : MK10FN1M0LQ12
**     Version     : Component 01.000, Driver 01.04, CPU db: 3.00.000
**     Datasheet   : K10P144M120SF3RM, Rev. 2, Dec 2011
**     Compiler    : CodeWarrior ARM C Compiler
**     Date/Time   : 2013-08-22, 10:14, # CodeGen: 28
**     Abstract    :
**
**     Settings    :
**
**     Contents    :
**         No public methods
**
**     Copyright : 1997 - 2013 Freescale Semiconductor, Inc. All Rights Reserved.
**     SOURCE DISTRIBUTION PERMISSIBLE as directed in End User License Agreement.
**    
**     http      : www.freescale.com
**     mail      : support@freescale.com
** ###################################################################*/
/*!
** @file Cpu.c
** @version 01.04
** @brief
**

~Mark

Labels (1)
0 Kudos
1 Solution
455 Views
Petr_H
NXP Employee
NXP Employee

Hi,

Unfortunately, this is a known bug that has been identified short time ago. We are working on the fix.

The only workaround for now is to modify the code as you did or avoid sharing the same TimerUnit by more PWM components.

Another option would be to use the TimerUnit_LDD directly, define there channels and control the pulse width of individual channes  by using the SetOffsetTicks  TimerUnit_LDD method.

best regards

Petr Hradsky

Processor Expert Support Team

View solution in original post

0 Kudos
1 Reply
456 Views
Petr_H
NXP Employee
NXP Employee

Hi,

Unfortunately, this is a known bug that has been identified short time ago. We are working on the fix.

The only workaround for now is to modify the code as you did or avoid sharing the same TimerUnit by more PWM components.

Another option would be to use the TimerUnit_LDD directly, define there channels and control the pulse width of individual channes  by using the SetOffsetTicks  TimerUnit_LDD method.

best regards

Petr Hradsky

Processor Expert Support Team

0 Kudos