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.

Can't flash examples to LP-EM-CC2340R5 (with LP-XDS110) using CCS 12.1

Other Parts Discussed in Thread: CC2340R5, SYSCONFIG, UNIFLASH, LP-EM-CC2340R5

Hi,

I have an issue that is similar to the one described by  in this previous thread (which was locked by Clément before I could post):

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1177752/neither-ccs-nor-uniflash-are-able-to-connect-to-lp-em-cc2340r5-eval-board/4437156?tisearch=e2e-sitesearch&keymatch=cc2340#443715

The following applies to all the imported examples from the latest SDK (all versions listed later below) and to the examples in the CC23XX_EXAMPLES_PREVIEW_v1.0.1.zip which I have successfully (I think) ported to the latest SDK and built. For the sake of this thread, I will refer specifically to the simple_peripheral_LP_EM_CC2340R5_freertos_ticlang example. BTW I also tried to delete from workspace (where it was copied) and importing it again after having made 100% sure that the first product discovery path in CCS was unticked and it was restarted (but that was the way I had originally set it up, following the instructions). I'm using CCS 12.1 (on Linux) which has been patched with the files in cc23xx_device_support_0.01.11.307_linux.zip as described in the guide and all files are at their latest version as of today 12/17/22 in my secure resources. (I have also patched the SPI drivers in the root folder of the example, but it doesn't seem relevant to the issue, which is not affected at all). I have also successfully set the ID on the CC23xx LaunchPad by running xdsdfu -d 0x2b.

I have followed all the required steps in the Quick Start Guide and in the above mentioned thread, but when I encounter the error pop up (which I wanted to replicate on purpose before the suggested fix, in order to confirm mine was a blank device):

Error connecting to the target:
(Error -1274 @ 0x0)
Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).
 If blocked by security, and if supported, access may be allowed after following the Authentication process.
(Emulation package 9.9.0.00040)

when I then follow all the steps, ProgramDefaultCcfg doesn't show up in the Scripts, only Scripts >>> LoadRomSymbols is available. In addition to that I keep getting a:

Cortex_M0P: Error initializing flash programming: Unknown property "SectorSize"

error. In SysConfig, in the NVS driver section, I see the following default options:

Internal Flash

Region Type: Generated
Region Base: 0x70000
Region size: 0x1000
Sector Size: (greyed out and can't be modified 0x800)

Does this give you a clue?

Here are my installed products and versions straight from the CCS >>> Preferences >>> Products window:

To give you a more complete picture, here are the console logs (------- are separators introduced by me) of the different attempts to follow the guide and thread instructions:

Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 0.01.11.307
Cortex_M0P: Error initializing flash programming: Unknown property "SectorSize"
Cortex_M0P: GEL: Error while executing OnPreTargetConnect(): 'EnsureAuthentication()' not found
     at EnsureAuthentication(1) [cc23xx_xds.gel:74]
     at OnPreTargetConnect()
Cortex_M0P: Error connecting to the target: (Error -1274 @ 0x0) Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).  If blocked by security, and if supported, access may be allowed after following the Authentication process. (Emulation package 9.9.0.00040)

---------------------------------------------------------------

Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 0.01.11.307
Cortex_M0P: Error initializing flash programming: Unknown property "SectorSize"

---------------------------------------------------------------

Cortex_M0P: Error initializing flash programming: Unknown property "SectorSize"
Cortex_M0P: GEL: Error while executing OnPreTargetConnect(): 'EnsureAuthentication()' not found
     at EnsureAuthentication(1) [cc23xx_xds.gel:74]
     at OnPreTargetConnect()
Cortex_M0P: Error connecting to the target: (Error -1274 @ 0x0) Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).  If blocked by security, and if supported, access may be allowed after following the Authentication process. (Emulation package 9.9.0.00040)
Cortex_M0P: File Loader: Verification failed: Could not write 0x00000000: target is not connected
Cortex_M0P: GEL: File: /home/disegni/workspace_CC2340/simple_peripheral_LP_EM_CC2340R5_freertos_ticlang/Release/simple_peripheral_LP_EM_CC2340R5_freertos_ticlang.out: Load failed.

---------------------------------------------------------------

 has mentioned in the thread that there is a known issue when trying to write at 0x00 but I'm still lost in the process. Please let me know if you need more information.

I'm confident there's something trivial that I'm doing wrong in configuring the tools but I cant figure it out, could you kindly help me?

Thank you and kind regards,

