INFINITY JN516X

Infinity JN516X provides JTAG programming support for the NXP JN516X devices. It supports programming of both the boot and application sectors. The software also supports programming of the customer MAC address and security, including features such as VBO voltage.

As well as an interactive GUI, the software can also be driven by the command line making it suitable for production use.

 

Programming the Boot and Application Sectors

The main programming is carried out on the Application and Boot Sector tabs.

 

 

In most cases the boot sector tab should be left alone. The NXP boot loader is pre-programmed during production at NXP and there is no need to reprogram it here unless you wish to take the option to develop your own boot loader. NOTE: Atomic Programming Ltd does not distribute the NXP boot loader as part of the application so erasing this sector will render the device useless.

The Application Sectors tab has four similar buttons for programming, verify erasing and blank checking the application sectors. Generally the application will be programmed starting at sector 0. This can be changed if your intention is to store multiple images inside the flash.

Both a PASS and FAIL counter are included in the bottom left corner. These values are retained when opening and closing the software. To reset each counter click on the count value and select Yes to reset.

The Log window on the right keeps you informed on your current programming operation.

Device Settings

The Device Settings tab allows custom setting to be programmed into the device.

The device settings allow features such as the brownout voltage and encrypted flash features to be programmed. See the NXP JN516X documentation for more details on these functions.

The Customer MAC address field allows a custom MAC address to be programmed in the device. If this field is left blank then NXP software stacks will use the default MAC address. If the customer MAC Address is programmed then the software will use this MAC address instead.

The device settings can be read from the JN5168 in software by using the Hardware API call:

PUBLIC bool_t bAHI_ReadCustomerSettings(

           bool_t  *pbJTAGdisable,

           uint8   *pu8VBOthreshold,

           uint8   *pu8CRP,

           bool_t  *pbEncryptedExternalFlash,

           bool_t  *pbDisableLoadFromExternalFlash);

 

The MAC Address can be read back using the API call:

PUBLIC bool_t bAHI_ReadMACID(

           bool_t   bReadCustomerMACID,

           uint64  *pu64CustomerMACId);

 

Reads back the MAC address. Passing TRUE in bReadCustomerMACID causes the customer MAC address to be read, otherwise the default MAC address is read.

Customer Fields

The Customer Fields Tab allows you to program the three customer fields that are available inside the JN516X family

 

The Encryption Key field can be used (in conjunction with the ‘Encrypt External Flash’ option) to specify the key for loading from external Flash. If this bit is not set in the options then this field can be used as another customer field.

The customer fields can be read in the JN5168 software by using the Hardware API call

PUBLIC bool_t bAHI_ReadUserData(

           uint8    u8UserFieldIndex,

           uint32   au32userData[4]);

where u8UserFieldIndex is 0-2 which match the three customer fields. The encryption key can be using the API call

PUBLIC bool_t bAHI_ReadCustomerAESkey(

           uint32   au32AESkey[4]);

 

 

Options

The Options Tab allows you to select the AP-114 that will be used for programming.

  

Select the device to be programmed and tick the box if the application sectors need erasing before programming.

To aid traceability in production you can save the results in a database. To save the results, create an SQL database as create a table as follow:

 

 

--

-- Table structure for table `program6x`

--

 

CREATE TABLE IF NOT EXISTS `program6x` (

  `DeviceIndex` mediumint(11) NOT NULL,

  `MACID` text NOT NULL,

  `FileName` text NOT NULL,

  `BootSector` tinyint(1) NOT NULL,

  `StartSector` int(11) NOT NULL,

  `RESULT` tinyint(1) NOT NULL,

  `TESTTIME` int(11) NOT NULL,

  `TESTDATE` datetime NOT NULL,

  `TYPE` int(11) NOT NULL

) ENGINE=MyISAM AUTO_INCREMENT=7161 DEFAULT CHARSET=latin1;

Command Line Options

The application can operate using the command line.  The file JN516XJTAGProgrammer.exe is located in the C:\Program Files (x86)\Atomic Programming\Infinity JN516X folder and has the following command line parameters:

-bp <bootfilename>  

Program and verify the <bootfilename> into the boot sector. If –be is set then the programming cycle occurs after the boot erase function

-ap <appfilename>  

Program and verify the <appfilename> into the application sector. If –ae is set then the programming cycle occurs after the application erase function. If the start sector is not specified then the default is 0.

-bv <bootfilename>  

Verify the <bootfilename> into the boot sector.

-av <appfilename>  

Verify the <appfilename> into the application sector. If the start sector is not specified then the default is 0.

-be

Erase Boot Sector

-ae

Erase Application Sectors

-bb

Blank Check Boot Sector

-ab

Blank Check Application Sectors

-as N

Specify the application start sector N. Use in conjunction with –ap and -av

-cfN <u32> <u32> <u32> <u32>

Program the customer field N with the four u32 HEX values

-ce <u32> <u32> <u32> <u32>

Program the encryption key with the four u32 HEX values

-mac <u64HEX>

Program the customer Mac Address with <u64HEX>

-p <SERIALNUM>

Specify the AP-114 programmer to use

-JN516N

Where N can be 1, 4, 8 or 9. If this option is not specified then the current default from the GUI is used.

 

The following values are returned

Error

Errorlevel

ERR_OK

0

ERR_ERASE_ERROR

-2

ERR_BAD_PROG_MODE

-3

ERR_BAD_FILENAME

-4

ERR_APPFILE_ERROR

-5

ERR_BOOTFILE_ERROR

-6

ERR_NOT_BLANK

-7

ERR_VERIFY_ERROR

-8

ERR_PARAM

-9

 

Please Note: The SQL options are not configurable from the command line and must be set in the GUI.

 

 

 

 

Connections

The following connections are required to connect the device for JTAG programming.

AP-114 Port 1

Name

Pin on JN516X

1

TCK

DIO4

2

GND

GND

3

TDO

DIO6

4

VCC

VCC

5

TMS

DIO5

6

ResetN

ResetN

7

SPICLK

DO0

8

-

-

9

TDI

DIO7

10

GND

GND