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"

 

0 REPLIES 0