声明: 在eda121上转载的
The SROM holds code that is used to boot the PSoC device, calibrate circuitry, and perform Flash operations. 意思 好像是说 SROM里面的代码是用来 导入PSOC的 设备,驱动,电路的配制,以及FALSH代码的保护. SWBootReset ReadBlock WriteBlock EraseBlock TableRead CheckSum Calibrate0 Calibrate1 这是SROM里面的函数,FLASH 里面可以调用. 如果想要调用这些函数的时候,要注意两关键的变量 KEY1和KEY2,always have a value of 3Ah, while KEY2 must have the same value as the stack pointer when the SROM function begins execution,下面的代码明确的阐述了这句话的意思. 1. halt 2. SSCOP: mov [KEY1], 3ah 3. mov X, SP 4. mov A, X 5. add A, 3 6. mov [KEY2], A
other feature;
These aid in the determination of success or failure of a particular function. The return code is stored in KEY1’s position in the parameter block. The CheckSum and TableRead functions do not have return codes because KEY1’s position in the parameter block is used to return other data.
Return Code Value Description 00h Success 01h Function not allowed due to level of protection on the block. 02h Software reset without hardware reset. 03h Fatal error, SROM halted.
这些函数好像比较少的用到.... 具体的说明在 P72 OF TRM
|