cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect UX_PERIODIC_RATE when TX_TIMER_TICKS_PER_SECOND has been set to 1ms

ifemc
Associate

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"

 

1 ACCEPTED SOLUTION

Accepted Solutions
FBL
ST Employee

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.


I'm out of offce with limited access to my emails.
Happy New Year!

View solution in original post

1 REPLY 1
FBL
ST Employee

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.


I'm out of offce with limited access to my emails.
Happy New Year!