Hello.
I am using the TimerUnit_LDD and I enabled the ResetCounter method to generate it's code. I then dragged the ResetCounter method from the Component window on the right, on the drop-down list of the TimerUnit_LDD, to insert it in my code. This generated the following code:
ComponentName_ResetCounter();
With no arguments. However, when I try to build my code it returns the error "too few arguments to function ComponentName_ResetCounter". Hovering over the method in the Component Inspector, I see that this function requires the argument "LDD_TDeviceData *DeviceDataPtr" and that it is a "Device data structure pointer returned by Init method". However, looking through the code I can't seem to find what this data pointer value is.
I know this is a simple method which I could do on my own just assigning a 0 to the CNT register, but this data pointer seems to be necessary for other more complicated methods.
Does anyone have some reference as to what this pointer is?
Also, how can the EventMask values be set and used?
I am new to Processor Expert, so these are probably very basic questions.
Thanks.
解決済! 解決策の投稿を見る。
Hello,
you can find more details on method usage in the component´s help or in FSL info-center web:
Freescale Technical Information Center
Another way, that is not mentioned in the help, could be usage of the DeviceDataPtr defined in the component´s header file if Autoinitialization property is set to yes.
best regards
Vojtech Filip
Processor Expert Support Team
Hello.
Thanks for the reference.
Guess I wasn't looking close enough and missed that.
Thanks again.
Hello,
you can find more details on method usage in the component´s help or in FSL info-center web:
Freescale Technical Information Center
Another way, that is not mentioned in the help, could be usage of the DeviceDataPtr defined in the component´s header file if Autoinitialization property is set to yes.
best regards
Vojtech Filip
Processor Expert Support Team
Hello,
I have the same problem that Luis had, but I just cant figure out whats going on with my code.
Im using a TimerUnit to make 2 PWM signals, one on each channel (0 & 1), and I want to change the offset values by using SetOffsetTicks method.
My code is this one:
TU2_SetOffsetTicks(LDD_TDeviceData *DeviceDataPtr, uint8_t 0, TU2_TValueType 25000);
cause it didn't work I tried with this one:
TU2_SetOffsetTicks( LDD_TDeviceData *TU2_TDeviceDataPtr, uint8_t 0, TU2_TValueType 25000);
The errors that I get are these ones:
../Sources/Events.c: In function 'AS1_OnRxChar': //*****************Im trying to use this method (SetOffsetTicks) inside this Serial communication event but even if I try to use it in the main code I still get this.
../Sources/Events.c:101:26: error: expected expression before 'LDD_TDeviceData'
mingw32-make: *** [Sources/Events.o] Error 1
I have Auto initialization enabled.
How do I fix this?
Thanks in advance.
You seem to have incorrect syntax of the function call. The function needs to be called without the parameter type names.
Like this:
TU2_SetOffsetTicks(TU2_DeviceData, 0, 25000);
best regards
Petr Hradsky
Processor Expert Support Team