Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Raffaele

Pages: 1 ... 3 4 [5]
61
Thank you Alex. The other, I think is the build option nr. 5 in KDS

62
Hi still 2 quick questions about this. Where do I find the following two (RAM use in menu 5 and map file)?

Looking at the RAM use (in menu 5 - "memory") it looked still critical:
You will need to check the map file to see what is consuming static memory and disable as much as possible

63
Hey Mark,
no need to upload the bin file. It was a matter of resources. I disabled SUPPORT_ADC, RTC.. and it's working.

Still a few questions about the PWM:

1) is it possible to set the voltage amplitude of the PWM signal?
2) would it be possible to use a secondary task that changes the parameters of the PWM during operation? Say I have TASK1 that generates the PWM and then during operation a TASK2 stops the TASK1, changes the parameters of the PWM and generates it again with the new parameters. Would this work?
3) How do I choose the PREASCALER if the PWM frequency and duty cycle are both very low - 2 or 3 Hz but the duty cycle of 0.2ms?

Thanks a lot for your support

64
Hi Mark,
yes all the parameters are set correctly. I followed all the steps in this video: https://www.youtube.com/watch?v=K8ScSgpgQ6M&feature=youtu.be
But the code still does not operate, the LED doesn't blink at 2.5Hz (I tried again with new code).

Your .bin files work on my boards (both LED and PWM are correct) so the hardware is ok. At this point it is obviously a problem of my config

The only doubt is about the linker, the correct name should be KL_32_2.ld and not KL_32_2_BM.ld, correct?

I also ran the simulation. From
\uTasker-Kinetis-master\Applications\uTaskerV1.4\Simulator
I launched the file uTaskerV1-4 in Visual Studio, and the simulator shows the blinking LED!

65
Hi,
I'm having some problems with running simple tasks for the FRDM-KL03.

1)
As a first step I tried something very simple: adding a fnDebug("Hello World!"); in the file Watchdog.c before the function fnRetriggerWatchdog();
I followed the guide to build the project (did it for FLASH).
Opened the terminal for serial communication at baud rate 19200
Copied the .bin file created in "Applications\uTaskerV1.4\KinetisDesignStudio\uTaskerV1.4_FLASH" to the board.

But nothing is printed to the terminal.
I also built the project in Visual Studio and set a breakpoint in the Watchdog.c file to be sure the function is reached, and yes it is.


2)
I tried to create my own task. Following the  guide (http://www.utasker.com/docs/uTasker/uTaskerV1.4_user_guide.PDF   chapter 5):
I created my .c file with a function that generates PWM signals:



Code: [Select]
#include "config.h"

extern void fnTaskMyPWM(TTASKTABLE *ptrTaskTable){
    PWM_INTERRUPT_SETUP pwm_setup;
    pwm_setup.int_type = PWM_INTERRUPT;
    pwm_setup.int_handler = 0;                                           
    pwm_setup.pwm_mode = (PWM_CLOCK | PWM_PRESCALER_16);
    pwm_setup.pwm_frequency = PWM_FREQUENCY(20000, 16);
    pwm_setup.pwm_reference = (_TIMER_0 | 0);
    fnConfigureInterrupt((void *)&pwm_setup);
    pwm_setup.pwm_reference = (_TIMER_0 | 1);                            // timer module 0, channel 1
    fnConfigureInterrupt((void *)&pwm_setup);                           
    pwm_setup.pwm_reference = (_TIMER_1 | 0);                            // timer module 0, channel 1
   // pwm_setup.pwm_frequency = PWM_TIMER_US_DELAY(TIMER_FREQUENCY_VALUE(20), 4);// generate 20000Hz on PWM output
    pwm_setup.pwm_reference = (_TIMER_1 | 1);                            // timer module 1, channel 0
    fnConfigureInterrupt((void *)&pwm_setup);                           
    pwm_setup.pwm_value   = _PWM_PERCENT(50, pwm_setup.pwm_frequency);   // 50% PWM (high/low)
    fnConfigureInterrupt((void *)&pwm_setup);   
}

I launch the task from TaskConfig.c with
Code: [Select]
{"x", fnTaskMyPWM, NO_QUE, (DELAY_LIMIT)(2 * SEC), 0, UTASKER_GO},However I can't see any PWMs on PA0, PB5, PB10 or PB11.
I also tried to generate only 1 signal at the time instead of 4, but nothing.

Pages: 1 ... 3 4 [5]