Code Confidencebuild 3.0.0.201402161939

Strata-Specific Functions

Name

Strata -- driver-specific functions

Synopsis

#include <cyg/io/strata_dev.h>
      

void cyg_strata_read_devid_XX(struct cyg_flash_dev* device, cyg_uint32* manufacturer, cyg_uint32* device);

int cyg_strata_unlock_all_j3_XX(struct cyg_flash_dev* device);

Description

The driver provides two sets of functions specific to Strata devices and not accessible via the standard eCos flash API. Both may be used safely before the flash subsystem is initialized using cyg_flash_init.

cyg_strata_read_devid_XX can be used to get the manufacturer and device codes. Typically it is called from a platform-specific driver initialization routine, allowing the platform HAL to adapt to the actual device present on the board. This may be useful if a board may get manufactured with several different and somewhat incompatible chips, although usually cyg_strata_init_cfi is the better approach. It may also be used during testing and porting to check that the chip is working correctly.

cyg_strata_unlock_all_j3_XX is only useful with 28FxxxJ3 chips and compatibles. These do not allow individual blocks to be unlocked. Hence the standard block unlock functionality is expensive: it requires checking the locked state of every block, unlocking every block, and then relocking all the blocks that should still be blocked. Worse, unlocking every block is a time-consuming operation, taking approximately a second, that needs to run with interrupts disabled. For many applications it is better to just ignore the chip's locking capabilities and run with all blocks permanently unlocked. Invoking cyg_strata_unlock_all_j3_XX during manufacture or when the board is commissioned achieves this.