This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
现需要将工程参数不定时的存入TMS470R1B1M片内flash中。当程序烧写完拔掉烧写器JLINK,系统内部的Flash擦写驱动工作正常 可以经代码随意擦写片内flash,当系统掉电在上电(复位)后代码不能取得Flash的操作控制权限,通过跟踪显示发现Flash被锁定不允许操作。其中FMMSTAT寄存器SLOCK位为1(FMBSEA and FMBSEB进行了正常的设置),根据芯片datasheet说明对片内flash进行进行密钥匹配 从flash内0xfff0位置读取四组32位密钥送往FMPKEY寄存器进行匹配同时查看 FMBBUSY寄存器中的PROTL2DIS标志位此标志位显示没有匹配成功,以上操作在程序烧写完不掉电的时候运行时正常的 各寄存器标志位跟踪显示也很正常,但是 一旦重新上电就出现上述问题。
针对片内flash操作 我一问重重。。
(1)、datasheet上说“reads the four stored protection keys out of the flash bank one at a time and into a register in the flash module”这个register是不是FMPKEY?
(2)、datasheet上说“After the CPU loads each key from the bank to the control logic, the CPU must load an identical user key into the FMPKEY control register.”这个control logic 是指啥?
(3)、F05flash API 中“for (k=0;k<4;k++) {
key_start[k];
cntl[PROTKEY]=key[k];
}” key_start[k]; 是啥作用?
(4)、系统复位后 操作flash与系统的工作模式有没有关系 比如管理模式和用户模式。。。是不是都能操作flash?
(5)、出现上述情况可能与硬件有关系吗?硬件是自己做的。
Very many thanks 。。