This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Basics on Flash

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

Pardon the newbie questions, but I have some fundamental questions about flash. I have scanned many documents and have not found specific answers (although I'm sure they are out there somewhere).

1) How do you get the uC (2807 for this particular app) to boot from flash? The app notes look very involved, and I'm hoping there is a simple way to do that.

2) When running from flash in debug, the speed is 5 to 10x slower than Ram, the spec's say should only drop by about 10% at 50 Mhz. What is going on here?

Thanks for your help

   

  • David,

    I suggest seeing appnote SPRA958.

    http://www.ti.com/mcu/docs/litabsmultiplefilelist.tsp?sectionId=96&tabId=1502&literatureNumber=spra958l&docCategoryId=1&familyId=1414

    It covers running an application from flash.  In a nutshell, you set the bootmode pins, locate your starting branch at the flash boot address, and away you go.  There's a bit more to it than that of course.  It's covered in  the appnote.

    On your second question, I suspect you haven't configured the flash wait-states.  They default to maximum and must be configured in software.  It's in the appnote too.

    Regards,

    David

  • Thanks David,

    I'll read that document in detail, thanks again for pointing me in the right direction.

         Dave

  • I've spent the day reading documents and trying things. I have a C2000 LaunchPad and I can get the demo to boot from flash and it increases the flash speed, just not sure how they do it. Is there a good example that shows how to do this?

         Thanks

            Dave

  • David,

    DAVID PETER1 said:

    I've spent the day reading documents and trying things. I have a C2000 LaunchPad and I can get the demo to boot from flash and it increases the flash speed, just not sure how they do it. Is there a good example that shows how to do this?

    Isn't that covered in SPRA958?  There are clear example projects with it.

    - David

  • Thanks for your patience David,

    I had looked at those files before, and I was looking for some details like a main file. I did finally find it, but then in re-reading the SPRA958 again realized it appears that the intent was to load it as a project. I imported the Flash 2807 project, but when I compiled it, I got 70 errors and 23 warnings. In addition, I was hoping to use the files in the controlSuite which hopefully are under configuration control. I believe using the files from the examples could prevent one from using the updated files in CS as they become available???

    Unfortunately I am out of time and I have to move on using the ram based debugger, hopefully I can figure this out before it comes time to deliver the design.

          Thanks again for your time

             Dave

  • As a follow on item, my curiosity got the better of me. I deep dived one of the errors, and long story short the example files somehow got corrupted in the transporter room. I got it to compile and work on the C2000 LaunchPad. Hopefully this gives me another example to use.

         Dave

  • David,

    >> in re-reading the SPRA958 again realized it appears that the intent was to load it as a project.
    >> I imported the Flash 2807 project, but when I compiled it, I got 70 errors and 23 warnings.

    That is unexpected.  The CCS projects in SPRA958 are fully portable and not dependent on any particular file paths or other code libraries or include files (other than the cgtools of course).  They should import and build without any errors into any CCS version 5.3 or later.  I use these examples all the time.  So, I'm not sure what the problem is that you're having.  What were the build errors?

    ----

    Note - inserted 8/21/14 09:01AM CDT:

    This post crossed in the ether with Dave's previous post.  Dave posted that his build errors were caused by a corrupted code download.  Seems he has it working now.

    ----

    >> I was hoping to use the files in the controlSuite which hopefully are under configuration control.

    There are two different sets of examples in ControlSuite for F2802x device: 'structs' and 'drivers'.  The 'structs' examples use the peripheral header file structures to directly configure the peripheral registers.  This is also how appnote SPRA958 does things.  The 'drivers' examples use the C2000 peripheral driver library to configure the peripherals.  The 'drivers' example projects each have two CCS configurations, one for RAM and the other for Flash.  After importing the project into CCS, right-click the project in the Project view and select Build_Configurations->Set_Active.  You can then select RAM or Flash.

    Regards,

    David

  • Again, thanks for your patience David. 

    This looks like I'm pretty close.  I compiled a 'drivers' example (gpio toggle) and got these warnings. Normally I don't pay a whole lot of attention, but these looked like they might be problems. Any thoughts on where to look?

          Dave

  • David,

    Warning #1 (Entry Point): Ignor it.  There is a project options that tells CCS where to set the PC when you do a RESTART in the debugger.  The ControlSuite examples set this option to a valid symbol called "code_start".  CCS just likes to complain if you change the option from the default value (which is _c_int00).

    Warning #2 and #3 (referenced project and path ): There's a referenced project in the project setup that it cannot find the path for.  It looks like the DriverLib project in ControlSuite is referenced so that if anyone changed the driverlib source files the library gets rebuilt when you build the project you are using.  If you've moved the example project elsewhere on your PC, I suspect the path to the DriverLib broke.  I'd just remove the referenced project from your project setup.

    Warning #4 (compiler version): It is saying you don't have the compiler version the project is configured for, so it is using a different version.  This happens all the time when CCS updates and the old compiler is no longer installed automatically.  Just go into the project options and select a compiler from the list of the ones installed (suggest using the latest version installed).  The warning will go away.

    Regards,

    David

  • Awesome. You've been a very good instructor. I believe I'm on my way now.

      Thanks so much for your time

           Dave