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.

Boot ROM versions on Piccolo F28027 and F28035

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

We recently ran into a problem where the Bootloader on F28027 stopped working. We used to use Boot ROM library for Flash operations (erase, program etc.), but that stopped working on another batch of this MCU. To solve the problem I linked in Flash2802x_API_V200.lib to the Bootloader and stopped using Boot ROM. To confirm the Boot ROM was the problem I saved its memory space (memory from address 0x3FE000 and 0x1FC0 words long) from the two MCUs and the files were different. The files are attached (they  are .bin files, but had to rename it to .txt to be able to upload).

Could you confirm that the Boot ROM has been changed in between two releases of the micro? Was it changed in a way that the APIs were not placed in the same memory locations?

Based on what I’ve experienced I believe the answer to both questions is ‘yes’. If so, I am concerned about Boot ROM on F28035. It is still working (the Boot ROMs on the two batches of the micro I have are the same), but is there any possibility that the Boot ROM on F28035 could be changed in future that would break the current functionalities? I hope the answer to this question is ‘no’ and then you can stop reading the rest of this post :-). However, if the answer is ‘yes’, then we could run into ‘Bootloader does not work’ on F28035 as well. I understand there is library Flash28035_API_V100.lib that has to be ‘ordered’ through the marketing channel. That would be ok, but linking this library in would significantly increase the Bootloader size which we do not have available. I am looking for an advice on how to make sure the flash API will work in some future releases of the F28035 micro.

Thanks a lot,

