PWM issue with WinCE library 2.5

Hi,

I am trying to use PWM with Wince library (the latest 2.5) to manage screen backlight and I am facing issue.
With the latest library version, pwm_Demo don’t work, PWM isn’t modulated [Toradex Documents - Toradex Ce Libraries].
With demo code available in [https://docs.toradex.com/104917-pwmdemo-vs2015.zip], PWM is correctly modulated.

So, I guess there are an issue on latest WinCe library.

My configuration is
Colibri IMX6DL V1.1A
OS WEC2013 V1.6

Thanks for your help,

Could you please provide console output from pwmdemo example when it compiled with v2.5 library?

Hello,
I don’t have any specific output on debug console

System ready!
Preparing for download…
Loading compressed image…
Reading image from sector 40962.
Extracting 53069044 bytes from compressed image of 35927012 bytes

Done.
Launching image at 10200000.

Toradex Windows CE 8.0 1.6
for iMX6 Built on Dec 23 2019
Colibri iMX6 DualLite 512MB
Wait mode Disabled
SMP support enabled
CPU0 started
CPU1 started
RTC origin set to: 2006/01/01.
Registry - loading version 93 from 16386.
Registry loaded.
Loading GPIO Multiplexer…
Failed(0) Loading GPIO Multiplexer (1 ms)
Loading Clock…
GPU enabled.
DVFS not enabled.
Done Loading Clock (13 ms)
Loading SD Bus…
Done Loading SD Bus (0 ms)
Loading I2C1…
Done Loading I2C1 (2 ms)
Loading I2C2…
Done Loading I2C2 (1 ms)
Loading eMMC…
Done Loading eMMC (7 ms)
Loading Ethernet…
Ethernet: Disconnected
Done Loading Ethernet (176 ms)
Loading HDCP v6…
Done Loading HDCP v6 (0 ms)
Loading DHCP v4…
Done Loading DHCP v4 (0 ms)
Loading UARTA…
Port is used for OS debug!
Failed(0) Loading UARTA (1 ms)
Loading UARTB…
Done Loading UARTB (0 ms)
Loading UARTC…
Done Loading UARTC (1 ms)
Loading SPI1…
Done Loading SPI1 (1 ms)
Loading SPI2…
Multiplexing must be specified for non standard SPI port.
Failed(0) Loading SPI2 (4 ms)
Loading Image Processing Unit…
Done Loading Image Processing Unit (1 ms)
Loading 2D/3D Graphic Accelerator…
Done Loading 2D/3D Graphic Accelerator (81 ms)
Loading SD card…
*** EMMC supports TRIM operation*** 85
bEnableTrim = 1
Done Loading SD card (341 ms)
Loading external SD interface…
Failed(0) Loading external SD interface (1 ms)
Loading USB OTG…
Done Loading USB OTG (5 ms)
Ethernet: Connected at: 100Mbps full duplex
Loading USB OTG Host…
Done Loading USB OTG Host (33 ms)
Loading USB Host Controller…
Done Loading USB Host Controller (36 ms)
Loading PMIC…
Done Loading PMIC (3 ms)
Loading Audio…
Done Loading Audio (606 ms)
Loading iMX6 PCIE driver…
Failed(0) Loading iMX6 PCIE driver (1 ms)
Waiting for flash disk \Flashdisk for 30 seconds
Folder mounted
Loading Display…
IPU base driver is not loaded.
Graphic accelerator driver is not loaded!
GPU2D disabled.
Done Loading Display.
Turning display ON.
UnfdMutiTchDrv 2.0 loading…done
RTC reported oscillator failure
Invalid time on External RTC, please set a valid time
RTCSync: Completed.
SoftRTC disabled
WS2 server driver is not loaded!
Got a valid IP Address: 10.1.60.27
Debugger IP Address: 10.1.60.27
Display: 1024x600@60Hz PCLK: 52000000
Loading PP…
Done Loading PP (8 ms)
Loading NETUI…
Done NETUI

The pwmdemo.c has debug prints like
wprintf(L"Error in Pwm_Init()\r\n");

I’d like to see them. They should be printed in the window where you run pwmdemo.exe.

I don’t have any error message, see below the output

Toradex PWM demo
Press enter to exit

All pwm_ functions call are executed correctly but I have nothing on pin.

If I use exactly the same hardware but with PWM demo available in “How to use PWM Library” pin is correctly driven.

So I guess a regression in WinCe Toradex library.

Hi @mblac7,
I tested the pwm_demo inside the latest lib package (2.5) and it runs fine as I see see the pwm on my logic analyzer.
Can you please re-test it to be sure!.
Any changes you made in the demo ?

Hi @sahil.tx,

I re-tested and I confirm that Pwm_Demo_VS2015.sln without any changes (only deployed IP address) isn’t working on my setup.
This setup is:

  • colibri eval board rev 3.2
  • colibri imx6S v1.1A
  • BSP 1.6
  • an oscilloscope on SODIM pin 67

The same setup is working with pwmdemo_v1.0.sln (without any code changes) available in “How to use PWM Library” page.

If you use PWM_demo without any changes - it uses “PWM2” which is SODIM pin 28 by default.

If you wish to use pin 67 please find and replace

pwm = Pwm_Init(L"PWM2");

by

pwm = Pwm_Init(L"PWM4");

Hi @alex.tx

Your comment is a bit confusing for me, if I refer to Colibiri iMX6 Datasheet PWM2 is on SODIM 67


If I check pin with iMW6 GPIO tool, PWM2 is also on SODIM67.image
And pin 28 seems to be PWM1.

Anyway, if I use pin 28 has you mention, it is working with PWM2, so is it a specification issue ?