JLab Signal Distribution Switch Slot module  A5
 All Data Structures Files Functions Variables Macros Groups
Firmware Update

Functions

int sdFirmwareFlushFifo ()
 Flush the FIFO used in write data to the ROM. More...
 
int sdFirmwareLoadFile (char *filename)
 Load the specified file containing the firmware, into local memory. More...
 
void sdFirmwareFreeMemory ()
 Free the memory allocated to store the firmware. More...
 
int sdFirmwareVerifyPage (unsigned int mem_addr)
 Verify the page of data starting a specified memory address. More...
 
int sdFirmwareVerifyPageZero (unsigned int mem_addr)
 Verify the page of data starting a specified memory address, is zero. More...
 
void sdFirmwareWritePage (unsigned int mem_addr)
 Write a page of data starting a specified memory address. More...
 
int sdFirmwareWriteToMemory ()
 Write entire firmware to SD's ROM. More...
 
int sdFirmwareVerifyMemory ()
 Verify that SD's ROM contains exactly the contents of the firmware. More...
 
int sdFirmwareReadStatus ()
 Check the read status of the FIFO. More...
 
int sdFirmwareReadAddr (unsigned int addr)
 Read a specific address from the ROM. More...
 
void sdFirmwarePrintSpecs ()
 Read protected information from the ROM. More...
 

Detailed Description

Function Documentation

int sdFirmwareFlushFifo ( )

Flush the FIFO used in write data to the ROM.

Returns
OK if successful, otherwise ERROR;

References SDStruct::memReadCtrl, SDLOCK, and SDUNLOCK.

void sdFirmwareFreeMemory ( )

Free the memory allocated to store the firmware.

Returns
OK if successful, otherwise ERROR;
int sdFirmwareLoadFile ( char *  filename)

Load the specified file containing the firmware, into local memory.

Parameters
filenameName of file
Returns
OK if successful, otherwise ERROR;

References SD_MAX_FIRMWARE_SIZE.

void sdFirmwarePrintSpecs ( )

Read protected information from the ROM.

Prints to standard out

  • Serial Number
  • Assigned Hall and Hardware Version
  • Initial Firmware Version

References sdFirmwareReadAddr().

int sdFirmwareReadAddr ( unsigned int  addr)

Read a specific address from the ROM.

Returns
Value at address (8 bits).

References SDStruct::memAddrLSB, SDStruct::memAddrMSB, SDStruct::memReadCtrl, SDLOCK, and SDUNLOCK.

Referenced by sdFirmwarePrintSpecs(), and sdGetSerialNumber().

int sdFirmwareReadStatus ( )

Check the read status of the FIFO.

Returns
OK if successful, otherwise ERROR;

References SDStruct::memCheckStatus, SDStruct::memReadCtrl, SDLOCK, and SDUNLOCK.

int sdFirmwareVerifyMemory ( )

Verify that SD's ROM contains exactly the contents of the firmware.

Returns
OK if successful, otherwise ERROR;

References SDStruct::memAddrLSB, SDStruct::memAddrMSB, SDStruct::memReadCtrl, SDLOCK, and SDUNLOCK.

int sdFirmwareVerifyPage ( unsigned int  mem_addr)

Verify the page of data starting a specified memory address.

Parameters
mem_addrAddress of memory to check
Returns
OK if successful, otherwise ERROR;

References SDStruct::memAddrLSB, SDStruct::memAddrMSB, SDStruct::memReadCtrl, and SDUNLOCK.

Referenced by sdFirmwareWriteToMemory().

int sdFirmwareVerifyPageZero ( unsigned int  mem_addr)

Verify the page of data starting a specified memory address, is zero.

Parameters
mem_addrAddress of memory to check
Returns
OK if successful, otherwise ERROR;

References SDStruct::memAddrLSB, SDStruct::memAddrMSB, SDStruct::memReadCtrl, and SDUNLOCK.

Referenced by sdFirmwareWriteToMemory().

void sdFirmwareWritePage ( unsigned int  mem_addr)

Write a page of data starting a specified memory address.

Parameters
mem_addrAddress of memory to write
Returns
OK if successful, otherwise ERROR;

References SDStruct::memAddrLSB, SDStruct::memAddrMSB, and SDStruct::memWriteCtrl.

Referenced by sdFirmwareWriteToMemory().

int sdFirmwareWriteToMemory ( )

Write entire firmware to SD's ROM.

Returns
OK if successful, otherwise ERROR;

References SDStruct::memAddrLSB, SDStruct::memAddrMSB, SDStruct::memWriteCtrl, sdFirmwareVerifyPage(), sdFirmwareVerifyPageZero(), sdFirmwareWritePage(), SDLOCK, and SDUNLOCK.