Search found 29 matches

by Joerg-SH
Tue Aug 20, 2013 9:38 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

Thanks a lot, with Your help I get it work.

Joerg
by Joerg-SH
Tue Aug 13, 2013 8:40 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

Now I spent again some time to understand the sample.
Basically, I understand the structure of the program. But there are connections that I do not really understand. I would have to understand the whole structure of each function. For that I would need days or weeks, I think. I can only say again ...
by Joerg-SH
Mon Aug 12, 2013 11:51 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

This all are ok, but for understanding is a sample / code snipe very helpful. I know that well from the Compiler i used fore Years (Bascom) :oops:
by Joerg-SH
Mon Aug 12, 2013 11:28 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

I visit that side, I think I have a generally problem understand the syntax
by Joerg-SH
Mon Aug 12, 2013 11:07 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

Ok i have ordered a book... I hope is good and coming soon... ChibiOS/RT - Lambert M. Surhone

Do You know that book?
by Joerg-SH
Mon Aug 12, 2013 10:53 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

Ok I think that did I understand.

and the other question?

why I have to configure ICU with "lastwide" and lastperiod" ???


Joerg
by Joerg-SH
Mon Aug 12, 2013 10:26 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

Yes but why I have to configure ICU with "lastwide" and lastperiod" ???


static void icuwidthcb(ICUDriver *icup) {
last_width = icuGetWidth(icup);
}

static void icuperiodcb(ICUDriver *icup) {
last_period = icuGetPeriod(icup);
}


static ICUConfig icucfg = {
ICU_INPUT_ACTIVE_HIGH,
10000 ...
by Joerg-SH
Mon Aug 12, 2013 8:01 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

ok I forget to do that.

then I only need that? And how I will get periodic ?

Sorry I still works more right than wrong with StdLibs from ST and chibios is absolutely different for me.
by Joerg-SH
Mon Aug 12, 2013 7:01 am
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

I think this I need?

static ICUConfig icucfg = {
ICU_INPUT_ACTIVE_HIGH,
10000, /* 10kHz ICU clock frequency. */
icuwidthcb,
icuperiodcb,
NULL,
ICU_CHANNEL_1
};


but this is called by


icucnt_t last_width, last_period;

static void icuwidthcb(ICUDriver *icup) {

palSetPad(GPIOD ...
by Joerg-SH
Sun Aug 11, 2013 6:04 pm
Forum: STM32 Support
Topic: STMF4 get frequency of a signal on a input pin.
Replies: 28
Views: 20195

Re: STMF4 get frequency of a signal on a input pin.

I did not understand how to use only ICU

In the sample pwm and icu is mixed. There is no simple ICU sample available ???