Get aligned start address of a flash write region
Get aligned end address of a flash write region
Deallocates bank->driver_priv
Provides default read implementation for flash memory.
Provides default verify implementation for flash memory.
Provides default erased-bank check handling. Checks to see if the flash driver knows they are erased; if things look uncertain, this routine will call default_flash_mem_blank_check() to confirm.
Returns the flash bank specified by @a name, which matches the driver name and a suffix (option) specify the driver-specific bank number. The suffix consists of the '.' and the driver-specific bank number: when two str9x banks are defined, then 'str9x.1' refers to the second.
Returns the flash bank like get_flash_bank_by_name(), without probing.
Retrieves @a bank from a command argument, reporting errors parsing the bank identifier or retrieving the specified bank. The bank may be identified by its bank number or by @c name.instance, where @a instance is driver-specific.
@file Implements Tcl commands used to access NOR flash facilities.
Returns the flash bank located at a specified address.
Adds a new NOR bank to the global list of banks.
openocd command interface *
chip identification and status *
Remove all chips from the internal list without distinguishing which one is owned by this bank. This simplification works only for one shot deallocation like current flash_free_all_banks()
Remove all chips from the internal list without distinguishing which one is owned by this bank. This simplification works only for one shot deallocation like current flash_free_all_banks()
Check if gap between sections is bigger than minimum required to discontinue flash write
The dsp5680xx use word addressing. The "/2" that appear in the following code are a workaround for the fact that OpenOCD uses byte addressing.
The flash module (FM) on the dsp5680xx supports both individual sector and mass erase of the flash memory. If this function is called with @a first == @a last == 0 or if @a first is the first sector (#0) and @a last is the last sector then the mass erase command is executed (much faster than erasing each sector individually).
The flash module (FM) on the dsp5680xx support a blank check function. This function executes the FM's blank check functionality on each and every sector.
A memory mapped register (PROT) holds information regarding sector protection. Protection refers to undesired core access. The value in this register is loaded from flash upon reset.
Protection functionality is not implemented. The current implementation applies/removes security on the chip. The chip is effectively secured/unsecured after the first reset following the execution of this function.
Remove flash structure corresponding to this bank, if and only if it's not used by any others
Evaluate flash bank command.
Try and identify the device. Determine type number and its memory layout.
Get protection (sector security) status. Determine the status of "sector security" for each sector. A secured sector is one that can never be erased/programmed again.
Run a blank check for each sector. For speed reasons, the device isn't read word by word. A hash value is calculated by the hardware ("BIST") for each sector. This value is then compared against the known hash of an empty sector.
Helper functions ************************* Wait for an event in mask to occur in INT_STATUS. Return when an event occurs, or after a timeout.
Set up the flash for erase/program operations. Enable the flash, and set the correct CRA clock of 66 kHz.
Check if device is ready. Check if device is ready for flash operation: Must have been successfully probed. Must be halted.
Read the status of sector security from the index sector.
Use BIST to calculate a 128-bit hash value over a range of flash.
Return sector number for given address. Return the (logical) sector number for a given relative address. No sanity check is done. It assumed that the address is valid.
Write one page to the index sector.
Wait while operation with bootflash being performed and check result status
Wait while operation with userflash being performed and check result status
Dump page of userflash region. If we want to change some settings, we have to dump it full, because userflash is flash(not EEPROM). And correct write to flash can be performed only after erase. So without dump, changing one registers will clear others.
Load modified page dump to userflash region page.
Erase one page of userflash info or main region
Enable or disable protection of userflash pages
openocd command interface *
chip identification and status *
Read clock configuration and set stellaris_info->usec_clocks.
Writes a block to flash either using target algorithm or use fallback, host controlled halfword-by-halfword access. Flash controller must be unlocked before this call.
set all FLASH_SECBB registers to the same value
Dummy function, Life Cycle transition is not currently supported
psoc6_get_info Displays human-readable information about acquired device
Checks if given flash bank belongs to Supervisory Flash
Programs single Flash Row
Performs Program operation
Checks if given flash bank belongs to Work Flash
Checks if given flash bank belongs to Main Flash
Probes the device and populates related data structures with target flash geometry data. This is done in non-intrusive way, no SROM API calls are involved so GDB can safely attach to a running target. Function assumes that size of Work Flash is 32kB (true for all current part numbers)
Probes target device only if it hasn't been probed yet
Erases single sector (256k) on target device
Erases single row (512b) on target device
Performs Erase operation. Function will try to use biggest erase block possible to speedup the operation.