#include <stdlib.h>#include <stdio.h>#include <string.h>#include <stdint.h>#include "dbg_msg.h"#include "jt_arm.h"#include "jt_instr.h"#include "jt_flash.h"Flash support functions
| int jt_intelflashProgByte | ( | uint32_t | base_address, | |
| uint32_t | address, | |||
| uint8_t | data, | |||
| unsigned | wait | |||
| ) |
Support Function to write one Byte to the Flash.
This is OK after an erase of a Sector.
| base_address | flash base address | |
| address | byte address to write | |
| data | 8-bit data value | |
| wait | if true wait for completion |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadByte(), and jtag_arm_WriteByte().
Referenced by programFlashCB_write_sector().
| int jt_intelflashUnlockSectorByte | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to unlock a Sector within the Flash.
| base_address | First address of the Flash that has to be used | |
| address | Addres within the sector which has to to be unlocked |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadByte(), and jtag_arm_WriteByte().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashEraseSectorByte | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Erase a Sector within the Flash
| base_address | First address of the Flash that has to be erased | |
| address | Addres within the sector which has to to be erased |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadByte(), and jtag_arm_WriteByte().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashProgHalfword | ( | uint32_t | base_address, | |
| uint32_t | address, | |||
| uint16_t | data, | |||
| unsigned | wait | |||
| ) |
Support Function to write one Halfword to the Flash. This is OK after an erase of a Sector.
| base_address | flash base address | |
| address | byte address to write | |
| data | 16-bit data value for one 16 bit flash | |
| wait | if true wait for completion |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadHalfword(), and jtag_arm_WriteHalfword().
Referenced by programFlashCB_write_sector().
| int jt_intelflashProgHalfword_dual | ( | uint32_t | base_address, | |
| uint32_t | address, | |||
| uint16_t | data, | |||
| unsigned | wait | |||
| ) |
Support Function to write one Halfword to the Flash. This is OK after an erase of a Sector.
| base_address | flash base address | |
| address | byte address to write | |
| data | 16-bit data value for two 8 bit flashes | |
| wait | if true wait for completion |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadHalfword(), and jtag_arm_WriteHalfword().
Referenced by programFlashCB_write_sector().
| int jt_intelflashUnlockSectorHalfword | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Unlock a Sector within the Flash
| base_address | First address of the Flash that has to be used | |
| address | Addres within the sector which has to to be unlocked |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadHalfword(), and jtag_arm_WriteHalfword().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashUnlockSectorHalfword_dual | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Unlock a Sector within the Flash
| base_address | First address of the Flash that has to be used | |
| address | Address within the sector which has to to be unlocked |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadHalfword(), and jtag_arm_WriteHalfword().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashEraseSectorHalfword | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Erase a Sector within the Flash
| base_address | First address of the Flash that has to be erased | |
| address | Addres within the sector which has to to be erased |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadHalfword(), and jtag_arm_WriteHalfword().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashEraseSectorHalfword_dual | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Erase a Sector within the Flash
| base_address | First address of the Flash that has to be erased | |
| address | Addres within the sector which has to to be erased |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadHalfword(), and jtag_arm_WriteHalfword().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashProgWord | ( | uint32_t | base_address, | |
| uint32_t | address, | |||
| uint32_t | data, | |||
| unsigned | wait | |||
| ) |
Support Function to write one Word to the Flash. This is OK after an erase of a Sector.
| base_address | flash base address | |
| address | byte address to write | |
| data | 32-bit data value for one 32-bit flash | |
| wait | if true wait for completion |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by programFlashCB_write_sector().
| int jt_intelflashProgWord_dual | ( | uint32_t | base_address, | |
| uint32_t | address, | |||
| uint32_t | data, | |||
| unsigned | wait | |||
| ) |
Support Function to write one Word to the Flash. This is OK after an erase of a Sector.
| base_address | flash base address | |
| address | byte address to write | |
| data | 32-bit data value for two 16-bit flash's | |
| wait | if true wait for completion |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by programFlashCB_write_sector().
| int jt_intelflashProgWord_quad | ( | uint32_t | base_address, | |
| uint32_t | address, | |||
| uint32_t | data, | |||
| unsigned | wait | |||
| ) |
Support Function to write one Word to the Flash. This is OK after an erase of a Sector.
| base_address | flash base address | |
| address | byte address to write | |
| data | 32-bit data value for four 8-bit flash's | |
| wait | if true wait for completion |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by programFlashCB_write_sector().
| int jt_intelflashUnlockSectorWord | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Unlock a Sector within the Flash
| base_address | First address of the Flash that has to be used | |
| address | Addres within the sector which has to to be unlocked |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashUnlockSectorWord_dual | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Unlock a Sector within the Flash
| base_address | First address of the Flash that has to be used | |
| address | Addres within the sector which has to to be unlocked |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashUnlockSectorWord_quad | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Unlock a Sector within the Flash
| base_address | First address of the Flash that has to be used | |
| address | Addres within the sector which has to to be unlocked |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashEraseSectorWord | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Erase a Sector within the Flash
| base_address | First address of the Flash that has to be erased | |
| address | Addres within the sector which has to to be erased |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashEraseSectorWord_dual | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Erase a Sector within the Flash
| base_address | First address of the Flash that has to be erased | |
| address | Addres within the sector which has to to be erased |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().
| int jt_intelflashEraseSectorWord_quad | ( | uint32_t | base_address, | |
| uint32_t | address | |||
| ) |
Support Function to Erase a Sector within the Flash
| base_address | First address of the Flash that has to be erased | |
| address | Addres within the sector which has to to be erased |
| 0 | success | |
| 1 | error |
References jtag_arm_ReadWord(), and jtag_arm_WriteWord().
Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().