Problems programming SAMD51

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Problems programming SAMD51

      Hej!

      For a new project we are using the Atmel SAM D51 MCU as our microcontroller. However, we are experiencing multiple problems when we try to connect to the controller, both via the JLink EDU Mini as well as with the SAM-ICE.

      - The JLlink EDU Mini cannot connect to the target at all, it can't detect the Device ID or the architecture
      - The SAM-ICE can read the Device ID and architecture correctly, however we cannot successfully program anything on the MCU

      We already know from Microchip that there is a bug in the current version of Atmel Studio, that results in problems when trying to connect through JTAG, those will be solved according to them in the near future. Therefore, we changed to using JLink Commander and JLink Flash Lite, but could not get the MCU working either.

      With the SAM-ICE we can erase the flash memory, download .bin files to the target, we can verify the file afterwards, we can readout and set registers and specific sections of the memory, however, the controller is not doing anything. When we halt the CPU and step through the program we always get the same machine instruction over and over.

      We also experienced connection problems from time to time via SAM-ICE. Generally 'erase' usually only works if it is the first command after connecting to the target. When the CPU is already running it sometimes can't be halted anymore, after manually resetting the CPU and reconnecting to the target in the Commander.

      We appreciate any hint on what could go here, as we are really at the end of our debugging ideas ;) We unfortunately don't have an eval board available, so we can only debug on our custom setup!

      Thank you very much in advance!
      Nick
    • Hello Nick,

      Thank you for your inquiry.
      Could you provide the S/N of your J-Link and SAM-ICE?
      Are you using custom hardware or an eval board?
      Which J-Link software package version are you using?
      Are you setting the security bit in your setup? wiki.segger.com/ATSAM_Device_Series
      We had some improvements in regards of unsecuring SAMD51 target devices a couple of software releases ago.
      Could you try the latest software version and report if the behaviour improves?

      Best regards,
      Nino
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support contact us per e-mail.
      The following contact form can be used for this: Contact Us

    • Dear Nino,

      thank you for the response!
      The S/N are as follows:
      - Atmel SAM ICE: 28014685
      - JLink EDU Mini: 801005522

      We are using the latest version provided on the SEGGER homepage (V6.32g). We are not setting the security bit in our application, and we do have a custom hardware, but for now this is just the controller on a breadboard, connected according to the schematics given in the data sheet. We have also checked that the supply voltages are correct and stable.

      Thank you for you assistance!

      Best regards,
      Nick
    • Hello Nick,

      Thank you for providing additional information.

      nik94 wrote:

      When we halt the CPU and step through the program we always get the same machine instruction over and over.
      Do you have a debug build of this application? Where does your application start looping exactly?
      We assume it is either a HardFault (if some device init went wrong) or a active Watchdog in your application.
      Do you have any watchdogs enabled?

      Best regards,
      Nino
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support contact us per e-mail.
      The following contact form can be used for this: Contact Us