Hi,
I have program from example application - ftm_pwm_s32k144. I set frequency at 1000HZ in flexTimer. I would like to change frequency every 100HZ by using Sw2 and SW3 buttons. How Can i do it? I defined in my program this buttons and what should I do next? Could you help me, do you have similar code or advice?
Regards
Mike
解決済! 解決策の投稿を見る。
I have answered you under your other questions.
BR!
Jim,
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi, Mike
I give you a hint.
1.How to change PWM frequency?
please refer to example "ftm_signal_measurement_s32k144 "
2.How to use SW1 or SW2.
please refer to example "power_mode_switch_s32k144"
In this example,SW3 was used to wake up the CPU from power mode.
/* Interrupt service routine for SW3 */
void ButtonISR(void)
{
/* Clear button IRQ flag */
PINS_DRV_ClearPortIntFlagCmd(PORTC);
}
or you just keep reading SW(I/O) status without using interrupt.
pins_channel_type_t PINS_DRV_ReadPins(const GPIO_Type * const base)
BR!
Jim,
Hi,
what's wrong with this code? Could you help me? Where are mistakes? I don't understand. I would like to this code generate digital square signal - 1000hz frequency. By using sw2 and sw3 buttons I would like to change frequency. If I pushed once for example sw2 button frequency should increase about 100HZ. Could you correct my mistake in this code? I will be very grateful.
I have answered you under your other questions.
BR!
Jim,
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------