2024-11-15 03:56 PM
I have a STMCubeMX project in which I've changed to 1ms tick in ThreadX. This shows the following from printf:
UX_PERIODIC_RATE=100
TX_TIMER_TICKS_PER_SECOND=1000
The attached STM32CubeMX project is ported from Ux_Device_CDC_ACM to run on the STM32H743I-EVAL board and migrated to STM32CubeMX 6.12.1
USART1 is used for printf output. USB_OTG_FS is set up for device cdc.
Started
UX_PERIODIC_RATE=100
TX_TIMER_TICKS_PER_SECOND=1000
*** MX_USBX_Device_Init ***
*** MX_USBX_Device_Init *** complete
*** USBX_APP_Device_Init ***
*** USBX_APP_Device_Init *** complete
*** usbx_cdc_acm_read_thread_entry ***
*** usbx_cdc_acm_write_thread_entry ***
*** USBD_CDC_ACM_Activate ***
*** USBD_CDC_ACM_Activate *** complete
*** USBD_CDC_VCP_Config ***
*** USBD_CDC_VCP_Config *** complete
UX_PERIODIC_RATE is defined in ux_port.h at line 133:
#ifndef UX_PERIODIC_RATE
#define UX_PERIODIC_RATE 100
#endif
It is also defined in ux_api.h at line 893:
#ifndef UX_PERIODIC_RATE
#ifdef TX_TIMER_TICKS_PER_SECOND
#define UX_PERIODIC_RATE (TX_TIMER_TICKS_PER_SECOND)
#else
#define UX_PERIODIC_RATE 100
#endif
#endif
This definition does not have any effect because ux_port.h is included earlier in ux_api.h at line 163:
#include "ux_port.h"
Solved! Go to Solution.
2024-11-19 04:03 AM - edited 2024-11-19 04:03 AM
Hi @ifemc
An internal ticket 196562 is submitted to dedicated team to review definition of UX_PERIODIC_RATE.
/* #define UX_PERIODIC_RATE (TX_TIMER_TICKS_PER_SECOND)*/
In ux_user.h, this line is commented because the UX_PERIODIC_RATE is not entered by User in CubeMX. I was expecting that generated code should have configure it without further modifications.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-19 04:03 AM - edited 2024-11-19 04:03 AM
Hi @ifemc
An internal ticket 196562 is submitted to dedicated team to review definition of UX_PERIODIC_RATE.
/* #define UX_PERIODIC_RATE (TX_TIMER_TICKS_PER_SECOND)*/
In ux_user.h, this line is commented because the UX_PERIODIC_RATE is not entered by User in CubeMX. I was expecting that generated code should have configure it without further modifications.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.