How to enter netX 90 Console Mode via packet command?

Q

How to start netX console mode via packet command?

A

(warning) Note: The described service is not supported by all LFWs yet. It will be available in Firmwares released in January 2020 and later.


Use the HIL_FIRMWARE_RESET_REQ packet command with the HIL_RESET_MODE_CONSOLESTART mode.

Firmware Reset request

The application uses the following packet in order to reset the netX chip. The application has to send this packet through the system mailbox.

Variable

Type

Value / Range

Description

ulDest

uint32_t

0x00000000

HIL_PACKET_DEST_SYSTEM

ulLen

uint32_t

8

Packet data length (in Bytes)

ulCmd

uint32_t

0x00001E00

HIL_FIRMWARE_RESET_REQ

Data

ulTimeToReset

uint32_t

0

Time delay until reset is executed in milliseconds [ms]

Fix: 500ms (not changeable)

ulResetMode

uint32_t

0

Reset Mode & Parameter

Specify the kind of reset to execute (see table below).

Table : HIL_FIRMWARE_RESET_REQ_T – Firmware Reset request


Variable: ulResetMode

Bit No.

Definition / Description

31..9

reserved

8

Delete complete remanent data area after reset.

1 = Remanent data area will be deleted.

0 = Remanent data area will not be deleted.

This option is only available for the modes BOOTSTART and UPDATESTART.
In mode BOOTSTART, the remanent area is deleted when the maintenance firmware starts up.
In mode UPDATESTART, the remanent are is only deleted after a successful firmware installation.

7..4

Reset Parameter

Arguments that will be evaluated upon system reset.

For mode HIL_RESET_MODE_UPDATESTART

0x0 … 0xF = This value specifies the firmware that will be installed.

For mode HIL_RESET_MODE_CONSOLESTART

0x0 = Start/Enable ethernet interface

0x1 = Start/Enable UART interface

0x2 = Start/Enable USB interface

The interface is hardware specific and should only be jumped into if it is actualy available.

3..0

Reset Mode

0 = HIL_RESET_MODE_COLDSTART

The cold start will perform a reset of the device and starts the installed firmware again.

1 = HIL_RESET_MODE_WARMSTART

Unused.

2 = HIL_RESET_MODE_BOOTSTART

The boot start will perform a reset of the device and starts the maintenance firmware. The boot start can be used to start the maintenance firmware without starting an update process (idle mode).

3 = HIL_RESET_MODE_UPDATESTART

The update start will perform a reset of the device and start the maintenance firmware.

If a valid update file is available, it will be automatically processed and installed.

If no update file is available or if the update file is not valid, the maintenance firmware will change into error mode , changes the SYS LED (to yellow on) and sets an error code (e.g. ERR_HIL_NOT_AVAILABLE, 0xC0001152).

4 = HIL_RESET_MODE_CONSOLESTART

The console start will perform a reset of the device and start the specified ROM loader console mode (see Reset Parameter above). The firmware will not start up again, all communication takes place with the ROM loader now.

Other values are reserved


Packet structure reference

/* CHANNEL RESET REQUEST */
#define HIL_FIRMWARE_RESET_REQ               0x00001E00
 
typedef struct HIL_FIRMWARE_RESET_REQ_DATA_Ttag
{
  uint32_t ulTimeToReset;  /* time to reset in ms   */
  uint32_t ulResetMode;    /* reset mode parameter  */
} HIL_FIRMWARE_RESET_REQ_DATA_T;
 
typedef struct HIL_FIRMWARE_RESET_REQtag
{
  HIL_PACKET_HEADER              tHead;  /* packet header */
  HIL_FIRMWARE_RESET_REQ_DATA_T  tData;  /* packet data   */
} HIL_FIRMWARE_RESET_REQ_T;


Firmware Reset confirmation

Variable

Type

Value / Range

Description

ulSta

uint32_t

See Below

Status / error code, see Section 6.

ulCmd

uint32_t

0x00001E01

HIL_CHANNEL_RESET_CNF

Table: HIL_FIRMWARE_RESET_CNF_T – Firmware Reset confirmation


Packet structure reference

/* CHANNEL RESET CONFIRMATION */
#define HIL_CHANNEL_RESET_CNF                HIL_CHANNEL_RESET_REQ+1
 
typedef struct HIL_FIRMWARE_RESET_CNF_Ttag
{
  HIL_PACKET_HEADER     tHead;  /* packet header                           */
} HIL_FIRMWARE_RESET_CNF_T;