I seem to be unable to activate the second async serial port on a XC161CJ.
There's hardly any difference between both ports and "ASC0" runs fine.
But whatever I do, "TXD1" will not transmit anything.
Does anyone have any experience with programming this port?
These are my settings:
ASC0_FDV = 0x016f;
ASC0_BG = 0x0006;
ASC0_CON = 0x8811;
ALTSEL0P3 |= 0x0c00;
P3 = (P3 & ~(uword)0x0800) | 0x0400;
DP3 = (DP3 & ~(uword)0x0800) | 0x0400;
ASC1_FDV = 0x016f;
ASC1_BG = 0x0006;
ASC1_CON = 0x8811;
ALTSEL0P3 |= 0x0003;
P3 = (P3 & ~(uword)0x0002) | 0x0001;
DP3 = (DP3 & ~(uword)0x0002) | 0x0001;
Now, if I write a value to "ASC0_TBUF" it comes out of pin "TXD0" serially.(don't bother about interrupts)
If I do the same with "ASC1_TBUF" nothing happens.
I can write a value to the pin itself, so physically there's nothing wrong.
What am I missing???
we did discuss this problem in thread2879.htm and it is solved now,
since we initiated a setup of two help documents.
( last entry in discussion was 06/13/03 if you are interested )
For a more detailed explanation have a look at:
where the first document answers this problem in general and second one is related to use ASC1 directly in µVision2 simulator/debugger.
At this way "many thanks to HS from the KEIL support team again for a very excellent well done job"
Hope this helps, otherwise let me know than I will send you the source for simulator/debugger and if necessary the code for ASC1 via direct writing the buffer too.
have you make sure that ASC1DIS in SYSCON3 is set to zero ?
Oh yes this important, what Rolfs says.
The ASC1 is disabled at startup of XC16x derivatives by default.
So, as Rolf mentioned, set the initializing bit to 1 (INIT_SYSCON3) in startup file and ADSC1DIS bit to zero.
Rolf!! , thanks for this additional hint.
I read the discussions, but one is about simulation (which is not the issue here) and the other one didn't show me anything I didn't already know.
But Rolf's remark made the difference!
Now this is somewhat confusing:
The users manual: "xc161_umd_system_v1.1_2002_02.pdf" states in pg 8-35 that syscon3 has a default value of "0000H".
In "xc161_um_sys_v2.0_2003_03.pdf" (the system users manual one month later) it says on pg 6-5 that the default setting of syscon3 is "9FD0H"!
But I can not find a decent description of this register anymore.....any hints?
Furthermore, "DAVE" does not configure syscon3 either. It sets the bits, but not the initializing bit. Changing "INIT_SYSCON3" in the startup file to "1" was all I needed to do.
So, thanks a lot. I'm back on track again, although it's not quite clear to me where to find the right info on this matter...
thanks for feedback - it was nice to be able to help you.
Yes, your are right with the DAvE.
We discover this behaviour some weeks ago with the SSC1 interface,thats why I mentioned the INIT bit in SYSCON3 extra again.
DAvE really does not set this bit, but only
the wanted xxxDIS bit.
Concerning the registers - the reset values was changed with the AC steps I mean, since
the old reset values brought up some troubles
in the start up phase.
I downloaded the docs(the febr ones) after I got the chips. I guess documentation is always one step behind....
But I still wonder where I can find a complete description of the syscon3 register.
It doesn't seem to be in the latest user manuals.(or I must have overlooked it)
checked the manual of XC161 (the new one), if I am not so stupid the complete SCU description is missing.
(Should be chapter 8 ).
So I want to recommend you the information I got from XC167CI device.
System manual P8-34. XC167CI
In principal there are only the disable bits
The reset value depends what is disabled by default.
SYSCON registers are write protected after EINIT.
Yes, that seems to be equal to the "older" XC161 manual.
It still mentions a reset value of "0000H",though (all devices activated)
For the XC167 there is an "rev AC" errata sheet that says:
• XC167 System Units – Draft User's Manual V1.1, 2002-12:
- p. 8-35: the reset value for register SYSCON3 is 9FD0h,
i.e. not all modules are enabled after reset
Seems this one needs an update too.
I guess it's best to always updata these registers anyhow....just in case...
You are right, of course, there are minor differences between the devices.
I did report to Infineon about the missing chapter of the SCU.
If I get any information I will inform you again.
Most importantly is, that you have been solved your problem.
got the informations from Infineon.
There in fact some informations gone lost
Recommendation is to refer the XC167 manuals (as we did).
The informations in general are valid and will take again in the manual with next update.
I gave the hint to let flow in the most actual RESET values of the register with
Time plan is not known as this time.
View all questions in Keil forum