1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>CARD_ProgramAndVerifyFlash</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">CARD_ProgramAndVerifyFlash <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;nitro/card.h&gt;</CODE><BR>
20  <BR>
21  <CODE>static inline BOOL	CARD_ProgramAndVerifyFlash(u32 dst, const void *src, u32 len);</CODE><br>
22  <br>
23  </dd>
24</dl>
25<h2>Arguments</h2>
26<TABLE border="1" width="100%">
27  <TBODY>
28    <TR>
29      <TD width="13%"><EM><STRONG>dst</STRONG></EM></TD>
30      <TD width="87%">The FLASH address of the transfer destination.</TD>
31    </TR>
32    <TR>
33      <TD width="13%"><EM><STRONG>src</STRONG></EM></TD>
34      <TD width="87%">Transfer source memory address.</TD>
35    </TR>
36    <TR>
37      <TD width="13%"><EM><STRONG>len</STRONG></EM></TD>
38      <TD width="87%">Byte length of data being written.</TD>
39    </TR>
40  </TBODY>
41</TABLE>
42
43<h2>Return Values</h2>
44<p>TRUE if the process succeeds and the data are the same. FALSE otherwise.</p>
45
46<H2>Description</H2>
47<p>This function writes data to the FLASH device, and then performs a comparison on that written data. The function does not return control until it has finished processing. If the process succeeds and the data matches, the function returns TRUE. Otherwise, it returns FALSE. To get the detailed result value when processing fails, call the <A href="../common/CARD_GetResultCode.html"><CODE>CARD_GetResultCode</CODE></A> function.
48</p>
49<p>
50<font color="#800000">You must use the <A href="CARD_EraseFlashSector.html"><CODE>CARD_EraseFlashSector</CODE></A> function in advance to erase the contents of the region specified as the destination for writing with this function. We cannot guarantee integrity of the data written to a region that has not been erased.</font>For certain kinds of flash devices you can use the <A href="CARD_WriteFlash.html"><CODE>CARD_WriteFlash</CODE></A> function, which has fewer restrictions than this function.
51</p>
52<p>
53To use this function, you must first lock the access bus with the <A href="../backup/CARD_LockBackup.html"><CODE>CARD_LockBackup</CODE></A> function.
54</p>
55<h2>Internal Operation</h2>
56<p>
57<font color="#800000">This function communicates with the ARM7 processor internally via PXI.<br> The process will not end if PXI interrupts are not enabled.<br></font> <br>
58</p>
59<h2>See Also</h2>
60<p><CODE><A href="../backup/CARD_WaitBackupAsync.html">CARD_WaitBackupAsync</A>, <A href="../common/CARD_GetResultCode.html">CARD_GetResultCode</A>, <A href="CARD_IsBackupFlash.html">CARD_IsBackupFlash</A>, <A href="CARD_ProgramFlash.html">CARD_ProgramFlash</A>, <A href="CARD_ProgramFlashAsync.html">CARD_ProgramFlashAsync</A>, <A href="CARD_ProgramAndVerifyFlash.html">CARD_ProgramAndVerifyFlash</A>, <A href="CARD_ProgramAndVerifyFlashAsync.html">CARD_ProgramAndVerifyFlashAsync</A>, <A href="CARD_EraseFlashSector.html">CARD_EraseFlashSector</A>, <A href="CARD_EraseFlashSectorAsync.html">CARD_EraseFlashSectorAsync</A>, <A href="CARD_WriteFlashSector.html">CARD_WriteFlashSector</A>, <A href="CARD_WriteFlashSectorAsync.html">CARD_WriteFlashSectorAsync</A>, <A href="CARD_WriteAndVerifyFlashSector.html">CARD_WriteAndVerifyFlashSector</A>, <A href="CARD_WriteAndVerifyFlashSectorAsync.html">CARD_WriteAndVerifyFlashSectorAsync</A>, <A href="CARD_ReadFlash.html">CARD_ReadFlash</A>, <A href="CARD_WriteFlash.html">CARD_WriteFlash</A>, <A href="CARD_WriteAndVerifyFlash.html">CARD_WriteAndVerifyFlash</A>, <A href="CARD_VerifyFlash.html">CARD_VerifyFlash</A>, <A href="../common/CARD_GetThreadPriority.html">CARD_GetThreadPriority</A></CODE></p>
61
62<H2>Revision History</H2>
63<P>
642007/08/22 Initial version.
65</P>
66<hr><p>CONFIDENTIAL</p></body>
67</html>
68