Re: [riot-devel] PWM API change

2016-03-20 Thread Hauke Petersen
Hej, I think my datasheet was from the TM4C123GH6PZ, I thought this is just the re-branded lm4f120xl... While the base timer clock speed is not configurable, the timer does have a pre-scale register, right? Can't we use that to change the timers freq? If not, I would say just adapt the freq

Re: [riot-devel] PWM API change

2016-03-19 Thread Marc
Hi Yes, that would be great. Should I implement it in a PR, or has someone something against this ? Marc On 2016-03-17 00:47, DipSwitch wrote: Welcome! It might also be an idea to create something like: #ifndef HAS_PWM_RES_T typedef uint16_t pwm_res_t #endif Which can be overridde

Re: [riot-devel] PWM API change

2016-03-19 Thread DipSwitch
Welcome! It might also be an idea to create something like: #ifndef HAS_PWM_RES_T typedef uint16_t pwm_res_t #endif Which can be overridden by the CPU implementation. This way 8bit timers can use 8bit values and 32bit timers 32bit. Cheers, Nick _

Re: [riot-devel] PWM API change

2016-03-19 Thread Marc
Hey, Thank you for taking the time to try to help me solve my problem :) The thing is that on the ek-lm4f120xl board, it's a lm4f120... The DS you are referring to seems to be lm4f232 (or similar). I'm using the lm4f120h5qr-124014.pdf as a reference. The main reason I can see this is that ther

Re: [riot-devel] PWM API change

2016-03-19 Thread Hauke Petersen
Hej Marc, this seems like a pretty broken design to me, who knows what TI was thinking... Anyway, by looking at the datasheet, I think that the solution to this problem in this case is to map the values given via the RIOT PWM interface to internal values that make the PWM behave as expected.

Re: [riot-devel] PWM API change

2016-03-19 Thread Hauke Petersen
Hi, I have to say that I don't quite understand the problem with the 16-bit max here. Is the timer on the lm4f120 limited to it's prescalers? For applications like controller servo motors 16-bit is normally still more than sufficient... So I think the key here lies in the PWM implementation,

Re: [riot-devel] PWM API change

2016-03-18 Thread Marc
Hi, Maybe you're right... PWM on lm4f120 is done by configuring a timer for which there's no real prescaler and a match value that gives the duty cycle. The timer is 16bits, but can be extended to 20bits if needed. The timer is clocked by the system, so there's no way to fix a resolution and

Re: [riot-devel] PWM API change

2016-03-18 Thread Marc
On 2016-03-18 12:01, Hauke Petersen wrote: Hej, I think my datasheet was from the TM4C123GH6PZ, I thought this is just the re-branded lm4f120xl... While the base timer clock speed is not configurable, the timer does have a pre-scale register, right? Can't we use that to change the timers freq?

[riot-devel] PWM API change

2016-03-07 Thread dkm_riotos
Hi! I'm cleaning a local port for lm4f120 and making new PR. I see that a recent commit changed/cleaned the PWM API. One of the changes includes limiting the resolution to 16bits (it was an int before, so 32bits in my case). Is there a motivation for limiting the value to 16bits ? In my case, the