Maxim-integrated MAXQ7667 Manual do Utilizador Página 309

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 347
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 308
18-3 __________________________________________________________________________________________________________
MAXQ7667 Users Guide
18.1 In-Application Programming Functions
Function: flashWrite
Summary: Write a word to the flash block (program memory).
Inputs: A[0]: Word address in main flash block to write to.
A[1]: Word value to write to flash block.
Outputs: Carry: Set on error and cleared on success. If set, then A[0] contains one of the following error codes:
1
: Failure due to software timeout.
2: Failure reported by hardware (DQ5).
Destroys: PSF, LC[1]
Notes:
1) If the watchdog reset is enabled, user code should disable it before calling this function. Also, disable interrupts globally (IGE = 0).
2) If the flash location has already been programmed to a non-FFFF (hex) value, this function returns with an error (Carry set). To repro-
gram a flash sector
, it must first be erased by calling flashErasePage or flashEraseAll.
Function: flashErasePage
Summary: Erases one page, 256 words, in the flash block ( program memory).
Inputs: A[0]: Word address located in the page to be erased.
Outputs: Carry: Set on error and cleared on success. If set, then A[0] contains one of the following error codes:
1: Failure due to software timeout.
2: Failure reported by hardware (DQ5).
3: Failure due to trying to erase current page.
Destroys: PSF, LC[1], GR, AP, APC (AP = APC = 0)
Notes:
1) If the watchdog reset is enabled, user code should disable it before calling this function. Also, disable interrupts globally (IGE = 0).
Function: flashEraseAll
Summary: Erases the entire flash block.
Inputs: None.
Outputs: Carry: Set on error and cleared on success.
Destroys: PSF, GR, LC[0], LC[1], APC, AP, A[0] (AP, APC set to 0)
Notes:
1) If the watchdog reset is enabled, user code should disable it before calling this function. Also, disable interrupts globally (IGE = 0).
2) This function can only be called by code running from the RAM. An attempt to call this function while running from the flash results
in an error.
Function: AutoBaud*
Summary: Waits for a 0x0D and measures the bit time for it and a reasonable value for BT is calculated (baud clock).
Input: A[15]: Number of retries when bad character received.
Output: PR set and return code in A[7]. Return codes are one of ERROR_NONE,
ERROR_NO_AUTOBAUD_CHARACTER, or
ERROR_BAD_AUTOBAUD_CHARACTER.
Destroys: Accumulators (pretty much all of them), AP, PSF, Timer 0
Notes:
1)
Initializes the UAR
T to mode 1 with baud rate quadrupler on.
*Refer to Section 8 for UAR
T with LIN communication and
Section 13 for in-system pr
ogramming thr
ough UAR
T (and JT
AG).
Vista de página 308
1 2 ... 304 305 306 307 308 309 310 311 312 313 314 ... 346 347

Comentários a estes Manuais

Sem comentários