mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 04:25:32 +00:00
header files: modify rom code and soc header files
1. timer reg file for both time group 0 and time group 1, not only timer group 0 2. fix bug that io mux header file mismatch with chip 3. fix bug that some BASE address not correct 4. add some static function to eagle.fpga32.rom.addr.v7.ld 5. add interrupts usage table 6. add some comments for rom code functions
This commit is contained in:
@@ -18,50 +18,127 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//===========================================
|
||||
// function : cache_init
|
||||
// description: initialise cache mmu, mark all entries as invalid.
|
||||
// conditions:
|
||||
// Call Cache_Read_Disable() before calling this function.
|
||||
// inputs:
|
||||
// cpu_no is CPU number,0(PRO CPU) or 1(APP CPU),
|
||||
// output: NONE
|
||||
//===========================================
|
||||
/** \defgroup uart_apis, uart configuration and communication related apis
|
||||
* @brief uart apis
|
||||
*/
|
||||
|
||||
/** @addtogroup uart_apis
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Initialise cache mmu, mark all entries as invalid.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void mmu_init(int cpu_no);
|
||||
|
||||
//===========================================
|
||||
// function : cache_flash_mmu_set
|
||||
// description: Configure MMU to cache a flash region.
|
||||
// conditions:
|
||||
// Call this function to configure the flash cache before enabling it.
|
||||
// Check return value to verify MMU was set correctly.
|
||||
// inputs:
|
||||
// cpu_no is CPU number,0(PRO CPU) or 1(APP CPU),
|
||||
// pid is process identifier. Range 0~7
|
||||
// vaddr is "virtual" address in CPU address space. Can be IRam0, IRam1, IRom0 and DRom0 memory address.
|
||||
// Should be aligned by psize
|
||||
// paddr is "physical" address in flash controller's address space.
|
||||
// ie for 16M flash the range is 0x000000~0xFFFFFF. Should be aligned by psize
|
||||
// psize is page size of flash, in kilobytes. Can be 64, 32, 16.
|
||||
// num is number of pages to be set, valid range 0 ~ (flash size)/(page size)
|
||||
// output: error status
|
||||
// 0 : mmu set success
|
||||
// 1 : vaddr or paddr is not aligned
|
||||
// 2 : pid error
|
||||
// 3 : psize error
|
||||
// 4 : mmu table to be written is out of range
|
||||
// 5 : vaddr is out of range
|
||||
//===========================================
|
||||
/**
|
||||
* @brief Set Flash-Cache mmu mapping.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : CPU number, 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @param int pod : process identifier. Range 0~7.
|
||||
*
|
||||
* @param unsigned int vaddr : virtual address in CPU address space.
|
||||
* Can be IRam0, IRam1, IRom0 and DRom0 memory address.
|
||||
* Should be aligned by psize.
|
||||
*
|
||||
* @param unsigned int paddr : physical address in Flash.
|
||||
* Should be aligned by psize.
|
||||
*
|
||||
* @param int psize : page size of flash, in kilobytes. Should be 64 here.
|
||||
*
|
||||
* @param int num : pages to be set.
|
||||
*
|
||||
* @return unsigned int: error status
|
||||
* 0 : mmu set success
|
||||
* 1 : vaddr or paddr is not aligned
|
||||
* 2 : pid error
|
||||
* 3 : psize error
|
||||
* 4 : mmu table to be written is out of range
|
||||
* 5 : vaddr is out of range
|
||||
*/
|
||||
unsigned int cache_flash_mmu_set(int cpu_no, int pid, unsigned int vaddr, unsigned int paddr, int psize, int num);
|
||||
|
||||
unsigned int cache_sram_mmu_set(int cpu_no, int pid,unsigned int vaddr, unsigned int paddr, int psize, int num);
|
||||
/**
|
||||
* @brief Set Ext-SRAM-Cache mmu mapping.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : CPU number, 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @param int pod : process identifier. Range 0~7.
|
||||
*
|
||||
* @param unsigned int vaddr : virtual address in CPU address space.
|
||||
* Can be IRam0, IRam1, IRom0 and DRom0 memory address.
|
||||
* Should be aligned by psize.
|
||||
*
|
||||
* @param unsigned int paddr : physical address in Ext-SRAM.
|
||||
* Should be aligned by psize.
|
||||
*
|
||||
* @param int psize : page size of flash, in kilobytes. Should be 32 here.
|
||||
*
|
||||
* @param int num : pages to be set.
|
||||
*
|
||||
* @return unsigned int: error status
|
||||
* 0 : mmu set success
|
||||
* 1 : vaddr or paddr is not aligned
|
||||
* 2 : pid error
|
||||
* 3 : psize error
|
||||
* 4 : mmu table to be written is out of range
|
||||
* 5 : vaddr is out of range
|
||||
*/
|
||||
|
||||
unsigned int cache_sram_mmu_set(int cpu_no, int pid, unsigned int vaddr, unsigned int paddr, int psize, int num);
|
||||
|
||||
/**
|
||||
* @brief Initialise cache access for the cpu.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void Cache_Read_Init(int cpu_no);
|
||||
|
||||
/**
|
||||
* @brief Flush the cache value for the cpu.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void Cache_Flush(int cpu_no);
|
||||
|
||||
/**
|
||||
* @brief Disable Cache access for the cpu.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void Cache_Read_Disable(int cpu_no);
|
||||
|
||||
/**
|
||||
* @brief Enable Cache access for the cpu.
|
||||
* Please do not call this function in your SDK application.
|
||||
*
|
||||
* @param int cpu_no : 0 for PRO cpu, 1 for APP cpu.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void Cache_Read_Enable(int cpu_no);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user