From 0dc9f0330cac9bfc67dd5f1ee151849de6a5beb3 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Tue, 9 Sep 2025 00:47:24 +0200 Subject: [PATCH] increase irq frequency (now every 10us). --- avr/modules/com2w/com2wi2.asm | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/avr/modules/com2w/com2wi2.asm b/avr/modules/com2w/com2wi2.asm index cf90c5c..f6208e9 100644 --- a/avr/modules/com2w/com2wi2.asm +++ b/avr/modules/com2w/com2wi2.asm @@ -15,20 +15,20 @@ .equ COM2WI_BUFFER_SIZE = NET_BUFFERS_SIZE-1 -.equ COM2WI_R_MAX_WAIT_HI_TIME = 50 ; max 1ms -.equ COM2WI_S_MAX_WAIT_HI_TIME = 50 ; max 1ms -.equ COM2WI_S_MAX_WAIT_LO_TIME = 50 ; max 1ms +.equ COM2WI_R_MAX_WAIT_HI_TIME = 100 ; max 1ms +.equ COM2WI_S_MAX_WAIT_HI_TIME = 100 ; max 1ms +.equ COM2WI_S_MAX_WAIT_LO_TIME = 100 ; max 1ms -.equ COM2WI_W_MAX_WAIT_BUSFREE = 50 ; max 1ms +.equ COM2WI_W_MAX_WAIT_BUSFREE = 100 ; max 1ms -.equ COM2WI_STATETIMER_W_BYTEHOLDCLOCKLOW = 1 ; 20 us -.equ COM2WI_STATETIMER_W_BITHOLDCLOCKLOW = 1 ; 20 us -.equ COM2WI_STATETIMER_W_BITSETDATA = 1 ; 20 us -.equ COM2WI_STATETIMER_W_BITHOLDCLOCKHIGH = 1 ; 20 us -.equ COM2WI_STATETIMER_R_WAITFORCLOCKHIGH = 50 ; 1 ms -.equ COM2WI_STATETIMER_R_WAITFORCLOCKLOW = 50 ; 1 ms -.equ COM2WI_STATETIMER_S_WAITFORCLOCKLOW = 50 ; 1 ms +.equ COM2WI_STATETIMER_W_BYTEHOLDCLOCKLOW = 2 ; 20 us +.equ COM2WI_STATETIMER_W_BITHOLDCLOCKLOW = 2 ; 20 us +.equ COM2WI_STATETIMER_W_BITSETDATA = 2 ; 20 us +.equ COM2WI_STATETIMER_W_BITHOLDCLOCKHIGH = 2 ; 20 us +.equ COM2WI_STATETIMER_R_WAITFORCLOCKHIGH = 100 ; 1 ms +.equ COM2WI_STATETIMER_R_WAITFORCLOCKLOW = 100 ; 1 ms +.equ COM2WI_STATETIMER_S_WAITFORCLOCKLOW = 100 ; 1 ms .equ COM2WI_STATE_IDLE = 0 @@ -159,6 +159,7 @@ COM2WI_Init: .if COM_PORTS >2 mCOM2WI_INIT 2 .endif + .if COM_PORTS >3 mCOM2WI_INIT 3 .endif @@ -166,6 +167,7 @@ COM2WI_Init: .if COM_PORTS >4 mCOM2WI_INIT 4 .endif + .if COM_PORTS >5 mCOM2WI_INIT 5 .endif @@ -173,6 +175,7 @@ COM2WI_Init: .if COM_PORTS >6 mCOM2WI_INIT 6 .endif + .if COM_PORTS >7 mCOM2WI_INIT 7 .endif @@ -330,8 +333,8 @@ com2wiSetupTimer1: ldi r16, (0<