Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

search inside this forum
search inside all forums
Cyclone Debug Connection Failing First Time, Succeeding Subsequent Times
Geoff F. Mar 3, 2016 at 05:22 PM (17:22 hours)
Staff: Johnny N.

  • We have a production programming system using (currently) two Cyclone Pros and a LabVIEW program on a WinXP box controlling the DLL to load images and calibrate our module.

    The Cyclones are set up to power the modules from an external power supply that we control.

    Sequence is:
    1) Program Startup:
    1a) Load DLL (Done automatically by LabVIEW/Windows)
    1b) Turn on and check the power supplies (including the supply to the Cyclones).
    1c) Wait for the power to stabilise and the Cyclones to start up.
    1d) Call EnumerateAllPorts
    1e) For each Cyclone:
    1e1) Call ConnectToCycloneProMax and record the handle
    1e2) Erase all images
    1e3) Load the required images
    2) For each module to be programmed:
    2a) Check the Cyclone power is within range
    2b) Turn on and check the power supply for the module.
    2c) After a stabilisation period, double-check the output voltage.
    2d) Check for board presence via the power supplies.
    2e) Execute the first image.
    2f+) Numerous other steps.

    Step 2e is where it fails:
    What I'm finding is that a virgin board will fail with an error 7 (failed to establish debug session) the first time it is run on the system, but if we run it again it will pass.

    I'm wondering if I have to put in a step to power the board off then on again, but I wouldn't have expected to have to do this.

    Oh yes, the module is running a Freescale 9S08 variant.

    Any clues?


    • Oh yes:

      I've also discovered that if I fully erase the module using CodeWarrior or an "Erase Module" SAP image, the behaviour is the same: That is, it fails to connect first time, but runs subsequent times.

      • I also don't connect to and close the Cyclone each time through - just once at startup of the station, then again at shutdown.

        If I omit the loading of images, the connection should be relatively quick, I'd hope.

        • I've now tried this, but there's no significant difference.

          • Hi Geoff,

            1. Which HCS08 device are you programming?

            2. Are you using any custom adaptors or programming ribbon cable?

            3. What firmware version are you running on your Cyclone Pros?

            Blank HCS08 devices can enter into a reset condition that prevent the P&E BDM dongle from entering debug mode. We perform a Power On Reset operation to take control of the device and bring it out of the reset condition.

            Please use the Cyclone Pro to provide power to your board to prevent error 7s from occurring. See this FAQ for more information.


            • Thanks Johnny.

              1) It's a PA8 variant. We're running an 8MHz internal instruction clock, but to get there we need to start up a PLL.

              2) It's very custom. We're actually using relays to switch the lines between sides of the jig so we can set up one side while we do the other, and a bed-of-nails jig. Yes, I'm aware of the issues there with impedances, etc, but it's not exactly a high-speed signal. It does work most of the time.

              3) I let the automatic update run on them quite recently. Without going out to the production floor to confirm, I'm pretty sure they're running version 8.63.

              Would the POR be via the "Reset Signal Settings" of the image utility or via the "RE" command? Would it make sense to put a POR image in the mix to do this job? If so, would it be a CM, RE job with the setting checked to "Drive RESET signal LOW..."? What sort of delay should I incorporate, given that start-up is pretty quick? (I'm thinking something of the order of 10ms would probably do.)

              Power is supplied from a controlled power supply through the Cyclone Pro via the Cyclone Pro's built-in relays.



              • With this change, we now have 4 SAP images to load into the Cyclone:
                1) Our calibration firmware image;
                2) Our release firmware image;
                3) An image to load the algorithms after calibration is complete and the DUT restarts;
                4) An image to reset the DUT.

                I'm now getting an error from the Cyclone when we try to load the images. Exact wording is:
                "Could not load image: C:\redacted\03_Software\redacted\Releases\Image_Calibration.SAP"

                When I revert to a previous version of code (but the same configuration, so it still tries to load), there are no apparent problems.

                • By "previous version of code", I mean the previous version of the programming station code.

Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2018 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement