Hi,
using CW 10.3 I'm trying to configure my application to use ADC and PWM on the same pin.
I don't know if pin sharing has a limitation in my case.
I read the documentation and I know I should set the two conflicting components one as "main"
and the other as "shared", for the Pin Sharing feature to be enabled (Component Inspector Tab
in EXPERT mode).
The problem is I don't know how to set a component as shared.
Could you explain me how to do it, please?
Best regards,
FP
This one might help as it shows how to share a component between the BitIO and the Init component:
Tutorial: Bits and Pins with Kinetis and the FRDM-KL25Z Board | MCU on Eclipse
Hi Erich and thanks for the quick reply.
In the linked tutorial, you had no problem enabling the Pin Sharing feature on the conflicting pin.
In my case, the feature in the dropdown menu is not active and I suppose the problem is the main/shared selection.
However, in the tutorial you didn't do anything about it.
Any thoughts?
P.S.
I'm developing on a MC9S08PT60.
Currently I cannot add two components that share a pin, as the pin sharing function is not active,
and I have not found a way to do so.
I couldn't try to set up a project per the K60 as proposed in the cheat sheets, since my CW supports only
S08 e RS08 mcus. Maybe the sharing feature is not configurable for such mcus.
Any piece of information/advice on this matter is kindly accepted. :smileyhappy:
FP
I was working with CW 10.3 Special Edition so I tried the Classic one. Same behaviour on the PT60 (adc + pwm).
Having installed also the Kinetis related files, I tried to build up a project for the K60 with PE and your procedure works, that is the "Pin Sharing Enabled" entry in the pin menu is active and selectable (case of two BitIO_LDDs on the same pin).
Sadly, the same procedure does not work in case of the PT60 (both in the Classic and the Special Edition).
Is this behaviour expected? Are there any other step to perform to accomplish this task? Could this be a misbehaviour?
I can attach my *.pe configuration if needed, although is easily reproducible (it needs only two conflicting components).
Good week end and
Best regards,
FP
Hello,
could you please provide more details about your use case? Are you sure that it is possible to share ADC and PWM functionality on the selected pin at the same time? The *.pe file would be helpful too.
best regards
Vojtech Filip
Processor Expert Support Team
Thank you for the feedback, Filip.
Luckily, my board designer had one more pin so I can have separate functions.
I also tried to share adc device between pin and that is another limitation.
Anyway, especially for the 32-pin package, being able to share pin (and devices, like adc)
is essential cause designers tend to blindly multiplex functionalities.
Thanks for the advice of trasferring generated as user code.
Hello,
let me understand your use case closer. You want to share the ADC and PWM (FTM) pin. In case you need to measure - the ADC is enabled and PWM (FTM) functionality is disabled. In case the PWM (FTM) is active, ADC is disabled. Am I correct?
I have searched through the RM but I cannot find any chapter describing the sharing between ADC and PWM (FTM) at the same time.
best regards
Vojtech Filip
Processor Expert Support Team
It is my fault to be not so clear.
I do not have to use ADC and PWM at the same time.
I do not also have to perform two different ADC channels acquisition at the same time.
Nevertheless, PE doesn't allow me to configure:
ADC and PWM components on the same pin (conflict on pin - pin sharing enabled menu entry "disabled")
ADC1 and ADC2 on different pins (conflict on device - PE says that ADC device is not to be shared)
In the end, I want to underline the fact that I have absolutely no problem with my current board.
If the developers could enhance S08 family with such sharing features, would be great.
Cheers,
FP