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.

Error Flashing MSP432 Rev 2.0

A few days ago i received the new version of the Launch Pad ( i already have the black version ) and as i tried to flash the new version i received this messages:

Flash Programmer: Reading HW revision failed.
Your XMS432P401R material is no longer supported. We recommend you moving to production-quality MSP432P401R/M silicon by ordering samples at www.ti.com/product/MSP432P401R.
File Loader: Memory write failed: Unknown error.

I already saw this discussion (link below) about something similar and executed the steps suggested, but i still receiving the same error message.

https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/548350/2002063?pi318617=5

Another thing to point ou is that i mainly use the cloud based ccs, so i expected that it was fully updated with the new version of the board, appearently it is not ( i even uninstalled my browser in hope that the cloud ccs plug in was updated after the reinstalation and all, but unfortunatelly it was not).

 

Any suggestions?

  • Antonio,
    I do not have the older version and therefore could not recreate. Have you updated the system and startup files, also it may be helpful to delete and re-install the cloud agent.  Let me know if these do not work and I will try to get ahold of the prior versions.

    Thanks,
    Chris

  • No, I haven't updated the system and startup files ( as i thought it would be good to go, but i can if you think it is needed, just point me in the direction). I Re-installed the cloud agent, still the same error.

    Thanks for the support.

  • Antonio,
    You can find examples here and it also may be useful to test with these examples to make sure the issue goes away.

    dev.ti.com/.../

    Chris
  • As you suggested i tried two different examples ( PortMap and Serial ), and i looked at the startup files from the Resorce Explorer and form the Cloud CCS, both are in the same version and updated the same date; but for piece of mind i pasted the conde from the startup file from the Resource Explorer in the startup file from Cloud CCS but still get the same error message.

    Just for the record, are there any connections that need to be made in the board so that it flashes? I'm using it with all the jumpers that come plugged in the pins, right as the board comes from the box. I'm asking because in the late version of the board there was a JTAG Switch that enable the XDS-ET, that isn't available anymore and i thought that the XDS-ET wasn't been able to communicate with the microcontroller because somehow it is missing some connection to be made (that i have no seen in this document http://www.ti.com/lit/ug/slau597b/slau597b.pdf  wich, by the way, is for REVB and not REVC, REVC is the shipped board from Texas Instruments' Store and this document is from the same page for the board).

    Below is a photo of the setup of both boards, black has a JTAG Switch, red don't.

  • Antonio,
    I am still working to try and understand why updating the version of CCS cloud does not resolve the issue. Are you in a position to download CCS and identify the silicon HW definition (e2e.ti.com/.../1816536 and/or perform a factory reset to make sure that the MSP432 is not in some unknown programmed state (e2e.ti.com/.../481391) ?

    Regards,
    Chris
  • Actually i already tried the factory reset of the microctroller. My CCS appearently performed the reset well, but since it was hanging during the building/flashing i was unnable to really make sure the microcontroller was funcitoning after ther reset, at least in the desktop CCS. Then i made the reset procedure again ( in the desktop app ) but then i decided to flash the device through the cloud application. The first time after the reset, appearently, it flashed the device but it was not performing the program inserted which is a modified version of the Port Mapping exemple from the resorce explorer, the LEDs in P1.0, P2.1 and P2.2 are supposedly to blink but they were not. Then i decided to try flash the device again in the cloud application, but the this time i recieved the same error message.

    I also tried to flash the device through the cloud application in my desktop computer in the lab that, but i received the same error message.

    I am currently re-installing the desktop application in my personal copmuter so i can perform the identification of the hardware version described in the link you apointed and then i will try again to perform the factory reset.

    Thanks.

  • Well, i re-installed the CCS desktop application ( the i tried to flash a firmware in the board, red version, and again the error massage...then i tried to flash the black version, it worked like a charm!!!) and performed the hardware identification....by the posts on the link you gave it was not at all what i expected, below is a picture of what i found.

    So, as you proposed, i performed the factory reset, as described in www.ti.com/lit/ug/slau597b/slau597b.pdf  and the result is shown in the picture below.

  • Oh, in i actually bought 3 launchpads in one sale, for me and two other friends. One of my friends already flashed his lauchpad with a blink led exemple. And i asked him to check the hardware version of his launchpad in CCS....and is marked as 0x43.

    I think that i'm the 'lucky one' in that batch....i remains to be seen if the third board can be flashed.
  • Hi Antonio,

    sorry for the trouble you had so far. It indeed looks like an error in the TLV data (which is why the tools reject it as unknown). 0x43 is the correct one for Revision C, which is why your friends boards are working. Could you give us the exact labeling of the MSP432P401 device? (or another picture where this can be seen).

    I will check with Chris how your board can be replaced.

    Thanks and regards,

    Thorsten
  • Hi Thorsten,

    i took the liberty to check the third board we bought, just in case something is wrong with it too. So i unpacked it and went to flash the device, surprisingly it flashed. The program i flashed is comunicating through the eUSCI were i write #two_digit_number and it returns tow_digit_number. The problem is, the firmware was returning #two_digit_number. So i guessed something was wrong, then i went to flash the program again. And gues what, it gave me the same error as the other board. Then i checked the hardware number, it's show in the picture below.

    Let me ask you, it is possible that CCS is somehow misreading the TLV_HWREV number or even modifying it?

    I ask because is really strange that it flashed the device, even with a firmware that is not behaving correctly ( and for the record i flashed it in the black version and the firmware is behaving correctly ) and then in the secont time the program behaves like the TLV_HWREV is something other than the numbers of the suported versions of the board, so the first time it identified it correctily and then misread/changed it.

    Below is a photo of the hardware. But it is the third board (not mine) because i forgot it at home when i came to the lab. But as far as i remember, the labels are the same XMSP432P401R REV C as shown in the pecture below ( if really need for both boards i can take a picture later).

    Thanx for the support.

  • Hi Antonio,

    thanks a lot for the picture - that helps us nailing that issue down.
    By using eUSCI, does your tool use the boot strap loader (BSL) for programming the device? Then it would be clear why programming is working - the BSL uses the correct routines for programming the device and does not need to check the HWREV.
    If you want to program with a debugger we need this information, as there are some differences in flash programming RevC and older HW revisions of the XMS samples.

    The TLV data is written during production and is read only - so there is no way to change this. It could be that the data is read out incorrectly by the tools, but I do not believe that.

    For the moment, can you live with programming the device via USCI? (Debugging would also be an issue)

    If you have the chance could you additionally give as the labeling of the other two devices (at least of the one with the same issue)?


    Thanks and regards,

    Thorsten

  • No, the firmware does not use BSL at all, it programs the microcontroller in MSP classic style and just reads and write data in a serial console.
    I can try to figure something out with a BSL ( always ready to learn something new! ) but i really want to be able to program and flash my launch pad in the classic style, haw i have more knowledge on how to do things.

    Yes i can get pictures of the other two boards, the other falty one and the working one. Later today i post the pictures.
  • Hi Antonio,

    in addition to the pictures could you tell us the version of CCS (desktop) you are using and the version of the MSP432 support files (CCS: Help/Installation Details).
    And do you have any other other IDE (IAR or Keil) with which you could try programming your launchpads?
    Just want to make sure that there is no tool issue or wrong configuration.

    Thanks and regards,

    Thorsten
  • Here the picture of the three boads. The first on the left is the functional one.

    *a detail of the third board on the right

    the readings on the chip:

    flashable: 63AHK2WG4

    not flashable: 62ARX1WG4 / 62ARX2WG4

    Code Composer Studio

    Version: 6.2.0.00050

    I'm trying to set up IAR's and KEIL's IDE.

  • Hi,

    I managed to setup KEIL's IDE and have some good and some bad news. Good news first, KEIL is flashing Rev 2.0 ( and Rev 1.0). Bad news is, that some firmwares that run in the Rev 1.0 do not run in Rev 2.0.

    I flashed some firmwares i been playing these days for my final course project that i garantee tha runs smoothly in Rev 1.0. I that it has something to do with DCO calibration because initially i flashed a firmware that doesn't change clock calibration and it run ok, then i flashed a program that comunicates over uart and for that i change SMCLK to 12MHz and the firmware doesn't do what's expected ( at that point i tried flash Rev 2.0 and it worked fine ).

    Tomorrow i will look more carefully into this and try to setup IAR's IDE.
  • Hi Antonio,

    so the same devices which were not working in CCS before, now you could program using Keil? What do you see in the TLV data there for HWREV?

    In CCS did you try to create a new Blinky example program from scratch and could you program it? Maybe with re installing CCS?


    The free versions of IAR and Keil are size limited - which might be the cause why some of your projects won't work.

    Thanks and regards,

    Thorsten

  • Yes i can program, in KEIL's IDE, and the TLV_HWREV shows the correct number, 0x43 for both boards that were not flashing in CCS. But as i said, the same firmware that callibrates the DCO runs in Rev 1.0 but not in Rev 2.0, if i flash a firmware that doesn't callibrate the DCO it run just fine. And the fact that KEIL have limited code size unfortunately is not a valid argument because i flashed both Rev 1.0 and Rev 2.0 with the same code.

    Still cannot flash with CCS, as it throws me the same error mesage. CCS was already reinstaled, with a pack that (at the time of the installation) was 3 days old so...

    But, it'a really strange that KEIL is reading the correct version of TLV_HWREV, but in those links you send i think one of them was about CCS misreading the TLV_HWREV, i will check it more carefully for some further information.

    But it's also really strange the fact that some firmware runs in both Revs and other don't, yesterday when i was playng with it i noteced that when the firmware reached the DCO calibration function instead of executing que code in the function it was jumping through some code that i didn't recognized (something about the startup/system code i guess, it was late at night so i didn't really dit into it) this is why i think is something about the DCO calibration.

    P.S.: i get my friend's board, the one that was working.....i flashed a firmware that doesn't calibrate DCO and ok it flashed. Then i proceeded to flash a firmware that does calibrate the DCO and it thrown me the error massage that it was not showing, obviously i panicked and went to flash back the firmware that does not calibrate DCO and nothing....the error massage appeared....i cleaned the project, rebuild and flashed and still get the message. Then i go to KEIL and it flashed fine the program that do not calibrate DCO. Now checking were in the code the program is stuck, the CDO calibration fuction is:

    void DCOconfig(void)

    {   //  CONFIGURAÇÃO DO CLOCK
        CS->KEY  =  0x695A;
        CS->CTL0 =  0;
        CS->CTL0 =  CS_CTL0_DCORSEL_5; // DCO 48MHz
        CS->CTL1 =  CS_CTL1_SELA__REFOCLK| // ACLK = REFOCLK
                    CS_CTL1_SELS__DCOCLK| // SMCLK = DCOCLK
                    CS_CTL1_DIVS__16| // SMCLK = DCOCLK/16 = 03MHz
                    CS_CTL1_SELM__DCOCLK; // MCLK = DCO
        CS->KEY  =  0;
    }
    and when the program reaches CS->CTL1 = .... it goes to Hard_Faul_Handler into the startup. Certainly something went wrong.....somethig that Rev 1.0 does not recognize as wrong.
  • Antonio,
    Thank you for your work on this. A couple of things:

    (1) I have sent you an offline request.
    (2) Can you also describe the flash wait states and the VCORE settings that are being used to support 48Mhz?
    (3) If possible could you try using the XDS110 from the rev 2.0 launchpad, that is not exhibiting the issue, to program one of the devices that has the issue? This can be done by removing all of the jumpers and either using a jumper cable between J102 of the working board to J8 of the board having issues or simply using jumper wires to bring signals from J101.

    Thanks and Regards,
    Chris
  • (2) flash wait and VCORE settings are factory, i do not change any configuration in any of these;
    (3) i have done what you sugested. Te result still the same: flashing a firmware that do not change any configuration in DCO it runs ok but any change in the DCO leads to fault handling code.

    From (3) i believe that the problem is that after the device enter the fault handling and puts the device in a state that XDS won't be able to acces the device, and misread the TLV_HWREG and conequently can't flash the device.
    But then when the device enter the fault handling state if i go to KEIL's IDE i'm able to flash the device -- reading some information of KEIL's pack for MSP432 it says that it was removed the defines for HWREV (whatever that means, but i think is related) but if it means that it does not read the TLV_HWREV and regard of the state of the micrcontroller it flashes it. By doing so, if i return to CCS, as the device is not in any state that XDS cannot comunicate, it can flash the device again.

    But the question is, why is the device in Rev2.0 entering fault handling routine but Rev 1.0 isn't?
  • I isolated the problem, but didn't find a workaround. The DCO calibration is as given below:

    void DCOconfig(void)
    {
        CS->KEY  =  0x695A;
        //CS->CTL0 =  0;
        CS->CTL0 =  CS_CTL0_DCORSEL_5;
        CS->CTL1 =  CS_CTL1_SELA__REFOCLK| // ACLK = REFOCLK
                    CS_CTL1_SELS__DCOCLK| // SMCLK = DCOCLK
                    CS_CTL1_DIVS__16| // SMCLK = DCOCLK/16 = 03MHz
                    CS_CTL1_SELM__DCOCLK; // MCLK = DCO
        CS->KEY  =  0;
    }
    somehow in the line CS->CTL0 =  CS_CTL0_DCORSEL_5; get the microcontroller to fault handling routines. I searched the MSP432P401R Device Erratasheet in hope that it has some workaround, but there isn't.
  • Antonio,
    It is important that the system is in VCORE1 and that the flash wait state is set to 1 in order for RevC to work at 48Mhz. It is entirely possible that the revision B silicon manifests a different issue when this part of the specification is violated.

    Please refer to sections 5.6 and 5.8 of the datasheet.

    www.ti.com/.../msp432p401r.pdf

    page 30 of revision r: www.ti.com/.../msp432p401r.pdf

    Best Regards,
    Chris
  • Ok, i changed the firmware with your instructions (not exactly your instructions but with the code example from TIREX, there the flash wait state is set to 2 rather than 1...!?!?) and it worked just fine, tomorrow i will test the code in the other two boards and see if it is working ok!

    Thank you Chris and Thorstein for all the attention and patience helping me!
    Tomorrow after i test the boards i close this discussion.
  • Thanks Antonio,
    The new REV C silicon supports 48Mhz operation with a flash wait state of 1, while the Rev B silicon required a wait state of 2. www.ti.com/.../slaa700.pdf

    Regards,
    Chris

**Attention** This is a public forum