Slavica  

  • I'm honestly not sure if the bootROM has been changed in that device, BUT I don't think it has been.  I've contact our bootROM author to comment.  He should get back to your shortly.

    Trey

  • Slavica,

    can you check if the REVID of both the 2802x devices you are referring to is same? also can you check ROM revision numbers on both at location '0x003fffba'.

     

    Best Regards

    Santosh

  • Hi Santosh,

    Here are first 4 words starting at address 0x3fffba:

    Device (working): 0002 1209 CBC6 683A

    DemoBoard (not working): 0A01 0808 268F 6F5F

    I am not sure where to find REVID, but here are labels from the two chips:

    working Boot ROM NOT working Boot ROM
    S320 980 X320 980
    F28027PTS F28027PTA
    CA18C4E9 C8BACY8T
    G4 G4
  • Slavica,

    REVID is documented in System control guide.

    Obviously the ROM revision on the part that is not working doesn't make sense. looks like you have a bad part, can you check with your local FAE to return that part?

     

    Best Regards

    Santosh

  • Sure, we can replace the boards (we have 5 of them with same, bad, ROM revision). This must be some bad batch from TI (recall needed? leaving that to you...)

    And, please, could you confirm:

    1. Boot ROM will NOT change on F28027 in some future releases of the micro.

    2. Boot ROM will NOT change on F28035 in some future releases of the micro.

    If both are true, I am going to use Boot ROM instead of linking in the flash API library. It is simple and clean and it does not require extra flash space.

    Thanks a lot,

    Slavica

  • Slavica,

    the local FAE is now aware of the problem, Jason (FAE) is monitoring the post. He will have more details on what needs to be done with the bad device.

    and regarding

    Slavica Golijanin said:

    1. Boot ROM will NOT change on F28027 in some future releases of the micro.

    2. Boot ROM will NOT change on F28035 in some future releases of the micro.

    yes, true - we make every effort to keep the ROM compatible on future revisions of the micro. Appropriate ROM symbol libraries will be generated for customers to link the application with. I beleive the ROM symbol libraries should be there in controlSuite.

    If for any reason we break the compatibility, a proper errata will be published following the proceedures. For 2802x and 2803x you should be fine, pleae go ahead and use flash library in ROM. It would be good if you can add an error check (with simple warning) so that your application will know if ROM revision has changed without your notice. The ROM revision ID address will not change in the future micros.

    Best Regards

    Santosh

     

     

  • Thank you, Santosh!

    One more question: How many words ROM revision ID occupies - just one at address 0x3FFFBA?

    Regards,

    Slavica 

     

  • Slavica,

    this is documented in ROM guide, towards the end of the chapter. Yes it is a 16 bit number.

    Best Regards

    Santosh

     

  • Hi Santosh,

     

    I have the same issue. I have a F28027PTA USBStick. It is TI EVM purchased from TI website. I can not get it work with both Flash API v201 and v201a. When I read ROM revision ID at address 0x3FFFBA, I got 0x0A01. I have another F28027 controlCARD. It also have the same issue. It looks like all F28027 EVM I have all used a bad part. Do we have update or solution for this part number?


  • Slavicia, Rickie

    I did look at the units that were sent ot the factory. The ROM on these devices is fine, the 0x0A01 version is for REV0 of 2802x devices - the release date is 0x0808.

    There is an errata for 2802x REV0 device for Flash API in ROM, basically you cannot use flash API in ROM on REV0 of this device. This was fixed in REVA. Hope it helps clear out the issue.

     

    Best Regards

    Santosh

     

  • Hi Santosh,

    Thanks for the explanation, but I would not agree that the "ROM is fine" when flash API cannot be used. Hopefully, the REV0 will be stopped being distributed very soon since I got 3 of 28027 control cards just a few weeks ago where 2 were of REV0 and only one was ok regarding the flash API. Our product relies on the BootROM and Flash API. I started this thread to make sure there will not be any surprises down the road.

    Is my assumption that F28027 and F28035 Flash API in BootROM will always be usable risky (excluding REV0)?

    Regards,

    Slavica

  • Slavica,

    we had a software bug with flash API in ROM on 2802x REV0 devices. This was an errata item for that device revision. The bug was fixed in 2802x REVA and 2803x never had this problem. I was under the impression that you must have received the REV0 devices long back.

    Piccolo devices have been in market for a long time now and they are pretty stable, so I would say there is not much risk. Whenever the device is rev'd for some reason we will try our best to keep the compatibility of flash API in ROM.

     

    Best Regards

    Santosh

     

  • Santosh,

    It is true I started this thread with the REV0 devices received about 2 years ago. But since I sent two of them to the factory (the ones you've examined), we received three new as a replacement just a few weeks ago. Two of them were of REV0 and only one had the good BootROM. I've sent one REV0 device back to Jason so he could test it.

    Anyways, our manufactured devices have not had this problem so far which gives confidence that the MCUs shipped there are ok. These are just plain MCUs, not the ones on the control card. It seems TI still has some control cards with the bad BootROM laying around. But, I am not worried about that. You may raise this issue with your managers to do some "clean up" of inventory :-)

    I am leaving this issue behind as closed.

    Thanks,

    Slavica

  • Slavica,

    sure, I have forwarded your concerns to my manager already :-). I'm sure FAE are monitoring the thread as well, so the message is passed.

    Best Regards

    Santosh Athuru

  • Hello Santosh, 

    I was wondering how I could program the mcu flash.

    I have imported the 2802x_FlashAPI_BootROMSymbols_v2.01.lib into my project, and included the flash api v201a includes.

    I called the version check in my code and I was able to get the 2.01 as the floating value. 

    But when I try to program the flash it halts. I can see that I am clearing the flash at the particular location I am trying to write at (Sector C) and I am doing a simple program flash as seen in the flash api example:

    //#############################################################################
    //
    //  File:   Example_F2802xLedBlink.c
    //
    //  Title:  F2802x LED Blink Getting Started Program.
    //
    //! \addtogroup example_list
    //!  <h1>LED Blink</h1>
    //!
    //!   This example configures CPU Timer0 for a 500 msec period, and toggles 
    //!   the GPIO0-4 LEDs  once per interrupt. For testing purposes, this example
    //!   also increments a counter each time the timer asserts an interrupt.
    //!
    //!   Watch Variables:
    //!   - interruptCount
    //!
    //!   Monitor the GPIO0-4 LEDs blink on (for 500 msec) and off (for 500 msec) 
    //!   on the 2802x0 control card.
    //
    //#############################################################################
    // $TI Release: F2802x Support Library v230 $
    // $Release Date: Fri May  8 07:43:05 CDT 2015 $
    // $Copyright: Copyright (C) 2008-2015 Texas Instruments Incorporated -
    //             http://www.ti.com/ ALL RIGHTS RESERVED $
    //#############################################################################
    
    #include "DSP28x_Project.h"     // Device Headerfile and Examples Include File
    
    #include "Flash2802x_API_Library.h"
    //#include "Flash2802x_API_Config.h"
    //#include "F2802x_BootVars.h"
    
    #include "f2802x_common/include/adc.h"
    #include "f2802x_common/include/clk.h"
    #include "f2802x_common/include/flash.h"
    #include "f2802x_common/include/gpio.h"
    #include "f2802x_common/include/pie.h"
    #include "f2802x_common/include/pll.h"
    #include "f2802x_common/include/timer.h"
    #include "f2802x_common/include/wdog.h"
    
    // Prototype statements for functions found within this file.
    __interrupt void cpu_timer0_isr(void);
    
    #define Flash_API
    
    
    
    #ifdef Flash_API
    
    uint16_t interruptCount = 0;
    uint16_t myValues = 0x0;
    
    typedef struct {
         Uint16 *StartAddr;
         Uint16 *EndAddr;
    } SECTOR;
    
    #define  WORDS_IN_FLASH_BUFFER 0x010
    uint16_t  Buffer[WORDS_IN_FLASH_BUFFER];
    uint16_t  i;
    uint16_t  Status;
    uint16_t  *Flash_ptr;     // Pointer to a location in flash
    uint16_t  Length;         // Number of 16-bit values to be programmed
    float32 Version;        // Version of the API in floating point
    uint16_t  VersionHex;     // Version of the API in decimal encoded hex
    FLASH_ST FlashStatus;
    
    float version;
    
    
    SECTOR Sector[4] = {
             (Uint16 *)0x3F6000,(Uint16 *)0x3F7FFF,
             (Uint16 *)0x3F4000,(Uint16 *)0x3F5FFF,
             (Uint16 *)0x3F2000,(Uint16 *)0x3F3FFF,
             (Uint16 *)0x3F0000,(Uint16 *)0x3F1FFF,
    };
    #endif
    
    
    ADC_Handle myAdc;
    CLK_Handle myClk;
    FLASH_Handle myFlash;
    GPIO_Handle myGpio;
    PIE_Handle myPie;
    TIMER_Handle myTimer;
    
    void main(void)
    {
        CPU_Handle myCpu;
        PLL_Handle myPll;
        WDOG_Handle myWDog;
        
        // Initialize all the handles needed for this application    
        myAdc = ADC_init((void *)ADC_BASE_ADDR, sizeof(ADC_Obj));
        myClk = CLK_init((void *)CLK_BASE_ADDR, sizeof(CLK_Obj));
        myCpu = CPU_init((void *)NULL, sizeof(CPU_Obj));
        myFlash = FLASH_init((void *)FLASH_BASE_ADDR, sizeof(FLASH_Obj));
        myGpio = GPIO_init((void *)GPIO_BASE_ADDR, sizeof(GPIO_Obj));
        myPie = PIE_init((void *)PIE_BASE_ADDR, sizeof(PIE_Obj));
        myPll = PLL_init((void *)PLL_BASE_ADDR, sizeof(PLL_Obj));
        myTimer = TIMER_init((void *)TIMER0_BASE_ADDR, sizeof(TIMER_Obj));
        myWDog = WDOG_init((void *)WDOG_BASE_ADDR, sizeof(WDOG_Obj));
        
        // Perform basic system initialization    
        WDOG_disable(myWDog);
        CLK_enableAdcClock(myClk);
        (*Device_cal)();
        
        //Select the internal oscillator 1 as the clock source
        CLK_setOscSrc(myClk, CLK_OscSrc_Internal);
        
        // Setup the PLL for x10 /2 which will yield 50Mhz = 10Mhz * 10 / 2
        PLL_setup(myPll, PLL_Multiplier_10, PLL_DivideSelect_ClkIn_by_2);
        
        // Disable the PIE and all interrupts
        PIE_disable(myPie);
        PIE_disableAllInts(myPie);
        CPU_disableGlobalInts(myCpu);
        CPU_clearIntFlags(myCpu);
        
        // If running from flash copy RAM only functions to RAM   
    #ifdef _FLASH
        memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
    #endif      
    
        // Setup a debug vector table and enable the PIE
        PIE_setDebugIntVectorTable(myPie);
        PIE_enable(myPie);
        
        // Register interrupt handlers in the PIE vector table
        PIE_registerPieIntHandler(myPie, PIE_GroupNumber_1, PIE_SubGroupNumber_7, 
                                  (intVec_t)&cpu_timer0_isr);
    
        // Configure CPU-Timer 0 to interrupt every 500 milliseconds:
        // 60MHz CPU Freq, 50 millisecond Period (in uSeconds)
        //    ConfigCpuTimer(&CpuTimer0, 60, 500000);
        TIMER_stop(myTimer);
        TIMER_setPeriod(myTimer, 50 * 500000);
        TIMER_setPreScaler(myTimer, 0);
        TIMER_reload(myTimer);
        TIMER_setEmulationMode(myTimer, TIMER_EmulationMode_StopAfterNextDecrement);
        TIMER_enableInt(myTimer);
    
        TIMER_start(myTimer);
    
        // Configure GPIO 0-3 as outputs
        GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_GeneralPurpose);
        GPIO_setMode(myGpio, GPIO_Number_1, GPIO_0_Mode_GeneralPurpose);
        GPIO_setMode(myGpio, GPIO_Number_2, GPIO_0_Mode_GeneralPurpose);
        GPIO_setMode(myGpio, GPIO_Number_3, GPIO_0_Mode_GeneralPurpose);
        
        GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Output);
        GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Output);
        GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Output);
        GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);
        
        GPIO_setLow(myGpio, GPIO_Number_0);
        GPIO_setHigh(myGpio, GPIO_Number_1);
        GPIO_setLow(myGpio, GPIO_Number_2);
        GPIO_setHigh(myGpio, GPIO_Number_3);
    
        // Enable CPU INT1 which is connected to CPU-Timer 0:
        CPU_enableInt(myCpu, CPU_IntNumber_1);
    
        // Enable TINT0 in the PIE: Group 1 interrupt 7
        PIE_enableTimer0Int(myPie);
    
        // Enable global Interrupts and higher priority real-time debug events
        CPU_enableGlobalInts(myCpu);
        CPU_enableDebugInt(myCpu);
    
    
    
    #ifdef Flash_API
        version = Flash_APIVersion();
        Flash_ptr = Sector[2].StartAddr;
        i = 0xA5A5;
        Length = 1;
        Status = Flash_Program(Flash_ptr,&i,Length,&FlashStatus);
    //    Length = 0x001;
    //    Status = Flash2802x_Program(Flash_ptr,Buffer,Length,&FlashStatus);
    
        myValues = (uint16_t)(*((uint16_t *)(0x3F4000)));
    #endif
        for(;;)
        {
            __asm(" NOP");
        }
    }
    
    __interrupt void cpu_timer0_isr(void)
    {
        interruptCount++;
        
        // Toggle GPIOs
        GPIO_toggle(myGpio, GPIO_Number_0);
        GPIO_toggle(myGpio, GPIO_Number_1);
        GPIO_toggle(myGpio, GPIO_Number_2);
        GPIO_toggle(myGpio, GPIO_Number_3);
        
        // Acknowledge this interrupt to receive more interrupts from group 1
        PIE_clearInt(myPie, PIE_GroupNumber_1);
    }
    
    

     After it halts it resets all the flash sectors to 0x0000. Am i doing something wrong ?  

    Also, if I am using the bootROM library, i do not need to add any of the sections in my .cmd file, is this correct ?  

    Please advise how I could write one word to the flash sector C.  

    Regards,  

    Rajan Joshi

  • Rajan,

    This is 5 year old thread and I frankly don't think this question belong here.

    Please open a new thread.

    Regards,
    Manoj