User manual
RC200/203 Manual
www.celoxica.com Page 69
5.15.6 Erasing SmartMedia memory
extern macro proc RC200SmartMediaErase (Address, ResultPtr);
Parameters: Address: Block address in bytes of type unsigned 27.
ResultPtr: Pointer to register of type unsigned 1. Returns 0
for success, 1 for failure.
Timing 250 clock cycles or more.
Description: Performs an erase on the entire block set by
Address.
Note that for 16 pages per block (4/8MB cards) the block
address resides in the top 18 bits. For cards with 32 pages
per block, the block address is in the top 17 bits. You can
check how many pages there are in a block in your card using
RC200SmartMediaIsBlock32Pages().
() performs an erase on the entire block, regardless of
RC200SmartMediaErase
page or column number.
5.15.7 Number of pages per block
extern macro expr RC200SmartMediaIsBlock32Pages ();
You can determine whether your SmartMedia device has 16 or 32 pages per block by
calling
RC200SmartMediaIsBlock32Pages(). This expression returns a true condition for
cards that are 32 pages per block, and a false denotes 16 pages. The e
xpression will only
valid results after a successful call to
RC200SmartMediaInit().
physical or logical
addres g
•
write these fields, the SmartMedia card may not work with
lid data.
eed to format the card using the command-line version
of the Celoxica FTU2 program.
return
5.15.8 Logical and physical addressing
The RC200 PSL allows you to perform reads and writes using
sin . The advantages of using logical addressing are:
It preserves the CIS (Card Information Structure) and IDI (ID information)
fields. If you over
other hardware.
• It skips bad blocks, avoiding the risk of reading or writing inva
You can only use logical addressing on cards of 16 megabytes or more.
To use logical addressing, you n