nrf52840dk Jlink OB USB cdc offsets 1 character

I have read through similar posts, though none seem to talk directly about the DK and the JLink OB (SAM IC) missing bytes itself.

To start off with, I have created a basic console application on NCS v1.8.0 on my nrf52840dk. Utilising the USB CDC for ease of connection, this removes the need for an external uart interface.

The console app itself seems largely to work because I use the same api calls and configurations on the nrf9160 on a thingy91 board (specifically not on the nrf52840 on the thingy91...for various reasons just go with it ^^). First noticing that my console couldn't handle the data that was being sent, I started echoing the hex of the byte received back over the console and noticed that it was always out by 1 character.

Scoping location:

In the end I used my oscilloscope and scoped the output from the SAM IC to the input to the nrf52840 on P0.06 and TP4. Leaving my probe on TP4 and doing a fresh power up I note the following:

  1. No default output occurs from SAM -> 52840
  2. Open Com port with baud @ 115200, no hw control IOs set
  3. Send 1 byte through 0x30
  4. This comes up correctly as 0x30 on the scope
  5. send through 0x31, this reads as 0x30 on scope
  6. send through 0x32, this comes up as 0x31
  7. send through 0x32, this comes up as 0x32
  8. send through 0x33, this comes up as 0x32
  9. and repeat

It appears as though there might be a bug on my nrf52840dk jlink OB IC. I am unsure how/when this occurred as I believe it used to work just fine and this is a recent acquisition. on my DK, the SAM IC has the following information printed on it:

  • PCA10056
  • 2.0.1
  • 2020.13
  • 683824488

I do not believe that I updated my SAM IC's firmware at any point, though if I did, what would be the procedure for reflashing this IC? I do have an external JLink programmer and the special 2x5 1.27mm spring pin cable for programming it if required.

Parents Reply
  • Hi Jon,

    In this case I was referring to programming the Atmel (Microchip) based ATSAM3U2CA - the IC chosen to use as the Jlink OB. I do believe this IC is supported by the Atmel ICE. However, I do also have an external JLink Pro that I could use to reprogram the Onboard Jlink OB as well. Though I don't know what the best way to go about it. Does the OB for instance, have a bootloader that I could simply upgrade/reflash its firmware over USB? Or is it better to reflash the chip entirely?

    As you mentioned though if I don't come to a solution, I may just bypass the USB CDC convenience and use and external USB to Serial converter.

    Cheers,

    Ryan.

Children
Related