corrects time tick settings so that a timer tick happens every 10ms

This commit is contained in:
2026-02-03 21:22:49 +01:00
parent 39ffc7c743
commit fe168fc3d5
3 changed files with 5 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
#include "platform.h" #include "platform.h"
#define TICKNUM_PER_SECOND 32768 #define TICKNUM_PER_SECOND 32768
#define TICKNUM_PER_TIMER (TICKNUM_PER_SECOND / 1000) // ~ 1ms timer #define TICKNUM_PER_TIMER (TICKNUM_PER_SECOND / 100) // ~ 1ms timer
static inline int hwtimer_init(void) { static inline int hwtimer_init(void) {
uint64_t time = get_aclint_mtime(aclint); uint64_t time = get_aclint_mtime(aclint);

View File

@@ -130,7 +130,7 @@
Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */ Note: the actual hardware timer value may need to be changed (usually in tx_initialize_low_level). */
#define TX_TIMER_TICKS_PER_SECOND (33UL) // for moonlight with 32,7kHz Frequency (divided by 1000) #define TX_TIMER_TICKS_PER_SECOND (100) // for moonlight with 32,7kHz Frequency (divided by 1000)
/* Determine if there is a FileX pointer in the thread control block. /* Determine if there is a FileX pointer in the thread control block.

View File

@@ -134,7 +134,8 @@ void thread_0_entry(ULONG thread_input) {
NX_PARAMETER_NOT_USED(thread_input); NX_PARAMETER_NOT_USED(thread_input);
tx_thread_sleep(NX_IP_PERIODIC_RATE); /* Wait 1 second for the IP thread to finish its initilization. */
tx_thread_sleep(/* NX_IP_PERIODIC_RATE */ 10);
/* set the TCP server addresses. */ /* set the TCP server addresses. */
server_ipv4_address.nxd_ip_version = NX_IP_VERSION_V4; server_ipv4_address.nxd_ip_version = NX_IP_VERSION_V4;
@@ -234,7 +235,7 @@ void thread_1_entry(ULONG thread_input) {
NX_PARAMETER_NOT_USED(thread_input); NX_PARAMETER_NOT_USED(thread_input);
/* Wait 1 second for the IP thread to finish its initilization. */ /* Wait 1 second for the IP thread to finish its initilization. */
tx_thread_sleep(NX_IP_PERIODIC_RATE); tx_thread_sleep(/* NX_IP_PERIODIC_RATE */ 10);
/* Ensure the IP instance has been initialized. */ /* Ensure the IP instance has been initialized. */
status = nx_ip_status_check(&ip_1, NX_IP_INITIALIZE_DONE, &actual_status, NX_IP_PERIODIC_RATE); status = nx_ip_status_check(&ip_1, NX_IP_INITIALIZE_DONE, &actual_status, NX_IP_PERIODIC_RATE);