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.


Topics - fabius

Pages: [1]
1
Hello,

it seems to me, that an incorrect mask is used in the macro "_CONFIG_PORT_OUTPUT_FAST_HIGH" (uTasker 1.4.7 - kinetis.h)  to filter the relevant bits.
I think that  "GPIO##ref##_PDDR |= ((pins) & 0xffff);" needs to be changed to GPIO##ref##_PDDR |= ((pins) & 0xffff0000);.

The macro did not work with Keil until the value was changed.
Can you confirm this issue ?

Regards

Fabian

2
NXPTM M522XX, KINETIS and i.MX RT / PIT configuration failure (KDS)
« on: March 04, 2015, 03:29:53 PM »
Hello,

for an application with a Kinetis K64 Processor i need a PIT to trigger a periodic task.
A task executed, 5 seconds after startup, is used for the PIT configuration. But if i do not not power up the PIT module separately, the PIT is not startet.
With a breakpoint after POWER_UP(6, SIM_SCGC6_PIT);  / before the PIT_MCR register is written in "fnConfigureInterrupt" [kinetis.c], it works as well.

Without ececuting the power up sequence for the PIT, i need to clear the PIT_MCR_MDIS flag manually to start the PIT.

This error only does occur in a larger project, but not in a vanilla uTasker 1.4.7.

May there be a race condition ?
I attached a screenshot of the assembly code from the working and the non-working configuration.

Regards,

Fabian

Code: [Select]
static void timed_main_Task(void){
.... Code ....
}

extern void fnXSetupTask (TTASKTABLE *ptrTaskTable){
/*configure PIT  */
PIT_SETUP x_pit_setup;
x_pit_setup.int_type = PIT_INTERRUPT;
x_pit_setup.int_handler = timed_main_Task;
x_pit_setup.int_priority = X_PIT_PRIORITY;
x_pit_setup.count_delay = PIT_US_DELAY(104000);
x_pit_setup.mode = PIT_PERIODIC;
x_pit_setup.ucPIT = 0;
POWER_UP(6, SIM_SCGC6_PIT);
fnConfigureInterrupt((void *)&x_pit_setup);

}


3
Hello,

in my uTasker version (1.4) the preprocessor macro _CONFIG_DRIVE_PORT_OUTPUT_VALUE_FAST_HIGH uses the same bit shifting routine as in _CONFIG_DRIVE_PORT_OUTPUT_VALUE_FAST_LOW function to align the adress bits for the PORTx_GPCHR register. (kinetis.h)

PORT##ref##_GPCLR = (((pins) << 16) | (chars | PORT_MUX_GPIO)) is used in both functions.

Is the function correct or is there a defect in my version ?

I expected a function like PORTx_GPCHR = (((pins) & 0xffff0000) | chars | PORT_MUX_GPIO) there.

Regards

Fabian

Pages: [1]