PriyanggaJanmantara / tinyos-msp430

Automatically exported from code.google.com/p/tinyos-msp430
0 stars 0 forks source link

ez430RF2500 uart Localtime test app #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cd apps/tests/msp430-small/uart/LocalTime
2. make ez430rf2500 debug install
3. stty 9600 sane < /dev/ttyACM0
4. cat /dev/ttyACM0 

What is the expected output?
  - expected output : ez430 local clock

What do you see instead?
  - I/O error or unreadable things ;-) ...

By defaut, Ez430RF2500 is build with  -D__msp430_using_vlo
this activate the VLOCLK for ACLOCK 
this is not the 32768 Khz lF Clock required by ucsi_conf.nc ez430RF2500 
platform : 
        ucssel : 0x01,             // baud rate clock source ACLK=32kHz
        ubr    : UBR_32KHZ_9600,   // baud rate
        umctl  : UMCTL_32KHZ_9600, // baud rate modulation

2 solutions : 
  1. Change values for VLOCLK, which prevent a rate higher to 2400 bauds
  2. Change VLOCLK to LFXT1 in platform.

The two solutions may be useful, I don't know which one is better by default.

I had attached modified files for VLO mode : 
   - tos/platforms/ez430rf2500/UsciConf.nc
   - tos/chips/msp430-small/usci/msp430usci.h

Original issue reported on code.google.com by bruno.pe...@gmail.com on 3 Apr 2011 at 12:44

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for your report.

Yes, you are right.  USCI baud rate generator needs fix to match with VLO.
I think there is 3rd solution.
  3. Use DCO for baud rate clock source.

Original comment by tadashi....@gmail.com on 8 Apr 2011 at 6:20

GoogleCodeExporter commented 9 years ago
I seem to have the same problem, but applying the patches above to UsciConf.nc 
and msp430usci.h and making clean didn't seem to solve the problem (I/O error 
when trying to read /dev/ttyACM0 port).

I also tried selecting SMCLK (connected to LFXT1 with no divider I hope?) for 
the UART clock source (set ucssel to 0x02) and that didn't seem to work.

I can alter the blink parameters in code and the hardware responds, so 
everything else seems to be configured correctly.

Original comment by bnewbold on 4 Jun 2012 at 8:35