Stefano

  • Also another e2er, reporting a different error, is claiming that a TI FAE told him that there's a bug in CCS 12.1 whichprevents flashing blank devices:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1179784/cc2340r5-flashing-issue

    Is this confirmed and is downgrading to CCS 12.0 with cc23xx_device_support_0.01.08.221_linux.zip (from my current CCS 12.1 with cc23xx_device_support_0.01.11.307_linux.zip) the suggested workaround?

    In this other thread, also related to blank CC2340 flashing issues, but with another different error, this time related to a board apparently shipped with a pre-flashed device:

    https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1176313/cc2340r5-error-initializing-flash-programming

    TI Guru Clément is suggesting to try and verify/change some Flash Settings but I don't have this option in project preferences (advanced settings) Debug >>> Texas Instruments XDS110 USB Debug Probe/Cortex_M0P (only have Program/Memory Load Options, Auto Run and Launch Options and Misc/Other Options) in CCS 12.1. How do I get this setting enabled to try this out?

    Apologies and please delete if this is considered cross posting (however they are all different errors) but I'm just trying to put the pieces together.

    Thanks for helping.

  • While trying to randomly investigate the issue on my own, I started looking into the default SysConfig provided with the simple_peripheral_LP_EM_CC2340R5_freertos_ticlang example in the latest simplelink_cc23xx_sdk_6_30_00_20_eng__linux.zip. I have looked into this Flash Protection Settings option (Picture 1), where all protections are ticked (especially the CCFG sector that reminds me of the missing ProgramDefaultCcfg script I mentioned earlier and also about the missing Project preferences >>> Debug >> Flash Settings option setting Clément is mentioning in the other thread, see Picture 2). Does this have anything to do with the issue? I don't want to untick it/them and try, since I'm worried I can damage the device. Perhaps it's a clue:

    Picture 1:

    Picture 2, from the other thread (https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1176313/cc2340r5-error-initializing-flash-programming):

    Thanks!

  • Hi Stefano,

    Have you added the property file to its correct place?  These are the details from Clement on the prior E2E thread:

    We have managed to reproduce the issue you have reported with Uniflash.

    This issue is likely to be caused by a missing XML file. The file to use is here: /cfs-file/__key/communityserver-discussions-components-files/538/CC23xx_5F00_FlashProperties.xml

    Please follow these steps:

    1> Close Uniflash
    2> Copy the provided xml file into Uniflash installation: uniflash_8.1.0\deskdb\content\TICloudAgent\win\ccs_base\DebugServer\propertyDB
    3> Open Uniflash and Re-sync the database (click "Settings" then scroll to the bottom of the window and eventually click the "Re-sync Database" button).

    For CCS, add the XML file to the ti\ccs1210\ccs\ccs_base\DebugServer\propertyDB folder.  Thank you for your patience as the holiday season could lead to longer response times.

    Best regards,
    Ryan

  • , thank you for your quick reply. Your suggestion regarding CCS and where to paste the missing XML resolved my issue. Just to clarify, I was confused by the previous thread, which mentioned this as a Uniflash solution and by its original poster stating his CCS issues weren't solved. I didn't want to experiment with configurations by myself and without advice, fearing to somehow damage / brick the device while in such a preliminary stage.

    Just to give a further clue on how this worked for me, after adding the XML file to the CCS folder that Ryan had kindly suggested (and restarting CCS just in case), I tried the ordinary way first (just to experiment) and it didn't work, but the console log was very clear and it suggested the right procedure (which was the same that was suggested by Clément earlier) to flash the device for the first time with an example. After it is completed once, it's no longer needed and the LP-EM-CC2340R5 behaves like any other one in non-preview form. Just for the sake of clarity, here's the console output (first part only is relevant to CCS) I was talking about:

    Cortex_M0P: Flash loader: CC23xx_FLASH_LIBRARY_VERSION 0.01.11.307
    Cortex_M0P: Debugging is not allowed. If this not expected, check your CCFG.
    Cortex_M0P:     Flash loading is currently not supported if debugging is not allowed.
    Cortex_M0P:     If you are experiencing issues with loading your application, do the following (this will erase the chip):
    Cortex_M0P:      - Code Composer Studio:
    Cortex_M0P:        - End the current debug session (if any is active).
    Cortex_M0P:        - View -> Target Configurations -> Right click on .ccxml file for your project -> Launch Selected Configuration.
    Cortex_M0P:        - Run -> Load -> LoadProgram -> Select the program file containing a valid CCFG.
    Cortex_M0P:        - You should now be able to load your application to the target.
    Cortex_M0P:      - UniFlash:
    Cortex_M0P:        - Run the following dslite command:
    Cortex_M0P:          dslite --mode cc23xx-prog-default-ccfg -c [path to your ccxml file]
    Cortex_M0P:        - You should now be able to load your application to the target.
    Cortex_M0P: Halting at entry of application is not allowed. Are you sure debugging is allowed?
    Cortex_M0P: Running the application, without halting at the entry of the application.
    Cortex_M0P: Error connecting to the target: (Error -1274 @ 0x0) Error encountered during connect sequence.  The specific reason is unknown but may be the result of trying to access a Core or logic that is inaccessible due to a lack of Power, Clocks, or Authentication (i.e. Security is preventing).  If blocked by security, and if supported, access may be allowed after following the Authentication process. (Emulation package 9.9.0.00040.

    I can now confirm that the LP-EM-CC2340R5 is flashing and loading properly with my current tools (latest versions in my secure resources as of 12/19/22) in Linux:

    CCS 12.1

    cc23xx_device_support_0.01.11.307_linux.zip

    simplelink_cc23xx_sdk_6_30_00_20_eng.zip

    sysconfig-1.14.0_2668-setup.run

    CC23xx_FlashProperties.xml (added in the /ccs1210/ccs/ccs_base/DebugServer/propertyDB folder as kindly suggested by Ryan and Clément, I restarted CCS just in case and followed the instructions you can find in the console log).

    By following the Quick Start Guide and after porting it to the latest SDK, I was ultimately able to load the simple_serial_socket_server_LP_EM_CC2340R5 example from CC23XX_EXAMPLES_PREVIEW_v1.0.1.zip, and run and test it successfully as shown in the Out Of The Box Experience guide in CC23XX_SIMPLELINK_ACADEMY_PREVIEW_v1.0.1.zip

    Thank you Ryan, Clément and TI for helping me,

    kindest regards and happy holiday season,

    Stefano