CODECOMPOSER: flashing MSPM0G3107 via Segger programmer from within IDE not always working correctly

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: SEGGER, MSPM0G3107, SYSCONFIG

Tool/software:

Hi 

i have come across the issue that flashing the MSPM0G3107 MCU from within the CCS Theia (v20.1.0.6__1.7.0) via the Segger JLink programmer is not always working. 

This is happening to me on a somewhat regular basis now and with several (identical custom) boards. the same behavior has already been observed in some older versions of the IDE 

The result looks like depicted below 

so apparently the fault is somehow related to the programming of the Nonmain section (which indeed is part of the to be generated binary and which i know to be effectively all default values except for the BSL invoke pin as that at default would lead to issues in our application....)

This behavior goes hand in hand with the flashing attempt taking in the order of a minuate instead of several seconds at most. 

My current workaround is to flash a known working binaryfile (with the same nonmain contents though) via the Jflash programming tool and then pave over with the IDE 

(When i talk about flashing through the IDE i actually mean flash and start debug session....)

my launch config looks like this

 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
"version": "0.2.0",
"configurations": [
{
"name": "MCUCode",
"type": "ccs-debug",
"request": "launch",
"projectInfo": {
"name": "MCUCode",
"resourceId": "/MCUCode"
}
}
]
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

my target configuration is setup like this 

my working jlink configuration is setup like this (gotta be stored as a .jflash file attachment upload did not seem to work for me)

 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
AppVersion = 79611
FileVersion = 2
[GENERAL]
aATEModuleSel[24] = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
ConnectMode = 0
CurrentFile = "C:\Users\pbendema\OneDrive - Clarios\Dokumente - Clarios Li-ION 12V LISB battery - LISB III\06_Product_Engineering\07_Software\Releases\Staging Releases\SW_BSample_105_23012025_1804_55c737d5.elf"
DataFileSAddr = 0x00000000
GUIMode = 0
HostName = ""
TargetIF = 1
USBPort = 0
USBSerialNo = 0x00000000
UseATEModuleSelection = 0
[JTAG]
IRLen = 0
MultipleTargets = 0
NumDevices = 0
Speed0 = 4000
Speed1 = 4000
TAP_Number = 0
UseAdaptive0 = 0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

my configured nonmain settings are (autogenerated by sysconfig tool): 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PLACE_IN_MEMORY(".BCRConfig")
const BCR_Config BCRConfig =
{
.bcrConfigID = 0x1,
.debugAccess = BCR_CFG_DEBUG_ACCESS_EN,
.swdpMode = BCR_CFG_SWDP_EN,
.tifaMode = BCR_CFG_TIFA_EN,
.bslPinInvokeEnable = BCR_CFG_BSL_PIN_INVOKE_EN,
.passwordDebugLock = {CFG_DEFAULT_VALUE, CFG_DEFAULT_VALUE,
CFG_DEFAULT_VALUE, CFG_DEFAULT_VALUE},
.fastBootMode = BCR_CFG_FAST_BOOT_DIS,
.bootloaderMode = BCR_CFG_BOOTLOADER_MODE_EN,
.massEraseMode = BCR_CFG_MASS_ERASE_EN,
.factoryResetMode = BCR_CFG_FACTORY_RESET_EN,
.passwordMassErase = {CFG_DEFAULT_VALUE, CFG_DEFAULT_VALUE,
CFG_DEFAULT_VALUE, CFG_DEFAULT_VALUE},
.passwordFactoryReset = {CFG_DEFAULT_VALUE, CFG_DEFAULT_VALUE,
CFG_DEFAULT_VALUE, CFG_DEFAULT_VALUE},
.staticWriteProtectionMainLow = CFG_DEFAULT_VALUE,
.staticWriteProtectionMainHigh = CFG_DEFAULT_VALUE,
.staticWriteProtectionNonMain = BCR_CFG_NON_MAIN_STATIC_PROT_DIS,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

i have observed this issue with both sw versions that implement MCU power save modes and sw version that do not so i can rule that out as a possibility

  • Hi Marc,

    I also test to flash a program with nonmain by CCS v20.1.0.6__1.7.0 + JLink, and it seems work well. 

    I think the nonmain data should be fine since it is auto generated by sysconfig.

    Could I ask what modification have you made for .jflash file?

    Best Regards,
    Pengfei