The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
UART Problem - SoneR - Sep 19 7:06:41 2009
Hi,
I am using MSP2370 and I am experiencing a UART problem...
After initializations the code runs in an infinite loop, as it is
expected... Interestingly, while debugging, if I put a breakpoint just
before the infinite loop, RX-TX communication works perfectly, however if I
debug without breakpoint, the code does not come into ISR and it cannot
recieve any data - if I apply power to the system without debugging the same
problem is observed -
I tried different baud rates (From 9600 to 115200) and different clk
frequencies(From 3.39MHz to 13.56MHz) but I faced almost the same problem.
Which conditions obstructs the reader to enter interrupt?
Thank you...
--
Soner ISIKSAL
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: UART Problem - Augusto Einsfeldt - Sep 19 8:41:02 2009
It seems that you forgot to enable the interrupts, and the debugger
(somehow) did it for you.
-Augusto
On S=C3=A1b 19/09/09 08:05 , SoneR s...@gmail.com sent:
Hi,
I am using MSP2370 and I am experiencing a UART problem...
After initializations the code runs in an infinite loop, as it is
expected... Interestingly, while debugging, if I put a breakpoint
just
before the infinite loop, RX-TX communication works perfectly,
however if I
debug without breakpoint, the code does not come into ISR and it
cannot
recieve any data - if I apply power to the system without debugging
the same
problem is observed -
I tried different baud rates (From 9600 to 115200) and different
clk
frequencies(From 3.39MHz to 13.56MHz) but I faced almost the same
problem.
Which conditions obstructs the reader to enter interrupt?
Thank you...
--=20
Soner ISIKSAL
[Non-text portions of this message have been removed]
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: UART Problem - old_cow_yellow - Sep 19 10:08:28 2009
Sounds like the "debugger" made the bug disappear.
But in other occasions, the "debugger" actually introducing bugs.
Is the "debugger" such an intrusive observer?
http://en.wikipedia.org/wiki/Observer_effect_(information_technology)
--- In m...@yahoogroups.com, Augusto Einsfeldt
wrote:
>
> It seems that you forgot to enable the interrupts, and the debugger
> (somehow) did it for you.
> -Augusto
> On S=C3=A1b 19/09/09 08:05 , SoneR soner86@... sent:
> Hi,
> I am using MSP2370 and I am experiencing a UART problem...
> After initializations the code runs in an infinite loop, as it is
> expected... Interestingly, while debugging, if I put a breakpoint
> just
> before the infinite loop, RX-TX communication works perfectly,
> however if I
> debug without breakpoint, the code does not come into ISR and it
> cannot
> recieve any data - if I apply power to the system without debugging
> the same
> problem is observed -
> I tried different baud rates (From 9600 to 115200) and different
> clk
> frequencies(From 3.39MHz to 13.56MHz) but I faced almost the same
> problem.
> Which conditions obstructs the reader to enter interrupt?
> Thank you...
> --=20
> Soner ISIKSAL
> [Non-text portions of this message have been removed]
> =
=20
>=20
>=20
> [Non-text portions of this message have been removed]
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: UART Problem - old_cow_yellow - Sep 19 10:34:52 2009
Instead of using a =E2=80=9Cdebugger=E2=80=9D, an alternative is to read th=
e code. Reading the code carefully is the least intrusive way to find bugs.
--- In m...@yahoogroups.com, "old_cow_yellow"
wrote:
>
> Sounds like the "debugger" made the bug disappear.
> But in other occasions, the "debugger" actually introducing bugs.
>=20
> Is the "debugger" such an intrusive observer?
>=20
> http://en.wikipedia.org/wiki/Observer_effect_(information_technology)
>=20
> --- In m...@yahoogroups.com, Augusto Einsfeldt wrote:
> >
> > It seems that you forgot to enable the interrupts, and the debugger
> > (somehow) did it for you.
> > -Augusto
> > On S=C3=A1b 19/09/09 08:05 , SoneR soner86@ sent:
> > Hi,
> > I am using MSP2370 and I am experiencing a UART problem...
> > After initializations the code runs in an infinite loop, as it is
> > expected... Interestingly, while debugging, if I put a breakpoint
> > just
> > before the infinite loop, RX-TX communication works perfectly,
> > however if I
> > debug without breakpoint, the code does not come into ISR and it
> > cannot
> > recieve any data - if I apply power to the system without debugging
> > the same
> > problem is observed -
> > I tried different baud rates (From 9600 to 115200) and different
> > clk
> > frequencies(From 3.39MHz to 13.56MHz) but I faced almost the same
> > problem.
> > Which conditions obstructs the reader to enter interrupt?
> > Thank you...
> > --=20
> > Soner ISIKSAL
> > [Non-text portions of this message have been removed]
> > =
=20
> >=20
> >=20
> > [Non-text portions of this message have been removed]
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: UART Problem - Augusto Einsfeldt - Sep 19 11:35:28 2009
=20
Yes, but read not allways mean understand. This is, actually, a good
effect of writing programs in Assembly: it only works when you know
what you are doing...
Back to the issue, I wonder if breakpoints in the debuug hardware
would actualy be non "public" documented interrupts with constant
vectors. This would make GIE=3D1 mandatory when a breakpoint is
inserted. Of course, it would mean an intrusive debugging channel.
Changing GIE state can also be a flaw in the debugger software. It is
interesting to note that I have done some assembly project debugging
and even after I disabled the interrupts (to check the number of
instructions used in a subroutine) the debugger still stoped in Timer
interrupts. So, to accomplish my task I had to modify the software and
disable the peripheral interrupt instead of just the GIE.
I never went deep in this issue because I would not waste time when
I know a workaround during a debugg session.
-Augusto
On S=C3=A1b 19/09/09 11:33 , "old_cow_yellow" o...@yahoo.com
sent:
Instead of using a =C3=A2=C2=80=C2=9Cdebugger=C3=A2=C2=80=C2=9D, an altern=
ative is to read
the code. Reading the code carefully is the least intrusive way to
find bugs.
--- In m...@yahoogroups.com, "old_cow_yellow"=20
...> wrote:
>
> Sounds like the "debugger" made the bug disappear.
> But in other occasions, the "debugger" actually introducing bugs.
>=20
> Is the "debugger" such an intrusive observer?
>=20
> http://en.wikipedia.org/wiki/Observer_effect_
[1](information_technology)
>=20
> --- In m...@yahoogroups.com, Augusto Einsfeldt wrote:
> >
> > It seems that you forgot to enable the interrupts, and the
debugger
> > (somehow) did it for you.
> > -Augusto
> > On S=C3=83=C2=A1b 19/09/09 08:05 , SoneR soner86@ sent:
> > Hi,
> > I am using MSP2370 and I am experiencing a UART problem...
> > After initializations the code runs in an infinite loop, as it
is
> > expected... Interestingly, while debugging, if I put a
breakpoint
> > just
> > before the infinite loop, RX-TX communication works perfectly,
> > however if I
> > debug without breakpoint, the code does not come into ISR and
it
> > cannot
> > recieve any data - if I apply power to the system without
debugging
> > the same
> > problem is observed -
> > I tried different baud rates (From 9600 to 115200) and
different
> > clk
> > frequencies(From 3.39MHz to 13.56MHz) but I faced almost the
same
> > problem.
> > Which conditions obstructs the reader to enter interrupt?
> > Thank you...
> > --=20
> > Soner ISIKSAL
> > [Non-text portions of this message have been removed]
> > =
=20
> >=20
> >=20
> > [Non-text portions of this message have been removed]
> >
>
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
[Non-text portions of this message have been removed]
------------------------------------
______________________________
LaunchPad Kit for MSP430 Value Line: Complete open source tool for harnessing 16-bit performance and ultra-low power. Click for Details
(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Re: UART Problem - SoneR - Sep 25 12:22:11 2009
Hi again,
Now I'm sure that the problem is not related with the interrupt enable or
debugger amelioration of bugs.
UART module is getting its clk from ACLK. Here is the problem:
case1 : if I set MCLK = ACLK = 6.78MHz , BAUD = 115200, UART module works
properly.
case2 : if I set MCLK = 13.56MHz, ACLK = MCLK / 2 = 6.78MHz, BAUD = 115200,
UART module does not work. It does not enter ISR under some conditions
(related with the data I am sending) and the dada transmitted from MCU is
not decoded perfectly ( I see meaningless characters on the computer). It
looks like a BAUD rate problem.
Note : ACLK is used by Timer Module too but this shouldn't affect UART
module.
Why do I observe different responses although the frequency of UART module
is the same in both conditions.
Thank you for your interest...
[Non-text portions of this message have been removed]
------------------------------------
______________________________
Have a look at the new TI MCU Center on EmbeddedRelated.com!
(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Re: UART Problem - Dirk Rapp - Sep 28 10:01:05 2009
Hi SoneR,
we had some days the same problem, that the baud-rate seams to be
varying more than
allowed. The reason was that a communication signal was near the crystal
and shift the
frequency of that crystal. The working of the code wasn't effected
because it was more
tolerant but the data sent via UART were nonsens.
Because the ACLK came from another source it works.
Hope this helps,
Dirk
SoneR schrieb:
>
>
> Hi again,
>
> Now I'm sure that the problem is not related with the interrupt enable or
> debugger amelioration of bugs.
>
> UART module is getting its clk from ACLK. Here is the problem:
>
> case1 : if I set MCLK = ACLK = 6.78MHz , BAUD = 115200, UART module works
> properly.
>
> case2 : if I set MCLK = 13.56MHz, ACLK = MCLK / 2 = 6.78MHz, BAUD =
> 115200,
> UART module does not work. It does not enter ISR under some conditions
> (related with the data I am sending) and the dada transmitted from MCU is
> not decoded perfectly ( I see meaningless characters on the computer). It
> looks like a BAUD rate problem.
>
> Note : ACLK is used by Timer Module too but this shouldn't affect UART
> module.
>
> Why do I observe different responses although the frequency of UART module
> is the same in both conditions.
>
> Thank you for your interest...
>
> [Non-text portions of this message have been removed]
--
Ingenieurbüro Dirk Rapp
Hard- & Softwareentwicklung
Adelhauser Str. 36
79585 Steinen
Tel.: +49 7627 923494
Mobil: +49 173 6686246
------------------------------------
______________________________
Have a look at the new TI MCU Center on EmbeddedRelated.com!
(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Re: UART Problem - SoneR - Sep 28 12:18:43 2009
Thank you,
I must carry out some basic experiments to be sure whether the problem is
related with the one you specified.
Thank you again...
--=20
Soner I=C5=9F=C4=B1ksal
+90 554 7363433
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )