IPC@CHIP® RTOS-PPC – API Documentation

Header image

Main page


Command shell: Hardware commands


MEMDMP address size: Dump memory area
Dump a memory area on the console from a given memory address. The address is hexadecimal. The size is decimal. The results are show in hexadecimal and ASCII.
Example:
memdmp 200000 256
Since:
SC2x3 V1.00


PFI [[ERASE] / [interruptNumber level [A:] [B:] [D:] [E:] [F:] ]]

The purpose of the Power Fail Interrupt (PFI) is to inhibit any further sector writing to Power Loss Protected (PLP) disk drives.   Following this interrupt, the power supply must provide enough power for any current disk sector write to complete.   The hardware must provide a CPU reset after a PFI.
This command controls the Power Fail Interrupt configuration.   It has three command line argument variations.

  1. With no parameters the current PFI configuration will be reported.
  2. With the single parameter ERASE the current PFI configuration (if any is present) will be purged.   The input used for the PFI signal will be disabled.
  3. Otherwise two or more parameters are used to set up the PFI configuration.   The details for this case are described here.

Example #1:
 PFI 1 LOW
This example would perform the following API calls to configure the interrupt.
    irqSetMode( 1, 3 ) ;
    irqEnable( 1, TRUE ) ;
Example #2:
 PFI 21 HIGH D:
This example would perform the following API calls to configure the interrupt.
    gpioSetMode( 9, PIO_I ) ;
    gpioSetIntMode( 9, 2 ) ;
    gpioEnable( 9, TRUE ) ;

Sector writes to a PLP formatted D: drive in this example will not be inhibited after the PFI (which would have been the usual rule applied).    For all other PLP drives, further sector writing will be inhibited by the system's PFI handler.
Example #3:
 PFI ERASE
Any existing PFI configuration will be purged from non-volatile memory.   The interrupt would be disabled with API call
    irqEnable( 1, FALSE ) ;
     for example #1 or
    gpioSetIntMode(9, 0) ;  
    gpioEnable( 9, FALSE ) ;
     for example #2.   Any user callbacks installed for this interrupt will be removed.
Since:
SC2x3 V1.30


PIO [pionumber mode]/[group]: Enable and show PIO pins
Enables the programmable PIO pins or shows current state.
Example:
pio g1      ; Enable GPIO mode for group1 (PSC2)
pio 33 1    ; Enable PIO33 as input
pio         ; Show current PIO modes
The command can be entered with only one parameter to enable the GPIO mode for a group, see also gpioEnableGroup(). In this case the parameter must start with a 'g' and should be followed by the goup number. The following settings are possible.

Group:
     0-6

The command can be entered with two parameters to set a GPIO mode, see also gpioEnable() and gpioSetMode(). In this case the first parameter is the PIO number and the second parameter is the PIO mode. The following settings are possible:

PIO Number:
     0-39
PIO Mode:
     0 = Disable PIO mode
     1,2,3 = Input
     4 = Output, value = High
     5 = Output, value = Low
     6 = Output open drain, value = High
     7 = Output open drain, value = Low

If the command is entered without parameters, it show the current state of the GPIOs. The listed fields have the following meaning:

Table entry

Description

No

PIO number. This number is used in the GPIO API to refer the GPIO pin.

Pin

GPIO pin name. Note: In the hardware manual the pin names are extended with the PIO number in the No field, e.g. "PSC2_2" is called "PSC2_2/PIO7".

Type

GPIO pin type, see GPIO Types.

Grp

GPIO group, see GPIO Groups.

Av

Available. Represents whether or not the GPIO pin is available through the group setup. E.g. if a PSC group is used as an UART, the respective GPIO pins are not available, see GPIO Groups.

En

Enabled. Shows whether or not the GPIO pin is enabled, see gpioEnable().

Od

Opendrain mode. Shows whether or not the Opendrain mode is used, see gpioSetMode().

Dir

Direction. In for "Input" and Out for "Output" mode, see gpioSetMode().

OutVal

Output value. Shows the current driven output value, only valid for Output mode, see gpioWriteOutput().

InVal

Input value. Shows the current read input value, see gpioReadInput().

Int

Interrupt mode. Shows whether or not the interrupt mode is enabled, see gpioSetIntMode().

Wkp

Wakeup mode. Shows whether or not the wakeup mode is enabled, see gpioSetWkupMode().

IntMode

Interrupt sense. Shows the current interrupt/wakeup mode sense settings, see gpioSetIntMode() and gpioSetWkupMode().

Since:
SC2x3 V1.00


R8 address: Read 8 bit value from memory
Perform a 8 bit read from a given memory address. The address and the result are hexadecimal.
Example:
r8 200000
Since:
SC2x3 V1.00


R16 address: Read 16 bit value from memory
Perform a 16 bit read from a given memory address. The address and the result are hexadecimal.
Example:
r16 200000
Since:
SC2x3 V1.00


R32 address: Read 32 bit value from memory
Perform a 32 bit read from a given memory address. The address and the result are hexadecimal.
Example:
r32 200000
Since:
SC2x3 V1.00


TEMP: Shows temperature
This command displays the current onboard temperature.
Example:
temp
Since:
SC2x3 V1.00


W8 address value: Write 8 bit value to memory
Perform a 8 bit write on a given memory address with given data. The address and the data are hexadecimal. The address is the first parameter followed by data.
Example:
w8 200000 AA
Since:
SC2x3 V1.00


W16 address value: Write 16 bit value to memory
Perform a 16 bit write on a given memory address with given data. The address and the data are hexadecimal. The address is the first parameter followed by data.
Example:
w16 200000 AABB
Since:
SC2x3 V1.00


W32 address value: Write 32 bit value to memory
Perform a 32 bit write on a given memory address with given data. The address and the data are hexadecimal. The address is the first parameter followed by data.
Example:
w32 200000 AABBCCDD
Since:
SC2x3 V1.00





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Jan 26 16:21:35 2017 by Doxygen 1.6.1