µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: fabius on June 08, 2015, 03:48:56 PM
-
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
-
Hello Fabian
Indeed, the macro had the error that you identifed:
After correcting to
#define _CONFIG_PORT_OUTPUT_FAST_HIGH(ref, pins, chars) SIM_SCGC5 |= SIM_SCGC5_PORT##ref; PORT##ref##_GPCHR = (((pins) & 0xffff0000) | chars | PORT_MUX_GPIO); GPIO##ref##_PDDR |= ((pins) & 0xffff0000); _SIM_PORT_CHANGE; _SIM_PER_CHANGE // {65}
it is OK.
I didn't actually find the macro being used anywhere in the standard code, which tends to use _CONFIG_DRIVE_PORT_OUTPUT_VALUE_FAST_HIGH instead, which doesn't have the mask error.
During checking I verified that the other "FAST" macros are as they should be.
Thanks!!!
Mark