• Tag Archives Linux
  • Getting use out of a thin client

    image

    Today I setup my evo t20. I used the built in terminal emulator to connect to my linux box. So easy and super simple. All that is needed is inetd and telnetd installed on the linux box, no configuration necessary. once installed I set up windows ce to telent to that box and that was it. One thing I did notice was that I couldn’t get nano to work and vi acts all funny. So I will have to figure out a telnet compatable editor so I can use mspdebug and be able to edit the code as well……One step closer to getting a useful work area. If you have any suggestions on telnet editors please let me know.


  • MSP430: VLO and You!!

    So what is the VLO? The VLO is the very low- freq Oscillator, low power and low frequency(12KHz). So how does this change things, well now you can source your clocks from the DCO or the VLO instead of the 32Khz watch crystal. …….and now your asking yourself “Do I really need another clock source?” I say “yes!!”

    Now what can you do or how can i use the VLO? Its super easy to setup the VLO. In the Family user guide for the MSP430, Basic Clock Module+ will be your reference to set up the VLO.
    Registers that you will be concerned about are BCSCTL2, BCSCTL3 and the special functions registers.

    Setup

    • BCSCTL3 needs LFXT1S_2 to be set

    BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO

    • BCSCTL2 needs to be set

    BCSCTL2 |= SELM_3 + SELS;                 // SMCLK  = MCLK = VLO = 12Khz

    • Clear OSC fault flag

    IFG1 &= ~OFIFG;                           // Clear OSCFault flag

    • Turn off DCO if not used

    _BIS_SR(SCG1 + SCG0);                // Stop DCO

     

    And that is all you need to do to setup your msp430 to use the VLO for SMCLK, AMCLK and MCLK @ 12KHz.  So now you need more control. so here are your VLO options

    BCSCTL1 –  controls XTS(not avalable on msp430x20xx), Divider for ACLK, and DCO range select.

    • DIVAx  – divide ACLK source by 1,2,4,8 or 00, 01, 10, 11(bit settings). Pretty much this will divide your Clock source by 1 – 8. This setting is just for ACLK which will be the crystal or VLO. (this only affects ACLK)
    • XTS, XT2OFF, and RSELx are not used for VLO but may be a good idea to read up on what they do.

     

     

    BCSCTL2  – controls MCLK divider, SMCLK divider MCLK and SMCLK clock source, each one is configurable.

    • SELMx – selects MCLK clock source, your choices are DCOCLK or LFXT1CLK/VLOCLK  just remember you cant use the VLO and the crystal
    • DIVMx – MCLK divider, divides the clock source by given amount, 1,2,4,8
    • SELS – select SMCLK source  DCOCLK or LFXT1CLK/VLOCLK
    • DIVSx – look another Divider, this one is for SMCLK
    • DCOR- not used – sets DCO resister to internal or external

     

    BCSCTL3 – XT and LFXT setting, only one setting is really used here.

    • LFXT1Sx – source of LFXT1,  00(0) for 32KHz crystal and  10(2) for VLO instead of the crystal
    • XT2Sx, XCAPx, XT2OF, LFXT1OF are not set or used for the VLO

     

     

    So now you have a basic understanding on how to setup your VLO, now let me give you a quick  VLO test

     

    /* VLO clock as main source instead of the DCO */
    #include  <msp430x20x3.h>
    void main(void)
    {
    WDTCTL = WDTPW + WDTHOLD;                 // Stop watchdog timer
    BCSCTL3 |= LFXT1S_2;                      // LFXT1 = VLO
    IFG1 &= ~OFIFG;                           // Clear OSCFault flag
    __bis_SR_register(SCG1 + SCG0);           // Stop DCO
    BCSCTL2 |= SELM_3;               // MCLK = LFXT1
    P1DIR |= 0x01;                            // Set P1.0 to output direction
    for (;;)
    {
    volatile unsigned int i;
    P1OUT ^= 0x01;                          // Toggle P1.0 using exclusive-OR
    i = 50000;                              // Delay
    do (i--);
    while (i != 0);
    }
    }

    code for use with mspgcc

     

    Now that we have the basics down on the VLO, what are some of the uses for it? Really low power clock, or a 3rd clock source that’s a different frequency then the main, really slow ADC conversions, odd SDA16 filter frequency, a low frequency tone generator.

     

    What other uses can you find? Let me know in the comments 🙂


  • Lubuntu LDXE

    I was checking out Hackaday (one of my favorite sites)
    and found this http://blog.lxde.org/?p=514
    and looked it over, its pretty cool that they took a debian system and brought it down under 400MB, which is pretty amazing, but its still not small enough for me, so i will still be compiling my lfs system but i am going to try out this new distro, so look later for a quick review

    update- I might have to wait till I get home, my proxy is telling me no route to host, may be due to Hackaday syndrom, I will try later


  • easy LFS chroot script

    In chapter 6.4 in the stable release of LFS you need to chroot into your build environment, and I have to keep rebuilding the chroot, and i keep going back to my PDF and retyping all the commands so i created on that would rebuild the environment by just calling my new script, then make it one better CP it into /usr/bin and make it executable
    #!/bin/bash
    mount -v --bind /dev $LFS/dev
    mount -vt devpts devpts $LFS/dev/pts
    mount -vt tmpfs shm $LFS/dev/shm
    mount -vt proc proc $LFS/proc
    mount -vt sysfs sysfs $LFS/sys
    chroot "$LFS" /tools/bin/env -i
    HOME=/root TERM="$TERM" PS1='u:w$ '
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
    /tools/bin/bash --login +h

    just copy and past the above code into a new file and called it lfsroot then if you just want to make it into a command copy it into /usr/bin and you are ready to go, the script will mount the file systems and the enter the chroot environment
    This has saved me plenty of time by not typing or copying and pasting commands, My next script will be a script that will tar and cd into the directory of source packages……look for it soon


  • Webmin, next best thing to sliced bread

    I personally hate trying to configure some Applications on linux machines, especially ones that have very cryptic config files,  or there so big it takes you half an hour to get to the bottom, but no more hassle with Webmin as your remote server management solution. I have been using webmin for about 4 months now and I am quite pleased with the program, It is very simple to use no hassle setup of the interface and you can customize and build new modules for new applications or deamons.

    ignore the IE i took the picture on my work PC
    ignore the IE i took the picture on my work PC

    Ignore those high CPU times i was compiling glibc on my server  at the time of this screen shot, but lets get back to what makes it a great tool for me.

    The original reason i installed webmin is to beable to configure squid on the fly because of the need to test it from an outside connection but the uses grew as i kept exploring all the options. So after i setup squid i started looking into the apache, dns, dhcpd, and ssh server. So the apache 2 configureation was so easy compared to manuelly setting up the conf file and the enabled and installed sites, and a better understanding on how to configure apache the right way instead of the haphazard way of looking at examples and hopefully getting the config correct, with out creating security holes. I really  couldnt tell you how I got by with out webmin. The ssh, dhcpd, mysql, send mail, samba, where just as easy to setup as apache and squid, i would recomend this to any one doing any kind of server admin or running a dev system that needs monitoring or constant changes and you dont have access to the physical terminal all the time.

    There are a few things i didnt like so far, for starters I would like to be able to have a custom side bar with the links that i need only, but i think that can be taken care of with a little bit of editing the source code or creating a them. Next issue i would like changed is a better comand line interface, The one under Others comand shell does what it says it does and executes the command but I wish it emulated a shell better but i guess thats what the ssh login is for. another thing i would change would be the system info page Yes its very minimilistic and gets the info that you need, but i would like a little more info that may be helpful, Like keeping the Uptime on that page , yes i know its there when your system has been up for more than an hour but less than a day, other wise it disapears, I would also like to add how many proccesses are running at that moment and maybe the IP addresses assigned to the network interfaces would be helpul as well. I really couldnt think of any thing after that, but these are jsut cosmetic changes for the most part and the issues wont stop me from using this great tool. I have to thank the fine People at  http://www.webmin.com/index.html for creating and maintaining this fine tool.