Author Topic: Adding LM3S811 and LM3S611 configurations  (Read 5572 times)

Offline FAQ

  • Newbie
  • *
  • Posts: 23
    • View Profile
Adding LM3S811 and LM3S611 configurations
« on: April 08, 2011, 10:42:37 PM »
What do I need to do to add configurations for the LM3S811 and LM3S611 parts?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2962
    • View Profile
    • uTasker
Re: Adding LM3S811 and LM3S611 configurations
« Reply #1 on: April 08, 2011, 10:44:41 PM »
Hi

Details about configuring for other LM3Xxxxx devices is contained in the following document:

http://www.utasker.com/docs/LM3Sxxxx/uTaskerLM3SXXXX_Ports.PDF


For the LM3S811:

1) In app_hw_lm3sxxxx.h you can add a new configuration for the board with these settings:

    #define _LM3S811
    #define CRYSTAL_FREQ        8000000
    #define PLL_OUTPUT_FREQ     50000000                                 // highest speed possible
    #define PART_CODE           CODE_LM3S811
    #define PIN_COUNT           PIN_COUNT_48_PIN
    #define PACKAGE_TYPE        PACKAGE_LQFP


2) In LM3Sxxxx.h you can add the chip's details (this is an old chip - SANDSTORM class)

a) The chip's ID
#define CODE_LM3S811            (0x32 << 16)
b) The part's details:
#elif PART_CODE == CODE_LM3S811
    #define PART_DC0            (0x001f001f)                             // 64k FLASH, 8k SRAM
    #define PART_DC1            (0x001132bf)
    #define PART_DC2            (0x01071013)
    #define PART_DC3            (0xbf0f01ff)
    #define PART_DC4            (0x0000001f)
    #define PART_DC5            (0x00000000)                             // dummy
    #define PART_DC6            (0x00000000)
    #define PART_DC7            (0x00000000)
    #define PART_DC8            (0x00000000)


This will configure all peripherals based on these values.
If the simulator is used you will need to add a port configuration file like: LM3S10X_port.h (but suitable for this chip - or something 'dummy' if the accuracy is not important).

3) Similarly for the LM3S611

#elif defined EK_LM3S611
    #define _LM3S611
    #define CRYSTAL_FREQ        8000000
    #define PLL_OUTPUT_FREQ     50000000                                 // highest speed possible
    #define PART_CODE           CODE_LM3S611
    #define PIN_COUNT           PIN_COUNT_48_PIN
    #define PACKAGE_TYPE        PACKAGE_LQFP


and
#define CODE_LM3S611            (0x23 << 16)
and
#elif PART_CODE == CODE_LM3S611
    #define PART_DC0            (0x001f000f)                             // 32k FLASH, 8k SRAM
    #define PART_DC1            (0x001132bf)
    #define PART_DC2            (0x00071013)
    #define PART_DC3            (0xbf0f003f)
    #define PART_DC4            (0x0000001f)
    #define PART_DC5            (0x00000000)                             // dummy
    #define PART_DC6            (0x00000000)
    #define PART_DC7            (0x00000000)
    #define PART_DC8            (0x00000000)


Regards

Mark



Offline Unmesh

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Adding LM3S811 and LM3S611 configurations
« Reply #2 on: May 05, 2011, 01:08:53 PM »
Hi Mark,
                  I am using LM3S811. I done the above setting. I can able to download the simple LED blinking code to the target 1st time. But after that its stops responding. I tried to erase the chip with "LM flash Programmer". But i am getting a message "Unable to initialize target".
Is there any more settings to be done to  initialize the chip?

regards,
Unmesh

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2962
    • View Profile
    • uTasker
Re: Adding LM3S811 and LM3S611 configurations
« Reply #3 on: May 05, 2011, 04:26:25 PM »
Hi Umesh

I know of two things that can cause teh JTAG to stop working:

1) One or more of the JTAG pins are redefined by the application for use a GPIO
2) A bad PLL frequency (this would however probably stop the processor from working normally as well).

I would check to see whether the application that ws loaded is changing a JTAG default setting and ensure that it doesn't do this. To recover TI has a tool available at their web site. It happens quite  alot that the chip gets blocked like this (although I never actually had it myself) and I understand that the TI tool recovers it reliably so check out their web site and forums.

The reason for the potential problem is that the code runs and makes the change before the debugger can stop it. The debugger is then "locked-out" so it can't work with the chip normally.

Regards

Mark


Offline Unmesh

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Adding LM3S811 and LM3S611 configurations
« Reply #4 on: May 09, 2011, 06:21:55 AM »
Hi Mark,
                  I found the problem. It is on the PLL initialization portion.
On LM3S811, in order to start PLL we need to clear OEN bits along with PWRDN in RCC. But This bit position [Bit/Field : 12] on LM3S6965 is reserved.

So i modified the code like,

#define OEN                       0x00001000   // Added on LM3SXXXX.h

#if defined _LM3S811   
   RCC &= ~(OEN);              //clear OE bits to enable PLL Output.
#endif   

Regards
Unmesh