J-Link-OB SAM3U

From SEGGER - Support Wiki
Jump to: navigation, search

J-Link OB is a single chip microcontroller "on-board" version of J-Link. It is designed to be a low-cost, single chip, on-board debug solution for evaluation boards. There are various J-Link-OB implementations available, which are based on different devices. This article refers to the J-Link-OB-SAM3U which is a J-Link-OB based on the Atmel SAM3U series device. For more information about what J-Link-OB, please refer to https://www.segger.com/jlink-ob.html

Limitations under Mac OS X

Problem description

There are different implementations of the J-Link-OB-SAM3U on various eval boards. The following only applies to implementations which incorporate VCOM support as well as MSD drag & drop programming support.

By hardware design, the Atmel SAM3U device implements 6 USB endpoints (EPs) that can be used. The following EPs are used by the J-Link firmware:

  • J-Link component: 2 EPs
  • VCOM: 2 EPs
  • MSD: 2 EPs

Unfortunately, only 4 of the 6 EPs support USB packet sizes of up to 512 bytes. The EPs used for VCOM are the ones that do not support 512 byte packet sizes but only 64 bytes. As the J-Link-OB-SAM3U enumerates as a USB Hi-Speed device, by USB spec. all endpoints need to support packets sizes up to 512 bytes. This cannot be fulfilled on the SAM3U when using all 3 components.

While this is no problem under Windows and Linux, it is a problem under Mac OS X. OS X will not send packages on the VCOM port that are bigger than 64 bytes in size. Such packages are "swallowed" silently and only a message is output in the syslog of OS X. No errors etc. are returned on the system API level. From the J-Link firmware side it is always made sure that no packets bigger than 64 bytes are sent on the VCOM port. If necessary, J-Link splits a transaction into multiple packets.

Affected Evaluation Boards

The following evaluation boards are for example affected by this limitation:

  • NordicSemi nRF51-DK
  • NordicSemi nRF52-DK

Workaround 1

If both are needed the MSD and VCOM component, please make sure that no packets bigger than 64 bytes are sent on the VCOM port, by your application.

Workaround 2

If MSD and VCOM are not needed at the same time, it is possible to disable the MSD component on the J-Link, freeing 2 EPs so that these ones can be used for VCOM to support 512 byte packets. In order to disable the MSD component, please do the following:

  • Connect the J-Link-OB to your PC
  • Start J-Link Commander
  • execute the following command (without quotes): "MSDDisable"
  • Quit J-Link Commander
  • Power-cycle J-Link-OB

To re-enable the MSD component, please perform the same procedure as above but use the "MSDEnable" command instead.