; ;------------------------------------------------------------------------------------------- SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) SIODEBUG .set TRUE ; SIO: ENABLE DEBUG OUTPUT ; SIO0MODE .SET SIOMODE_EZZ80 ; SIO 0: CHIP TYPE: SIOMODE_[RC|SMB|ZP|EZZ80] ; SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0ADIV .SET 1 ; SIO 0A: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO0ACFG .SET SER_19200_8N1 ; SIO 0A: SERIAL LINE CONFIG ; SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0BDIV .SET 1 ; SIO 0B: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO0BCFG .SET SER_19200_8N1 ; SIO 0B: SERIAL LINE CONFIG ; ; SIO1MODE .SET SIOMODE_EZZ80 ; SIO 1: CHIP TYPE: SIOMODE_[RC|SMB|ZP|EZZ80] ; SIO1ACLK .SET 1843200 ; SIO 1A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO1ADIV .SET 1 ; SIO 1A: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO1ACFG .SET SER_19200_8N1 ; SIO 1A: SERIAL LINE CONFIG ; SIO1BCLK .SET 1843200 ; SIO 1B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO1BDIV .SET 1 ; SIO 1B: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO1BCFG .SET SER_19200_8N1 ; SIO 1B: SERIAL LINE CONFIG ;
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ;----------------------------------------------------------------------------------------------------------------- SIODEBUG .SET FALSE ; SIO: ENABLE DEBUG OUTPUT SIOCNT .SET 1 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP SIO0MODE .SET SIOMODE_EZZ80 ; SIO 0: CHIP TYPE: SIOMODE_[RC|SMB|ZP|EZZ80] SIO0CTCC .SET -1 ; SIO 0: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE SIO0BASE .SET $80 ; SIO 0: REGISTERS BASE ADR SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0ADIV .SET 1 ; SIO 0A: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO0ACFG .SET SER_19200_8N1 ; SIO 0A: SERIAL LINE CONFIG SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0BDIV .SET 1 ; SIO 0B: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO0BCFG .SET SER_19200_8N1 ; SIO 0B: SERIAL LINE CONFIG ; SIO1MODE .SET SIOMODE_EZZ80 ; SIO 1: CHIP TYPE: SIOMODE_[RC|SMB|ZP|EZZ80] SIO1CTCC .SET -1 ; SIO 1: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE SIO1BASE .SET $84 ; SIO 1: REGISTERS BASE ADR SIO1ACLK .SET 1843200 ; SIO 1A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO1ADIV .SET 1 ; SIO 1A: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO1ACFG .SET SER_19200_8N1 ; SIO 1A: SERIAL LINE CONFIG SIO1BCLK .SET 1843200 ; SIO 1B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO1BDIV .SET 1 ; SIO 1B: SERIAL CLOCK DIVIDER, RC2014/SMB=1, ZP=2/4/8/16/32/64/128/256 (X5) SIO1BCFG .SET SER_19200_8N1 ; SIO 1B: SERIAL LINE CONFIG ;-----------------------------------------------------------------------------------------------------------------
;------------------------------------------------------------------------------------------------ CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ;
SIODEBUG .SET FALSE ; SIO: ENABLE DEBUG OUTPUT
SIOCNT .SET 1 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP
SIO0MODE .SET SIOMODE_STD ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP]
SIO0BASE .SET $80 ; SIO 0: REGISTERS BASE ADR ; SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800
SIO0ACFG .SET SER_19200_8N1 ; SIO 0A: SERIAL LINE CONFIG SIO0ACTCC .SET 0 ; SIO 0A: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE
; SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800
SIO0BCFG .SET SER_19200_8N1 ; SIO 0B: SERIAL LINE CONFIG SIO0BCTCC .SET 1 ; SIO 0B: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE
Wayne,I have pulled the dev branch and configured what I could find for the CTC.I am somewhat confused by the very simple CTC enable - but nothing else in the cfg_scz180.asm relative CTC addressing. What are the assumptions and how are they configured? I looked at CTC.asm and it seems to be a 50 Hz timer configuration that utilizes A/B or C/D CTC channels - depending on which "production" board you are using. I am not using a production board - tit is similar to the EZZ80 implementation. That seems to be now called STD in your selectors.
I assume that SIO0ACTCC is intended to select the CTC Channel (A,B,C,D) that feeds the SIO Port A, B, etc.. Is this correct? I am thrown by the terminology in the comment.
I can configure my CTC and SIO chips as follows:SIO 0x80 or 0x84CTC 0x88 or 0x8C
I have made the following assumptions that are not correlated to the code or actual operation, yet.For SIO at 0x80, corresponding CTC is at 0x88?For SIO at 0x84, corresponding CTC is at 0x8C?
Thanks for your help and guidance!!JimSCZ180_126.asm snippet...;------------------------------------------------------------------------------------------------ CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM) ; SIODEBUG .SET FALSE ; SIO: ENABLE DEBUG OUTPUT SIOCNT .SET 1 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP SIO0MODE .SET SIOMODE_STD ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP] SIO0BASE .SET $80 ; SIO 0: REGISTERS BASE ADR ; SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0ACFG .SET SER_19200_8N1 ; SIO 0A: SERIAL LINE CONFIG SIO0ACTCC .SET 0 ; SIO 0A: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE ; SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800 SIO0BCFG .SET SER_19200_8N1 ; SIO 0B: SERIAL LINE CONFIG SIO0BCTCC .SET 1 ; SIO 0B: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE
The board I am using has the interrupt chain pass through the CTC and SIO in a typical fashion. And the CTC A and B are connected to the corresponding SIO clocks for A and B.
SIOnxDIV - can SIO0ADIV be used to FORCE the SIO divider instead of using the internal calculations you use?
Build: SC126The RomWBW 3.0.1 SIO configuration, when configured for 1.8432 MHz clock and 19200 Baud is calculating a 64 divisor which is not the same as the divisor being calculated for RomWBW 2.9.2.pre32 with the same parameters - .pre32 installs 16 as the divisor.
I use a CTC device to feed the SIO/0 or SIO/2 clocks. Unfortunately, when 64 is instilled into the SIO, my baud options are limited to 9600 or less.I tried to search all changes to SIO.ASM and was not successful in isolating a change that would affect the divisor calculation. But I am a git noob and it may be there in actuality ;-)
I am currently using a utility to set up the CTC A and B for the two SIO channels that are COM2 and COM3 on the SC126.I will develop another utility to manually set the SIO registers next.
Just curious why I am getting different results with these builds for SIO divisor setting and wondering if I can hard wire the divisor using SIO0ADIV, SIO0BDIV, etc?
I am very happy with the other beneficial changes found in 3.0.1. Really great work on your part to maintain such a "heavy" implementation that addresses so much hardware. Phenominal, actually. Gutsy.
For reference, the only differences in the configurations are that in the 3.0.1 setup, I limit the SIO discovery to a single chip and the 3.0.1 addition of a CTCC parameter, which I am not using (-1).The SIO is addressed per EZZ80 nets and is configured to 0x80 base. The CTC is fed via a 1.84320 mHz clock.
When the CTC Counter is /6 on the 2.9.2.pre32 build, I can clock the SIO A or B port to 19,200. the CTC clock is 307.202 kHz.307202 / 16 = 19200.When the CTC Counter is /3 on the 3.0.1 build, the CTC clock is 614.404 kHz.614404 / 64 = 9,600When the CTC Counter is /6 on the 3.0.1 build, the CTC clock is 307.202 kHz307202 / 64 = 4,800
I have tested the setups using a Kermit4.11 client built for CPM3 and a Linux C-Kermit Server. When the Baud rates are set according to the data above, everything works.
I assume that my configuration settings are misleading the algorithm on 3.0.1.
#IF (INTMODE == 2) #IF (CPUFAM == CPU_Z180) ; Z180-BASED SYSTEMS INT_INT1 .EQU 0 ; Z180 INT 1 INT_INT2 .EQU 1 ; Z180 INT 2 INT_TIM0 .EQU 2 ; Z180 TIMER 0 INT_TIM1 .EQU 3 ; Z180 TIMER 1 INT_DMA0 .EQU 4 ; Z180 DMA 0 INT_DMA1 .EQU 5 ; Z180 DMA 1 INT_CSIO .EQU 6 ; Z180 CSIO INT_SER0 .EQU 7 ; Z180 SERIAL 0 INT_SER1 .EQU 8 ; Z180 SERIAL 0 INT_PIO0A .EQU 9 ; ZILOG PIO 0, CHANNEL A INT_PIO0B .EQU 10 ; ZILOG PIO 0, CHANNEL B INT_PIO1A .EQU 11 ; ZILOG PIO 1, CHANNEL A INT_PIO1B .EQU 12 ; ZILOG PIO 1, CHANNEL B INT_SIO0 .EQU 13 ; ZILOG SIO 0, CHANNEL A & B INT_SIO1 .EQU 14 ; ZILOG SIO 1, CHANNEL A & B #ELSE ; Z80-BASED SYSTEMS INT_CTC0A .EQU 0 ; ZILOG CTC 0, CHANNEL A INT_CTC0B .EQU 1 ; ZILOG CTC 0, CHANNEL B INT_CTC0C .EQU 2 ; ZILOG CTC 0, CHANNEL C INT_CTC0D .EQU 3 ; ZILOG CTC 0, CHANNEL D INT_SIO0 .EQU 7 ; ZILOG SIO 0, CHANNEL A & B INT_SIO1 .EQU 8 ; ZILOG SIO 1, CHANNEL A & B INT_PIO0A .EQU 9 ; ZILOG PIO 0, CHANNEL A INT_PIO0B .EQU 10 ; ZILOG PIO 0, CHANNEL B INT_PIO1A .EQU 11 ; ZILOG PIO 1, CHANNEL A INT_PIO1B .EQU 12 ; ZILOG PIO 1, CHANNEL B #ENDIF
Wayne:
I am giggling like a little girl here... ;-// A few hours? I have been so involved with Safety Critical Avionics development and certification that nothing happens in a couple of hours! Weeks is normal. Days for crude protos without safety testing. Now I am working in retirement doing Hybrid Fiber-Optic Transceiver design where the software is a few thousand SLOC. Bare die stuff. I have it memorized it is so compact..
;
Hi Jim,OK, well some progress.The panic does not imply an interrupt was generated. Do you have some other reason to believe an interrupt caused this?
Which serial port is Kermit server running on? If you are saying that you can PIP data out of a serial port, but when Kermit sends data out of the same port the system panics, that is very odd.
I want to be clear. You can send and receive data over the serial port, but any attempt to do a file transfer over the same serial port causes this panic?
Well, it is not cabling.Problems repeat themselves after reboots or resets - not every time, but most of the time. Have tried reprogramming the CTC after boot for 3.1pre.4. No joy. I have not tried to reprogram the SIO after boot. It is a shame that Zilog decided you just don't need to read back certain registers after writing them. I see PANICs with the "INT" text embedded as well.I reverted back to 2.9.2pre32 and I get reliable behavior. Every reboot or reset. I have to program the CTC using the tool and it just works.Using Kermit-80 as a terminal to the PC running TeraTerm is the test case tool set.For now I am going back to 2.9.2 build and write the tool for setting up SIO and CTC after boot. I need to get past this for now.I am concerned about programming the SIO and CTC using the system bus clock of 18 MHz and I believe 1 ws. My layout is somewhat "long" on the paths. Perhaps 3.1pre.4 has some different timings vs 2.9.2 regarding the programming of the SIO or CTC. Perhaps there is more time between writes. In my case, the SIO and CTC parts are both 8 MHz rated parts.If I make any discoveries, I will be sure to pass them on even though they may be limited to just my case.
I am going to try some testing on my SC126. I will see how close I can come to recreating your setup.
I have a logical path forward. Once I am sure the sc126 mezzanine card SIO/CTC combo works, I can explore RomWBW 3.1 and whether programming the chips on my board are sensitive to faster writes, etc.
Enjoy the weekend.
Cheers
Jim