Stopping pwm clean

@ Gus: I digged this problem down to the smallest bit, and found a solution!

The problem is in the GHI firmware!

In short: PWM0TCR must be set to 0x09 instead of 0x01 (which the GHI firmware does now), bit3 must be set to enable the shadow register stuff. (See page 640 of the NXP LPC24xx datasheet)

When I set that bit through RLP, my PWM test works flowless!

E-mail me if you need details.

I had a feeling that you will crack it! You need to change your forum name to “RLP guru” or something ;D ;D

I love these kind of problems!

The next step was: carefully open the NXP and use my microscope to follow the wires :wink:

[quote]The next step was: carefully open the NXP and use my microscope to follow the wires
[/quote]

Make sure you post pictures of that!

Coolness. Thanks Wouter. Will this fix be scheduled for next beta? tia

I have actaully seen the results of that process :o

Several years ago we were touring Siemens Dematic’s location in Atlanta Georgia. They were able to carefully slice open ICs after they had been soldered to check for problems. They did this to diagnose problems their customers had with component failures. They had done a job right before we were there to find out why an IC was failing during the board manufacturing process. They found the problem was indeed in the IC as the leads on the dies were becoming unbounded. The IC manufacturer insisted it was the process but they were able to prove that even when the manufacturers guidelines were followed the IC would fail (and were the failure was.) Very cool stuff…

And very expensive :slight_smile:

Or may be sneak it in with the fix for system update bug that crawled into latest release? :wink:

Received Saleae Logic today and just wanted to test this issue with it. It also showed the issue plainly. 90deg holding position was 1.61525ms as shown in first period. Final command chops the last period to 0.55675ms causing the final unwanted servo position (i.e. jitter).

@ William,

I was just thinking about ordering the Saleae Logic 8 channels analyser ! :smiley:
What do you think of it ? It this the one pictured below ?

Thank you in advance for your opinion :stuck_out_tongue:

I picked up on a few weeks ago. Previously I had borrowed a very nice 4 channel 500 mHz Tektronix mixed signal scope. After 5 minutes with the Saleae I could accomplish more things than a week with the Tek. The software is awesome, very easy to use, no wonder they can get by with such a small manual as it all just seems to make sense.

I made an adhoc review here.

I don’t have experience with other devices to compare to. But in general, I think has very good overall design integration and simple and quick to use. SW is good and easy. Few minor bumps in terms of UX, but nothing should stop anyone. Had I had this 2 weeks ago, I would have found this issue in a few minutes instead of trying to track it down with visual test cases. Think very worthy to keep in the tool box.

I wonder if they thought far enouph ahead when making hw that can eventually make a signal generator.
Have not tried the SDK yet, but could make your own UX in c# if you needed something special which adds even more to appeal.

If this is the issue behind the PWM glitch is there a fix in the works or a good workaround?

Thanks, David

My understanding is that this only happens rarely when changing the dutycycle and the glitch does not affect servos… Chris and others are using servos with no issues.
No fix is currently planned but we can look into it in future.

By the way, anyone can implement their own custom PWM drivers using RLP or register access.

I was seeing the issue with a bright LED light that I was slowly changing the brightness on to get a nice pulsating effect. But the PWM issue is causing occasional flickers which messes up the artistic effect.

I looked through the RLP process and it’s a bit more work than I want to undertake at the moment. Is the PWM via register access something that can be done easily from C#?

It should be possible to implement your own setpulse method in C# with the Register class in Hardware.Lowlevel in GHI library.

I met the problem with servo motors too. I was slowly incrementing the duty cycle to make the servo move slowly from one position to another, and at some point, with no apparent reason, the servo was moving a big step backward. I would be happy too to get an update on the PWM class :wink:

This is something than cab be improved in 4.2 with the new added features.

Ok, I’ll investigate using the Register class for PWM and see how that turns out.

Thanks,
David