61
NXPTM M522XX, KINETIS and i.MX RT / Re: First steps into uTasker and generating PWM from my task
« on: June 01, 2018, 05:47:31 PM »
Thank you Alex. The other, I think is the build option nr. 5 in KDS
Nov 2020: uTasker i.MX RT V1.4.12 is productive - with complete secure loading concept.
Follow uTasker updates at www.twitter.com/uTasker !!
Online Forum registration has now been disabled. Please send an email to an address at the bottom of the home page with your preferred user name and email address if you would like an account.
Return to uTasker main site: www.utasker.com
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.
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
#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);
}
{"x", fnTaskMyPWM, NO_QUE, (DELAY_LIMIT)(2 * SEC), 0, UTASKER_GO},
However I can't see any PWMs on PA0, PB5, PB10 or PB11.