Hi Alessandro,
Let me answer your questions first then I will add a comment or two.
Q1) In the fsl_hwtimer1.h file generated by PEx the macro FSL_FSL_HWTIMER1_PERIOD_CNF0 is set to 5000: I think the systick timer period in microseconds is set with this macro, right?
A1) No and yes ;-). No that the this is not the correct method to modify the systick timer period and yes it is a MACRO PE generates. But for MQX it is not used! Go figure...
Q2) Is manually changing that macro the only way to get the desired systick period for MQX RTOS component ?
A2) The answer would be yes if the macro were used...but it is not for MQX. If it were being used by MQX then you could have manually changed it and then disabled the fsl_hwtimer from Code Generation by right clicking the component and saying "Don't write Generated Component Modules". But since this macro is not used you don't need to do that.
Q3) The MQX RTOS component also inherits one UART as debug console.
What if my custom board has no available UART to assign as debug console?
A3) when you use KSD/KSDK+PE and select MQX as the RTOS, you want to remove the fsl_debug_console Component as it is not needed with MQX. Then in the wizard for the MQX_KSDK Component, have the Inherited components debug console select "KSDK 1.3.0/fsl_uart". You can then configure that fsl_uart Component to use whatever UART you want.
Comment:
No idea why PE wouldn't be used to change the systick value. Maybe next release of KDS/KSDK will allow that.
To change the systick to 1ms do the following:
In bsp_config.h make the following modifications:
#ifndef BSP_ALARM_FREQUENCY
#define BSP_ALARM_FREQUENCY (1000) //DES was (200)
#endif
/*
* HWTimer period
*/
#ifndef BSP_ALARM_PERIOD
#define BSP_ALARM_PERIOD (1000) //DES was (5000)
#endif
Do a clean, re-compile, then debug.
Regards,
David